Comments (6)
I was able to reproduce this issue in a fresh Arch VM. It seems like this is somewhat related to this issue flatpak/xdg-desktop-portal#1070
The issue is about keyboard shortcuts, but the workaround mentioned there worked for me also for the desktop shortcuts:
- Create a helper script
/some/path/start_normcap.sh
with the following content:
#!/bin/bash
/usr/bin/normcap
- Copy the desktop file to be able to modify it:
cp /usr/share/applications/normcap.desktop ~/.local/share/applications/normcap.desktop
- Edit the new file to point to the helper script (instead to
normcap
):
exec=/path/to/start_normcap.sh
- Launch "NormCap" through the application menu
Does it work for you, too?
from normcap.
Oh yes, thanks! That works. Thank you for your investigation! That really deserves the term workaround.. haha.
from normcap.
@HellmannK , thanks for reporting.
I think on Wayland permissions are somehow tied to the exact filename of the .desktop
-file: it has to match a specific format. Can't remember the details though...
I'll try to look into it in the next days.
from normcap.
He @HellmannK ,
could you please try renaming normcap.desktop
to com.github.dynobo.normcap.desktop
?
E.g. via:
sudo mv /usr/share/applications/normcap.desktop /usr/share/applications/com.github.dynobo.normcap.desktop
Does this fix the permission problem?
from normcap.
He @HellmannK ,
could you please try renaming
normcap.desktop
tocom.github.dynobo.normcap.desktop
?E.g. via:
sudo mv /usr/share/applications/normcap.desktop /usr/share/applications/com.github.dynobo.normcap.desktopDoes this fix the permission problem?
No, it does not help. I tried to get the StartupWMClass with xprop | grep WM_CLASS
but it had no output. Is there any? Maybe it would help to add? I also ran desktop-file-validate but there was no error or warning shown.
Out of curiosity I tried to start the .desktop file from cli with gtk-launch com.github.dynobo.normcap.desktop
- that works as well...
from normcap.
Arch, Gnome 45, Wayland:
$ normcap
12:33:52 - ERROR - normcap.screengrab.dbus_portal:129 - Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.48", path="/org/freedesktop/portal/desktop/request/1_106/normcap_giggdebe", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x55b54d804f00>
12:33:52 - WARNING - normcap.screengrab.permissions:205 - Screenshot permissions on Wayland seem missing.
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/normcap/screengrab/permissions.py", line 200, in _dbus_portal_has_screenshot_permission
result = dbus_portal.capture()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/normcap/screengrab/dbus_portal.py", line 223, in capture
result = _synchronized_capture(interactive=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/normcap/screengrab/dbus_portal.py", line 200, in _synchronized_capture
raise error
normcap.screengrab.exceptions.ScreenshotPermissionError: Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.48", path="/org/freedesktop/portal/desktop/request/1_106/normcap_giggdebe", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x55b54d804f
00>
12:33:55 - ERROR - normcap.screengrab.dbus_portal:129 - Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.48", path="/org/freedesktop/portal/desktop/request/1_106/normcap_efififgd", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x55b54d81b940>
12:33:55 - CRITICAL - normcap:148 - Uncaught exception!
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/normcap/screengrab/permissions.py", line 181, in accept_button_pressed
self.capture = dbus_portal._synchronized_capture(interactive=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/normcap/screengrab/dbus_portal.py", line 200, in _synchronized_capture
raise error
normcap.screengrab.exceptions.ScreenshotPermissionError: Permission denied for Screenshot via xdg-portal! Message: <PySide6.QtDBus.QDBusMessage(type=Signal, service=":1.48", path="/org/freedesktop/portal/desktop/request/1_106/normcap_efififgd", interface="org.freedesktop.portal.Request", member="Response", signature="ua{sv}", contents=(2, [Argument: a{sv} {}]) ) at 0x55b54d81b940>
12:33:55 - CRITICAL - normcap:151 - System info: {'normcap_version': '0.5.4', 'python_version': '3.11.6', 'cli_args': '/usr/bin/normcap', 'is_briefcase_package': False, 'is_flatpak_package': False, 'is_appimage_package': False, 'platform': 'linux', 'desktop_environment': <DesktopEnvironment.GNOME: 1>, 'display_manager_is_wayland': True, 'pyside6_version': '6.6.1', 'qt_version': '6.6.1', 'qt_library_path': '/usr/lib/qt6/plugins, /usr/bin', 'locale': 'DEFAULT', 'config_directory': PosixPath('/home/olk/.config/normcap'), 'resources_path': PosixPath('/usr/lib/python3.11/site-packages/normcap/resources'), 'tesseract_path': PosixPath('/usr/bin/tesseract'), 'tessdata_path': None, 'envs': {'TESSDATA_PREFIX': None, 'LD_LIBRARY_PATH': None}, 'screens': [Screen(left=0, top=0, right=1919, bottom=1079, device_pixel_ratio=1.0, index=0, screenshot=None)]}
12:33:55 - CRITICAL - normcap:152 - Unfortunately, NormCap has to be terminated due to an unknown problem.
Please help improve NormCap by reporting this error, including the output above, on
https://github.com/dynobo/normcap/issues/new
Thanks!
after modifying the .desktop, it doesn't appear in the Gnome overview
from normcap.
Related Issues (20)
- 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 2
- Thanks!
- Add: pt_BR Translations HOT 2
- Using AppImage on Kubuntu, sometimes the captured text cannot be pasted and NormCap exits. HOT 7
- NormCap keeps hanging in background and no window shown HOT 12
- FileNotFoundError due to the file path wasn't decoded for UTF-8 HOT 2
- Не запускается HOT 1
- Potential Trojan Detected in NormCap.exe (Gen:Variant.Barys.459118) for Windows HOT 2
- Potential Trojan Detected in NormCap.exe (Gen:Variant.Barys.459118) for Windows
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.