5

Can't make my custom Eclipse launcher work on 13.10 (fresh install). See screenshot below:

enter image description here

The custom eclipse launcher on panel doesn't work.

Double click on Eclipse.desktop from file manager works but adds a new launcher with grey "?" icon. Eclipse is managed by the new grey launcher, not mine.

I can't just block and use the "?" launcher because it opens eclipse directly while I need to run my command.

I followed the following steps:

1) Unzipped eclipse into /opt/eclipse (repository is not an option).
2) Created custom gtk theme in /opt/eclipse/gtkrc-2.0-eclipse
3) Created /opt/eclipse/run.sh (the content is in the picture)
4) Installed gnome-panel and created a new launcher with custom icon and run.sh command
5) Opened the file manager, navigated to /usr/.../application and
   dragged-dropped Eclipse.desktop onto panel

Hope it's all clear. How can I make my custom launcher work as expected or, at least, make the grey one run my command?

Edit: Following the Sushantp606's instructions I got the launcher work, but the grey laucher still opens when I run eclipse. Then... I looked for eclipse launchers with

locate .desktor | grep eclipse 

and found this:

~/.local/share/applications/eclipse.desktop
/usr/share/app-install/desktop/eclipse-platform:eclipse.desktop

I changed the Icon in both with the right path and now the launcher with grey icon has the eclipse icon as expected. So dropped the one I've created.

2
  • you want icon in unity??
    – Sukupa91
    Nov 28, 2013 at 17:49
  • I want a launcher with the png icon that I have downloaded into /opt/eclipse.
    – holap
    Nov 28, 2013 at 18:30

2 Answers 2

8

After your first step make a link by using -

sudo ln -s /opt/eclipse/eclipse /usr/bin/eclipse

Creating unity launcher icon-

sudo gedit /usr/share/applications/eclipse.desktop

paste the following lines as it is-

[Desktop Entry]
Version=1.0
Name=Eclipse
Exec=env UBUNTU_MENUPROXY= eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Type=Application
Categories=IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=env UBUNTU_MENUPROXY= eclipse
TargetEnvironment=Unity

For custom theme make the file in home as-

gedit .gtkrc-2.0

and paste the information of theme.

now search for eclipse in dash, drag it to unity launcher . done.

5
  • Thanks for quick unswer, I'm home now so will try tomorrow. Anyway ~/.gtkrc-2.0 will change the theme for every application, right? I want a custom theme only for eclipse and keep the other applications look as the default.
    – holap
    Nov 28, 2013 at 18:29
  • in my case it did not changed everything , changes for just eclipse and sts.
    – Sukupa91
    Nov 28, 2013 at 18:35
  • Followed your instructions and it works better. The launcher now run eclipse and the program has the right theme. But... when eclipse start the grey launcher comes back. When I look for Eclipse in the dash I get both launchers, mine and the grey one. The latter is for Eclipse 3.8 which is not installed. This is the screen imageshack.com/a/img822/7897/kbp2.png
    – holap
    Nov 29, 2013 at 8:01
  • actually its the problem with 13.10 , thats why did some changes in eclipse.desktop. now just enjoy programming.
    – Sukupa91
    Nov 29, 2013 at 8:37
  • You can do that in ~/.local/share/applications/ too, if you want to fix it for the user only, specially when not being sudoer.
    – Theolodis
    Feb 16, 2015 at 9:28
1

with Eclipse 4.4 (Luna), I found that simply moving the unzipped Eclipse install from my home directory to /opt was sufficient for it to appear on the Launcher.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .