Retrieve Application ID from PID's cgroup
This commit adds an optional dependency on libsystemd and, when available, uses it to attempt to find an application ID even for processes which are not Snap or Flatpak sandboxes. This is not always successful, so we still need to handle the case of an empty app ID for an XdpAppInfo. Since this is not a perfect solution for finding the app ID, we may eventually want to introduce a way for *unsandboxed* processes to specify their own app ID, perhaps a portal-wide SetAppID() method. This is analogous to the security model gnome-shell has: if a process is sandboxed use that app ID, and otherwise use information that is under the control of the application (e.g. WM_CLASS, GApplication ID, etc.). Helps: #579 (Originally authored by Carlo Castoldi, re-done by Phaedrus Leeds)
Loading
Please register or sign in to comment