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
DynamicLauncher has problems with desktop id outside sandbox #826
Comments
CC @mwleeds |
xdg-desktop-portal is determining the app ID for unsandboxed processes by looking at the systemd unit name and interpreting it according to this standard. As discussed here, launching an app from the command line in such a way that it complies with the aforementioned standard is possible but not intuitive. There's another relevant comment here:
Also relevant are this and the following comments on the PR that implemented the dynamic launcher portal: #696 (comment) |
But then the portal method is called before that |
So I'm a little uncertain where this leaves us for Epiphany. It seems we need to either (a) change Ephy somehow to not use the dynamic launcher portal unless we are sandboxed, or (b) switch back to the GNOME 42 version of the code? |
I don't understand how this issue affects Epiphany. When Epiphany is run from the desktop launcher (gnome-shell) it should be compliant with the systemd standard, and the portal should have no problem determining its app ID correctly. |
But you cannot assume that Epiphany is run from gnome-shell since it can be run from arbitrary desktops. What about Pantheon and Phosh, which are the desktops that are actually used by the distros that are shipping Epiphany as default browser? |
I didn't mean to imply it had to be gnome-shell. Any desktop environment should be able to comply with that systemd standard when it launches apps, and as far as I know they all do. KDE Plasma definitely does. |
To be clear the problem here is https://gitlab.gnome.org/GNOME/epiphany/-/issues/1859 and it results in Epiphany web apps crashing. |
I really think we should just bite the bullet and implement a setAppId that in xdg-desktop-portal. Yeah, it can be abused if it's not sandboxed but so can everything else. |
I'm not opposed to making a |
I think the best way would be to let unsandboxed App use every ID they like |
Very strong disagree here. This should not ever be allowed by xdg-desktop-portal. |
Yeah, the information of the |
I have the following code:
As you can see, it sets the Application name to com.example.test:
It calls the Install method with com.example.test.launcher.desktop as desktop_file_id. If I run it outside the Sandbox, it fails with this error:
As you may see, I run the code through Konsole. If I set the desktop_file_id to org.kde.konsolelauncher.desktop it works. This is really bad. The code should work inside and outside the Sandbox. Inside the Sandbox, the name if always clear: I's the name of the Flatpak. But outside the Sandbox the name depends on how you run the program which is something I don't have control over as a developer.
There are 2 ways to solve this Issue:
The text was updated successfully, but these errors were encountered: