
On 03/23/2017 08:30 AM, Dimstar / Dominique Leuenberger wrote:
On Wed, 2017-03-22 at 18:47 +0100, Olaf Hering wrote:
My silly grep over 10k .spec files gives this list of directories where *.desktop files are stored. Who is the consumer of .desktop files and why are there some many different places to store them?
The question seems trivial - but is not
And: Is a simple "%_datadir/applications" not good enough for most of them? It would be so easy. And compatible.
the 'main' location for .desktop files shown by the various desktops is indeed /usr/share/applications (aka %_datadir/applications)
560 %_datadir/applications
13 %_kf5_configdir/autostart 11 %_datadir/mimelnk/application 8 %_kf5_sharedir/%name/extras/multimedia 7 %_kde4_servicesdir/ServiceMenus 7 %_datadir/applications/kde4 6 %desktopdir 6 %_kde4_servicetypes 6 %_datadir/xfce4/panel-plugins 5 %_kde4_servicetypesdir 5 %_datadir/kde4/services 5 %_datadir/autostart 4 %_libdir/gnome-settings-daemon-3.0/gtk-modules 4 %_kde4_appsdir/solid/actions 4 %_datadir/solid/actions 4 %_datadir/kservices5 3 %buildroot/%_datadir/applications
Those are very likely a bug
3 %_libdir/%name/share/applications 3 %_datadir/xgreeters 3 %_datadir/system-config-selinux 3 %_datadir/kde4/services/ServiceMenus 2 /usr/share/autoinstall/modules 2 %_kf5_servicesdir/ServiceMenus 2 %_kde4_servicesdir/phononbackends 2 %_kde4_appsdir/kwin 2 %_kde4_appsdir/konqueror/dirtree/remote
2 %_jvmdir/%sdkdir/jre/lib/desktop
Maybe this one is here and linked to a correct spot with update alternatives
1 /usr/share/xsessions 2 %_datadir/wayland-sessions 1 %_kf5_sharedir/xsessions
These are fine (beside the missing macro) this is what lightdm / gdm use to generate there desktop selection list
2 %_datadir/kservices5/ServiceMenus 2 %_datadir/kde4/services/phononbackends 2 %_datadir/gnome/wm-properties 2 %_datadir/gnome/autostart 2 %_datadir/gdm/greeter/applications
2 %_datadir/applications/YaST2 2 %_prefix/share/applications/YaST2 1 %_datadir/applications/kde
Sub directories of %_datadir/applications are allowed so these are ok, although the kde one should likely use one of the kde macros.
1 Swift/resources 1 /etc/xdg/autostart
This seems to be a valid autostart location although using /usr/share/autostart for consistency would be better
1 %yast_desktopdir/groups 1 %kdeprefix/share/applications 1 %gnome_prefix/share/applications
I presume these both expand to /usr/share/applications which is fine, whether they could use a better macro is another question though.
1 %gnome_prefix/share/application-registry 1 %gnome_datadir/applications 1 %_kf5_sharedir/locale/* 1 %_kf5_sharedir/akonadi/agents 1 %_kf5_sharedir/%name/extras/system 1 %_kf5_servicesdir/kded 1 %_kde4_servicesdir/qimageioplugins 1 %_kde4_appsdir/remoteview 1 %_kde4_appsdir/konqsidebartng/virtual_folders/services 1 %_datadir/tracker/miners 1 %_datadir/susehelp/meta 1 %_datadir/services/kded 1 %_datadir/remoteview 1 %_datadir/konqsidebartng/virtual_folders/services 1 %_datadir/kdm/sessions
Unless this is part of kdm id say there is a fair chance its wrong.
1 %_datadir/kde4/apps/ksmserver/windowmanagers 1 %_datadir/gdm/autostart/LoginWindow 1 %_datadir/appdata
erm - here should be NO desktop files - this is definitively wrong
1 %_datadir/akonadi/agents 1 %_datadir/Thunar/sendto
Most of the things are fine - KDE just uses their own set of macros; a few things are indeed bugs. Please file those as such so they can be verified / fixed.
Cheers Dominique
Those are the ones I remember off the top of my head anyway. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B