Kok, Auke wrote:
Kris Warkentin wrote:
The freedesktop spec speaks of various escapes and special characters within .desktop files but it doesn't explicitly seem to talk about shell expansion. I've observed that moblin-panel-applications doesn't seem to expand them. For example, if you have "Exec=my_file_man $HOME", my_file_man is run with the literal argument $HOME.

I suspect that moblin-panel-applications is doing the correct thing but I thought someone here might have better knowledge of the spec.


checking 
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html,
I can see that $HOME will have to be written as \$HOME in the first place, but,
second, the desktop specification does not REQUIRE the task executing the 
desktop
file to "interpret" the contents of the arguments and replace it.

The task itself being executed will certainly not expand it either...

Therefore, desktop files should not be written with environment variable
references in them, because it's uncertain if they will be expanded by the task
interpreting them.

uxlaunch nor moblin-applications-panel currently do this, and I do not know of 
any
other launcher that does so.

In short: the `Exec=` line should be considered not a shell command line. Since
"plain launchers" will never be executed with any %f/%u etc parameter set, it's
best not to have any variable component in the options either.

Since the spec does not mandate that the Exec line is passed through 'sh -c', 
you
should assume it is not.

Thanks. That's pretty much what I thought. I think our launcher is being a little too 'clever' for its own good.

cheers,

Kris

_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to