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? > 1. Add an Environment key to desktop files, like systemd's service > files. This would be neat and cleaner for such programs. That exec key > would trip up launchers that parse the command line in addition to the > name. Annoying! But it doesn't really fix my issue. > > 2. Potential solution #1: Add an ExecNoArgs (or similarly named) key. > If not found, it would be assumed to be the same as the Exec key with > %f/%F/%u/%U replaced by nothing. Clean, backwards-compatible, easy to > implement. > > 3. Potential solution #2: Add a Binary key and add a %b token for the > Exec key so that you can do something like > Binary=/usr/bin/foo > Exec=%b --files=%F > > Not backwards compatible but more potential. On the other hand, this > could be inappropriately used for things such as wine (where Binary > would be /usr/bin/wine but should never be executed without args)... Not backward compatible is a no-go IMHO. It would take years before software vendors could use the new format. Cheers, Kevin -- Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
