Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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/belzebub2hanibal.sh

Example (not working):

Exec=terminator -x ~/Dropbox/System/Scripts/belzebub2hanibal.sh

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

1 Answer 1

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

 
discard

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.