requiring .desktop files to be executable ?

Andras Mantia amantia at kde.org
Fri Feb 13 11:28:14 GMT 2009


On Friday 13 February 2009, David Faure wrote:
> Kevin Ottens and I had the idea of doing this slightly differently
> btw: we could require +x when the desktop file is not in a standard
> directory for desktop files. This would allow to catch "save this
> file in your home or on your desktop" without breaking all the
> desktop files already distributed with applications.

I'd say to be consistent, and require that every desktop file needs to 
have the exec bit set. The only problem might be that other (non-KDE) 
applications installing desktop files might not be executable when KDE 
makes the switch. Ok, in this case the above makes sense until the 
standard requires them to be executable.
 The real problem anyway is the upgrade path after this change is 
introduced. For the global desktop files this can be left up to the 
distributions to change the permission for those (and anyway they are 
less a threat unless you run your system as root), but what happens with 
the desktop files in the $HOME directory (think desktop, autostart)? 
Asking the user to change each and every file is not user friendly. Mass 
changing the permission to be executable in startkde is not that safe 
and slows KDE startup down. Running an app on startup to ask for this 
change (and warn about the problems in case they have already a bad 
desktop file) is slightly better, the app can remove itself from 
autostarting after it was run at least once.

I vote for requiring the +x bit set, after all I did the same for 
Kommander scripts, which are kind'a similar (text files run in an 
interpreter on click). ;)

Andras





More information about the kde-core-devel mailing list