-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
RFC: Allow host apps to register themselves #1521
base: main
Are you sure you want to change the base?
Conversation
For host apps, we currently require applications to run inside a cgroup with a name that allows xdg-desktop-portal to derive an application ID from it. This does not work reliably, and while the situation can improve, it's unlikely to ever be fool proof, as it in theory requires every potential piece of software that launches other applications to know how to launch it in a compatible way. Cgroups is also a Linux specific API, which is problematic from a *nix wide portability perspective. To address this, introduce a host-only portal API that allows applications to register their D-Bus connections, associating them with an application ID. This moves back the burden of associating an application with an application ID back to the application itself, instead of the application launcher. Applications calling this overrides any applicion ID derived from the name fo the cgroup the application runs inside.
6c33ebe
to
cf508ac
Compare
As much as I admire your optimism, I have a pretty hard time believing apps will "fix themselves" by calling a D-Bus API (or using libportal) for the unsandboxed case. You're still asking application developers to deal with this case. Might as well ask them to call: setenv ("XDP_PROP_application_id", "com.example.App"); in their |
One could equally argue that apps only have to call |
For apps that wants to support running non-sandboxed that uses libportal or ashpd could perhaps use API like For apps that interact directly with the portal using D-Bus it seems like a trivial thing to make just another method call before anything else.
Using |
One could check that and skip Anyway, I do agree that calling one more portal helper function or calling one more dbus method when one wants to interact with portals shouldn't be much of an issue. |
For host apps, we currently require applications to run inside a cgroup with a name that allows xdg-desktop-portal to derive an application ID from it. This does not work reliably, and while the situation can improve, it's unlikely to ever be fool proof, as it in theory requires every potential piece of software that launches other applications to know how to launch it in a compatible way.
Cgroups is also a Linux specific API, which is problematic from a *nix wide portability perspective.
To address this, introduce a host-only portal API that allows applications to register their D-Bus connections, associating them with an application ID. This moves back the burden of associating an application with an application ID back to the application itself, instead of the application launcher.
Applications calling this overrides any applicion ID derived from the name fo the cgroup the application runs inside.
I'm not saying we should do this, but perhaps it is something we should consider doing. Relying only on cgroups is a noble idea, but it hasn't worked well so far, and while it's possible that at least a majority of cases can be handled by peeking at it and deriving the application ID, it's also likely that there will always be cases where it won't work, without any way for applications to get themselves to work.
Some downsides include:
Some upsides: