-
-
Notifications
You must be signed in to change notification settings - Fork 198
Flatpak not supporting wayland screenshots #390
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
Comments
@LyzardKing FYI |
You can run the flatpak with --log-session-bus and see which dbus server it tries to communicate with |
@bilelmoussaoui thanks for the tip, will try that later. I know already that under Gnome the call should go to Bit of topic, how can I detected from code if I'm running in flatpak? With snaps I can check if the $SNAP variable is set, is there such a variable with flatpaks? |
You can check if /.flatpak-info file exists |
Actually, this seems to be working. I've just tested Plasma Wayland and was able to take screenshots with the ksnip flatpak. The Default kwin dbus was used. |
Reopening this ticket as screenshots seem to be not working under Gnome. |
@bilelmoussaoui I have tried calling the Gnome DBus that works outside Snaps and Flatpaks and got this: The other thing that I tried to achieve is using the general |
Do you have xdg-desktop-portal installed? |
I guess not, it goes into the manifest file? This is our https://github.com/flathub/org.ksnip.ksnip/blob/master/org.ksnip.ksnip.yaml |
The xdg-desktop-portal is needed on the host if you want to use the portals. It's a generic thing that hopefully snap will support as well in the future. |
Is installing the portal on the host enough or do I need to change something in the manifest? |
Looks like it was already installed on the host system. |
The manifest doesn't seem to ask for the permission to talk to the GNOME screenshot dbus service. The kde one is included in the org.kde.* which is sadly needed for working tray icons |
Ok, I need to add permission to speak to the GNOME Screenshot dbus service, I'll look into that. Though still don't understand why How should those permissions look like? Something like:
|
@DamirPorobic you can test adding new permissions without reinstalling: |
Thanks, will try that tonight, this will definitely speed things up. |
But with those additions I still get the error: |
Well thats more then I had, I had only errors from the DBus, what you have there is a ksnip error that comes after the dbus call. Addition: Gnome Wayland works a bit different then Plasma Wayland in regards to screenshots. Gnome save a new Screenshot to a temporary location/file and we fetch it from there, maybe the next issue is that we have no write or read permission for the directory. |
EDIT: |
I'll edit the yaml file with the necessary permissions. |
The last remaining issues are that if we enable wayland to display the application, it will not render the close button in the menu (just a blank menu). |
Yes, it's the |
What close button?
You could try if that works. Any drawbacks? |
The exit button... in the top menu. |
hmm, strange that this is not working, it's a basic functionality of the window manager. |
Then go with xwayland? |
Done. |
The new portal API should not need to use the system /tmp folder. |
Why is is this command running the x11 code? |
With new API you mean |
The generic one is just a DBus call without handling of the result yet, you can't see any screenshot with it. Only the Snap package resolved to the generic one I guess. Try to set the $SNAP variable to any dummy value. |
Ah ok. So the only way for the snap to work in wayland is to add the freedesktop portal variant. |
Yes, Snap has also the problem that it can't figure out if it's running in Gnome, I have found the issue but haven't fixed it yet, hopefully tonight. Snap Wayland: Flatpak Wayland We have for the Snap issue a separate ticket. |
This is solved if we remove the XDG_CURRENT_DESKTOP from the snap yaml. We introduced it as a workaround, but it seems to work fine without it now. |
Oh, we set that to Unity? We don't need that part anymore? |
I would suggest we close this issue and work in #389 on the Snap Wayland issue. |
For wayland support under flatpak we need to use different dbus, this needs to be fixed as we currently use the Gnome and Plasma dbus interfaces.
The text was updated successfully, but these errors were encountered: