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 1


You cannot access such environment variables in a .desktop file. What should work, is to write a wrapper script and start this instead


and the wrapper script would call

  • 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.
    – htorque
    Sep 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
  • .desktop files are not scripts of any kind. Sep 4, 2011 at 3:54
  • @JoErlendSchinstad Right, removed the second suggestion.
    – htorque
    Sep 4, 2011 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.