Desktop file spec improvements (was: Binary name in the desktop file)

David Faure faure at kde.org
Tue Dec 31 02:39:34 PST 2013


On Sunday 29 December 2013 14:11:03 Ryan Lortie wrote:
> To me this looks like a really large amount of added complexity for
> little gain.

I agree.

Plus, having two complex commands in ExecWithNoFiles and ExecWithFiles
doesn't even help "looking up applications by executable name" (the use case 
shortened as "runners" earlier).

> Another possibility: install two desktop files.  Make one of them
> NoDisplay with declared mime types and have its Exec= line be the one
> for opening a file.  Mark the other one as supporting no mime types, but
> being displayed and use its Exec= line for starting the app without a
> file.

Exactly. This is the existing and working solution for the "--file %f" issue.


Jérome, this is exactly why we've all been asking "which problem are you 
trying to solve exactly", because the solutions differ depending on the actual 
problem. It's not fair to get frustrated because we're trying to understand 
what you're actually trying to solve here.

The problems I do see (matching desktop files by executable name, and checking 
if the executable exists before or after attempting to execute the Exec line) 
can both be solved with a TryExec key. It is missing in many many .desktop 
files, but this means solving this doesn't require a change in the spec, it 
only requires everyone to add that TryExec key in most desktop files.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list