Should .desktop files have executable permissions?
Jonas Stein
news at jonasstein.de
Sun Jun 25 12:22:02 UTC 2017
Thank you for the link.
There is software using
a) executable .desktop files
b) non executable .desktop files
c) mixed a) and b) in one software package.
This is not very satisfying from the perspective of a distribution which
wants to distribute a consistent Linux to the community.
I also think distributions should avoid to change the execution bits.
An advice or an extension of the .desktop standard would be the best
solution for everyone.
Can you imagine any reason, why a distribution should not add a shebang
#!/usr/bin/env xdg-open
in the first line of all .desktop files and set the executable bit?
The definition of the comment [2] would support this strategy very well.
> I can't find the standard on that too.
> But some desktops implement the concept of authorized (trusted) .desktop
> files, not sure that the requirements are uniform across desktops though.
> Eg. on KDE desktop file is authorized if either if these applies: [1]
> 1. Desktop file is in standard location
> 2. Desktop file has root owner
> 3. The calling process has executable permission on that desktop file
[1]
https://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/classKDesktopFile.html#ab9222da1ca239fc3847d31833bc45552
[2]
https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#comments
Best,
--
Jonas Stein
More information about the xdg
mailing list