When editing the Applications menu, I see for some applications their commands have %U
such as gedit %U
and gnome-mplayer %U
, but others don't such as gcalctool
.
I was wondering what %U
means when calling a command, and when it is needed and when it is not? Thanks!
This is motivated from my previous question, where I followed a reply but did not make it work.
It's a parameter for the Exec key in .desktop files (defined in the Desktop Entry Specification) that describes how arguments to the program (from the file manager/program launcher, e.g. multiple selected files) should be handled:
So, e.g.,
/usr/share/applications/gedit.desktop
contains:which means that arguments to gedit will be treated as a list of URLs (or local files).
For a complete list of possible parameters, see The Exec key.