Proposed extension to Desktop Entry Standard
dfaure at trolltech.com
Mon Oct 18 23:57:17 EEST 2004
On Monday 18 October 2004 21:56, Waldo Bastian wrote:
> On Monday 18 October 2004 19:31, David Faure wrote:
> > When the Exec lines doesn't contain any special arguments like %f %F %u or
> > %U, %f is assumed. This is fine in most cases, but not when launching an
> > application from a .desktop file's Action. In that case the path to the
> > .desktop file will passed to the application, but it might not want any
> > argument (i.e. it doesn't care which .desktop file it's being called from).
> I don't think the Action part is part of the actual spec, is it?
It sort of is, although not fully specified.
Looking for Action shows
1) the Actions key in the table
2) an example in appendix A.
[Desktop Action Inverse]
Exec=fooview --inverse %f
Name=Foo Viewer (inverse image)
The example is broken though, the Actions key itself is missing.
Does anyone else than KDE support the Actions field?
> That would not be compatible with previous versions of the spec. Why not just
> disable the implicit adding of %f for Actions?
That would not be compatible with previous versions of KDE :(
Maybe we should use Exec[$b]=... instead - where b is any character that
doesn't have a special meaning yet, and which would mean "no % expansion
at all here"? Since the other [$x] things are not part of the spec, this would
be a KDE-specific fix then, not a spec change (and this is fine since trash.desktop
is most certainly kde-specific).
> The spec doesn't say that %f should be assumed in the first place.
That's a bug in the spec IMHO - we always assumed %f to be default, for the
normal case of an Exec line (not talking about special actions here).
Otherwise, what would happen when associating a file with an application,
and the application's Exec line says e.g. Exec=gimp ? This is soooo common,
the spec should really say "%f" is assumed; otherwise many existing .desktop
files will suddenly be broken.
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the xdg