Proposed extension to Desktop Entry Standard
dfaure at trolltech.com
Mon Oct 18 20:31:47 EEST 2004
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).
For instance I had this problem with trash.desktop where an action would have
"Exec=ktrash -empty", where ktrash is an application that handles the trash.
We don't want it to be launched as "ktrash -empty /home/dfaure/.kde/Desktop/trash.desktop"
just because it's called from that .desktop file.
Oswald suggested to add %0 (percent zero) to the specification,
meaning "no path or URL added automatically here", i.e. disable the implicit adding of %f.
So I would be able to write
Exec=ktrash -empty %0
and %0 would be expanded to nothing.
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