On Wed, 2017-03-22 at 18:47 +0100, Olaf Hering wrote:
> My silly grep over 10k .spec files gives this list of directories
> *.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
> Is a simple "%_datadir/applications" not good enough for most of
> 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)
The KDE Team, in the spirit of how KDE3 was handled, basically kept
their set of macros; kf5_applicationsdir is /usr/share/applications.
The idea there was an easy 'move' to /opt should this ever be needed
Same fileformat to be stored, different meaning - but you know that
anyway. XDG compliant DEs will auto-start all .desktop files in there
that are matching either the OnlyShowIn= or not maching the NotShowIn=
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
>> *.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
>> Is a simple "%_datadir/applications" not good enough for most of
>> 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
>> 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/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.
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.
Those are the ones I remember off the top of my head anyway.
On Thu, 2017-03-23 at 08:56 +0100, Olaf Hering wrote:
> The idea there was an easy 'move' to /opt should this ever be
> > needed
> Nothing moves to /opt. If anyone needs that adjusting _prefix (and
> consequently _datadir) is the way to go, no spec file must be
> adjusted for such special case.
That's what was said in other cases for legacy desktops too - things
can happen - that's all
> > >
> > Most of the things are fine - KDE just uses their own set of
> > macros; a
> They must not use special macros. Anyway, the last mass fix was
> rejected, so I will leave it alone.
"must not" ? I can't recall any of our guidelines telling that this
would be forbidden in our setup. It's definitively up to the
maintainers to decide.
On Thu, 2017-03-23 at 09:33 +0100, Olaf Hering wrote:
> Am Thu, 23 Mar 2017 09:20:40 +0100
> schrieb Dominique Leuenberger / DimStar <[hidden email]>:
> > "must not" ? I can't recall any of our guidelines telling that this
> > would be forbidden in our setup. It's definitively up to the
> > maintainers to decide.
> Its common sense to not invent special macros for the sake of it,
> even if we have the liberty to do so. As said earlier,
> %_datadir/whatever is enough.
As long as the packaging guidelines do not prohibit it, packagers are
free to do what they feel is right in this regards.
Not all packages are exclusively openSUSE systems - once thinking
beyond, those team MIGHT have a reason to do so.
Or should I just interpret your message as a 'vote for change of the
packaging guidelines' ?