-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use XDG Desktop Portals on Linux instead of screenshot tools #1010
Labels
Comments
Solving this issue would get the QR code screenshot feature working for Wayland systems. Adding the following error message from Sway + Wayland system for SEO visibility: 11:46:02.007 [helper] ERROR:
11:46:02.007 [helper] ERROR: (gnome-screenshot:1642482): Handy-WARNING **: 11:46:02.007: Using GtkSettings:gtk-application-prefer-dark-theme together with HdyStyleManager is unsupported. Please use HdyStyleManager:color-scheme instead.
11:46:02.149 [helper] ERROR:
11:46:02.149 [helper] ERROR: ** (gnome-screenshot:1642482): WARNING **: 11:46:02.149: Unable to use GNOME Shell's builtin screenshot interface: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
11:46:02.149 [helper] ERROR:
11:46:02.149 [helper] ERROR: ** (gnome-screenshot:1642482): CRITICAL **: 11:46:02.149: Unable to capture a screenshot of any window
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RpcResponse.error(status: invalid-command, message: Invalid parameters: Unable to capture screenshot, body: {}) |
jonasbb
added a commit
to jonasbb/com.yubico.yubioath
that referenced
this issue
Jan 11, 2025
… xdg-desktop-portal DBus API The app does not use the xdg-desktop-portal API for screenshots yet. It can fall back to using the gnome-screenshot command. That is not provided by the runtime. Instead this commit adds a mock gnome-screenshot command that uses the portal API for taking screenshots and saves them to a file. This makes loading QR codes work from within a flatpak. flathub#78 Yubico/yubioath-flutter#1010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The application needs an ability to scan QR code from screen, but arbitrary reading from screen is not supported on Wayland for security reasons. But an ability to get screen content when needed is needed sometimes. So there is an API for that. There is a generic API for permission-based access granting on Linux. It's called XDG Desktop Portals. There is a portal for taking screenshot.
It's already used in some apps for the same thing. For example, Authenticator, an application for generating two-factor codes, uses the portal to scan QR code.
There are some advantages of this way to scan QRs from the screen:
The text was updated successfully, but these errors were encountered: