I have created quicklists very successfully but one thing is a problem, I have tried to use $HOME in the Exec= line but it is not accepted, I have to enter the full /home/user path. This seems at odds with most other scripts.
1 Answer
You cannot access such environment variables in a .desktop file. What should work, is to write a wrapper script and start this instead
Exec=/path/to/wrapper
and the wrapper script would call
$HOME/whatever
-
htorque, tried your helpful suggestion, and some others of my own devising, but none worked, guess I have to type out in full the path - a shame that custom .desktop files are not transportable by having a $HOME option but it's a small price to pay Sep 3, 2011 at 11:44
-
The first method definitely works. Make sure your wrapper starts with
#!/bin/bash
and that it's executable.– htorqueSep 3, 2011 at 12:05 -
htorque, you are quite correct. Commenting 'but none worked' was a hasty comment; I do link this .desktop file to a bash script that calls some small scripts; however, some shortcuts don't point to smaller scripts, but are one-liners, and these were the concern. My way around this is as you pointed out, is point to wrapper scripts in shortcut lines, instead of putting one-liners. I just find this a bit clunky - having used $HOME in scripts for so long. I may experiment with passing variables to the base script via the shortcuts. My launcher button brings up my Zenity menu, works well. Sep 3, 2011 at 22:26
-
-