Re: .desktop file execution



Dan Korostelev wrote:
Sorry, if this list is not where I should ask this kind of question, but
is there a way to execute .desktop files thru command line. Something
like "desktop-exec program.desktop"?

You could use the following:
command=`grep '^Exec=' foo.desktop | head -n 1 | sed 's/.*=//'`
eval "$command"

Issues:
- Only works with Application type .desktop files.
- Does not support substitutions like "%U" in the Exec field.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]