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'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:

~/opt/eclipse/eclipse

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

[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=eclipse
Exec=./opt/eclipse/eclipse
Terminal=true
Categories=Development;IDE;Java;

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?

Update------------------

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

enter image description here

share|improve this question

1 Answer 1

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:

/root/opt/eclipse/eclipse
share|improve this answer
    
thanks for the reply. I changed it now but when I click the eclipse icon nothing happens.. strange? –  Dean Grobler 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 Grobler Nov 1 '12 at 9:44
1  
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
1  
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

 
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.