drop-in files mechanism to extend .desktop files
Submitted by Patrick Schleizer
Assigned to Allison Lortie
Please consider a drop-in files mechanism to extend '.desktop' files. Extend by drop-in, not override.
What I mean...
For example Debian ships a file /etc/xdg/autostart/pulseaudio.desktop that we would like to extend by a single line 'NotShowIn=KDE;'.
We would like to avoid appending/writing to /etc/xdg/autostart/pulseaudio.desktop directly. For one, this often causes an interactive dpkg conflict resolution dialog. (dpkg wondering how to deal with upstream and local changes, asking the user to keep the locally changed file or to install the updated file by upstream, which is a usability issue.) Also, modifying files owned by other packages is against Debian policy. Now, we could copy around files and modify XDG dirs, but these aren't great solutions.
The same goes for '.desktop' files in /usr/share/applications folder. We would also like to extend those.
Therefore it would be nice if one wanting for example to extend /usr/share/applications/nm-applet.desktop could simply add a /usr/share/applications/nm-applet.desktop.d/30_qubes.conf drop-in file. Vice versa to /etc/xdg/autostart/pulseaudio.desktop.d/30_qubes.conf.
systemd has a similar mechanism. For example if we want to extend /lib/systemd/system/spice-vdagent, we can simply ship a drop-in file /lib/systemd/system/spice-vdagent.service.d/30_qubes.conf without ever conflicting with upstream changes.
Such a feature would be very useful for the Debian Linux derivative distributions Qubes and Whonix.