So I downloaded the .tar.gz for eclipse, extracted and set it up.

I created a .desktop file so I could dock it in unity.

I then want to be able to have a bash script open the program from the terminal. So i did alias eclipse=/opt/eclipse/eclispe

This opens eclipse but the icon in unity is a ? mark, can this be made into the eclipse icon?


If you have an icon defined by the .desktop file, I would have thought that would work.

Personally, when I have non-standard programs on my system, I put a symbolic link to the executable in a directory in my $PATH - I tend to put them in $HOME/bin. For example, with the film script writing software celtx, I created a symbolic link to the executable (in this case $HOME/.celtx/celtx) within $HOME/bin named celtx. Then, I make the .desktop file call simply 'celtx' rather than the /path/to/the/executable. Thus, the .desktop file looks like this:

[Desktop Entry]
Comment=Write movie and television scripts

This works exactly as you would think it should (launched either from Unity, or from the terminal, I get the icon defined in the .desktop). I would have thought that your method of using an alias would work just the same (maybe if you change the Exec line in your .desktop to call the alias, rather than the full /path/to/command?).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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