Comments (4)
The gnome-screenshot
workaround works, thank you.
from normcap.
Thanks for the report, @Igetin . I can reproduce the problem on Ubuntu 20.04 with Gnome under Wayland.
This is probably an issue in the python library mss, which I'm leveraging to get the screenshot on the multiple platform.
Just to be sure, can you please also run the following snippet, e.g. by typing it in python3 console, can you confirm that you experience the same behavior as described below?
If I run only the following lines...
import mss
fn = mss.mss().shot(mon=-1, output="screenshot.png")
print(fn)
...under X it works (filename is printed, screenshot saved), while under Wayland I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/holger/.local/lib/python3.8/site-packages/mss/factory.py", line 41, in mss
return linux.MSS(**kwargs)
File "/home/holger/.local/lib/python3.8/site-packages/mss/linux.py", line 226, in __init__
self.root = self.xlib.XDefaultRootWindow(MSS.display)
File "/home/holger/.local/lib/python3.8/site-packages/mss/linux.py", line 175, in validate
raise ScreenShotError(err, details=details)
mss.exception.ScreenShotError: XDefaultRootWindow() failed
from normcap.
I opened an issue for mss
: BoboTiG/python-mss#155
Beside waiting to get it fixed in that dependency, I'll think about a (temporary) workaround, e.g. by falling back to pyscreenshot
or an execution of gnome-screenshot
. But I'll have to check, if the effort is worth the temporary benefit. Stay tuned! :-)
from normcap.
I added a fallback for wayland. However, that workaround uses gnome-screenshot
tool, which have to be installed (it is by default on Ubuntu). Please test and report back, if it worked.
from normcap.
Related Issues (20)
- [Linux, Wayland] Multi monitor issues - Help needed! HOT 1
- Permission denied for Screenshot via xdg-portal! HOT 6
- Crashes on MacOS (CRITICAL - normcap:152) HOT 7
- Sending result to another app HOT 2
- Enhancement Suggestion - Add Customizable Hotkeys (Keyboard Shortcuts) HOT 3
- Arabic instead of English HOT 2
- Flatpak notifications are shown as hidden
- Screenshots are saved in /home/Pictures with every OCR HOT 4
- Looking for PySide/PyQT expert to help with GUI code
- Auto language switch HOT 1
- The application crashes on startup. HOT 1
- "NormCap has to be terminated due to an unknown problem" in wayland of KDE6 HOT 1
- ERROR - normcap.screengrab.dbus_portal:110 - No response from xdg-portal within 10s! HOT 1
- Add option to parse text as one line HOT 1
- Normcap sometimes crashes trying to recognize Kanji/Hanzi
- problem HOT 1
- Missing the screen capture permission HOT 1
- Thanks!
- Add: pt_BR Translations HOT 2
- Using AppImage on Kubuntu, sometimes the captured text cannot be pasted and NormCap exits. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from normcap.