Skip to content

Rename gnome-software-service.desktop to the app ID

Phaedrus Leeds requested to merge mwleeds/fix-autostart-desktop-name into main

Currently we install three .desktop files:

  • org.gnome.Software.desktop which is the one used for the shell's list of applications
  • gnome-software-local-file.desktop which is used for opening local files
  • gnome-software-service.desktop which is put in /etc/xdg/autostart/ so that "gnome-software --gapplication-service" is run in the background at the start of a user session.

This commit renames the autostart one to org.gnome.Software.desktop. This change is necessary so that the systemd scope created for gnome-software will follow the standard laid out by https://systemd.io/DESKTOP_ENVIRONMENTS/ which says that the Application ID should be in the unit name. With this change the scope goes from e.g. "app-gnome-gnome\x2dsoftware\x2dservice-9502.scope" to e.g. "app-gnome-org.gnome.Software-2248.scope". Both before and after this commit, the scope and process are the same for the background service and for the graphical application when/if it is launched.

Having the scope (cgroup) in the right format is important because I am working on getting xdg-desktop-portal to use the cgroup of a process to determine its app ID[1], and the app ID is then used for checking permissions, including in the dynamic launcher portal which will specifically allow the app ID "org.gnome.Software" for one of its methods.[2]

An interesting historical note: gnome-software-service.desktop used to have "Exec=${libexecdir}/gnome-software-service" before "--gapplication-service" came along, so it used to make more sense that it was named as such.

I have tested this change; starting gnome-software in the background and via gnome-shell work as expected.

[1] https://github.com/flatpak/xdg-desktop-portal/pull/719 [2] https://github.com/flatpak/xdg-desktop-portal/pull/696

Merge request reports