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'm following this tutorial located here on how to create a launcher for eclipse in unity. Everything is going pretty well so far, I've managed to successfully create the launcher but when I click on it, my system complains that the path to the exec is wrong.

My exec for eclipse is located here:


And if you look at the tutorial you have to create a file and set it's contents like so:

[Desktop Entry]
Comment=Eclipse Integrated Development Environment

In my case I have to provide the full location for the exec and there are a number of things that I tried that didn't work I set 'exec' to 'Exec=~/opt/eclipse/eclipse' , 'Exec=/opt/eclipse/eclipse' and 'Exec=root/opt/eclipse/eclipse' and none of these worked..

What should I set it to in order to fix the path so that my luancher works?


I tried to list those 2 directories and what i get is this:

enter image description here

share|improve this question
up vote 1 down vote accepted

For every user, ~/ signifies its home folder. For every regular user, that would translate to /home/username, for example, /home/dean, but for the root user, to /root.

Since the executable is located in toot's home folder, the full path will be as follows:

share|improve this answer
thanks for the reply. I changed it now but when I click the eclipse icon nothing happens.. strange? – Dean Gibson Nov 1 '12 at 9:25
Well, you can verify the executable is actually there, by running ls /home/dean/opt/eclipse/eclipse. – mikewhatever Nov 1 '12 at 9:29
No such file or directory it says...hmmm – Dean Gibson Nov 1 '12 at 9:44
Since you've changed to the root user in the terminal, the relative path (in other words ~/) starts in /root, which is the home folder for the root user. So, in your particular case, the executable and everything else is probably located in /root/opt/eclipse/. – mikewhatever Nov 1 '12 at 10:46
Yep, that said, /root is hardly a proper place for eclipse or any other program. I'd move everything to /opt with cp -r /root/opt/eclipse /opt. The path will then be /opt/eclipse/eclipse. – mikewhatever Nov 1 '12 at 11:07

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.