Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to have a relative path to my home directory in my launcher script.

Example (working):

Exec=terminator -x /home/patrick/Dropbox/System/Scripts/

Example (not working):

Exec=terminator -x ~/Dropbox/System/Scripts/

Is there any way to use variables for the home directory of the current user in a Launcher script?

share|improve this question
The variable $HOME isn't good ? – nab59 Sep 12 '12 at 11:21
up vote 1 down vote accepted

Use $HOME instead of ~ (tilde).

Tilde is bash specific. In bash tilde expands to the value of $HOME. Outside of bash tilde has no special meaning.

Read the bash manual about tilde expansion for more details.

share|improve this answer
$HOME is working, thank you. I did not know about the tildes bash specifity. – Patrick Sep 13 '12 at 13:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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