Binary name in the desktop file

Kevin Krammer krammer at
Thu Dec 26 03:51:56 PST 2013

On Thursday, 2013-12-26, 11:33:13, Jerome Leclanche wrote:
> On Thu, Dec 26, 2013 at 11:25 AM, Kevin Krammer <krammer at> wrote:
> > On Thursday, 2013-12-26, 10:56:11, Jerome Leclanche wrote:
> >> I'd really like to be able to get the binary name from desktop files
> >> (eg a way to "start without any argument"). Current implementations
> >> rely on getting the first word of the Exec key OR replace %f etc by
> >> nothing, but that fails for things such as these:
> >> 
> >> Exec=env WINEPREFIX="/home/adys/.local/share/wineprefixes/default"
> >> wine start /ProgIDOpen chm.file %f
> > 
> > What do you mean when you say "fails"?
> > That the command won't launch if %f is replaced by nothing or that taking
> > the first string fails to see that the launched program is /usr/bin/env?
> Sorry, I meant the usual way of getting the binary name (which in this
> case would be "env").

Ok, thank you for clarifying.
However, I don't see how the simple algorith of taking the first word could 
possibly fail to return 'env'.
That is the most simple case: no path, no escaped or quoted whitespace, just a 
simple alphabetic sequence.

Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the xdg mailing list