Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

What are the %U and %u parameters in desktop files?

+2
−0

Desktop files always have either %u or %U as an argument for the program being launched. E.g. here's a line from my firefox.desktop:

Exec=/usr/lib/firefox/firefox %u

What does it mean?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+2
−0

They are defined in the Desktop Entry Specification. In fact there are also %f and %F options.

They tell the desktop manager how the program handles multiple files. Like if I select a bunch of files in Dolphin and select "Open with Firefox".

The small %u means that the program expects only a single argument at a time. So invoking with multiselect is actually launching the program several times, once with each file as an argument.

Capital %U means that the program can take them all as a list in a single go.

%f and %F is just the same thing but stands for local Files whereas U is for URL, which works for local files also. This is probably why you don't see much f's.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »