Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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'm still using Gnome 2, and I want to add a launcher to gnome-panel that will run: ~/bin/

However, when I tried that, it gives me: Failed to execute child process "~/bin/" (No such file or directory)

I also tried $HOME/bin/, same issue.

I don't want to add the absolute path to the script, I want to add a path relative to my home dir.

(also, ~/bin is added to PATH at .bashrc and .bash_profile, so it isn't added while gnome starts up)

Extra information:

$ ls -l ~/bin/ 
lrwxrwxrwx 1 username group 25 2012-01-17 18:26 /full/path/to/home/username/bin/ -> ../other_scripts/*

In other words, ~/bin/ is a symlink to a script in another directory, and that script has the +x bit set. I can run ~/bin/ without problems inside a terminal, so the issue is not in the script.

What I'm trying to do is to right-click on the gnome-panel and add a custom launcher. Then I write ~/bin/ as the command, but when I try to click on the launcher, it gives me the errors I mentioned above.

share|improve this question
I'm not sure if this is the problem, but is the script set as executable? – David Oneill Jan 31 '12 at 14:35
You have a 'bin' directory in every user's home directory? Could you provide the output of ls -l ~/bin/ – jasperado Jan 31 '12 at 14:46
IMO, in scripts it is best to use the full path to your script. – bodhi.zazen Jan 31 '12 at 16:19
Updated the question with requested information. – Denilson Sá Jan 31 '12 at 16:30
Also, I don't want to use the full path because this home is shared with another computer, and in that other computer the home directory is in another path. – Denilson Sá Jan 31 '12 at 16:50

The panel launchers don't do the same expansion of special characters as bash does, so ~ and $HOME don't do what you think...

The easiest solution is probably to use bash -c "~/bin/" as the command.

share|improve this answer

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.