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.

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?

share|improve this question

1 Answer 1

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]
Type=Application
Name=Celtx
Exec=celtx
Comment=Write movie and television scripts
Categories=Applications
StartupNotify=true
Icon=/home/evilsoup/.celtx/celtx/icons/default48.png

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?).

share|improve this answer

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.