Skip to content

Instantly share code, notes, and snippets.

@kui
Created June 13, 2012 06:34
Show Gist options
  • Star 33 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save kui/2922285 to your computer and use it in GitHub Desktop.
Save kui/2922285 to your computer and use it in GitHub Desktop.
Eclipse Shortcut for Ubuntu

Eclipse Shortcut for Ubuntu Unity

a shortcut to run Eclipse on Ubuntu Unity and to register Eclipse with the left Launcher

Installation

In your terminal,

cd ~/.local/share/applications
wget https://gist.github.com/raw/2922285/eclipse.desktop
chmod u+x eclipse.desktop
vim eclipse.desktop
# edit eclipse.desktop to replace "<ECLIPSE_DIR>" with your eclipse directory

Register Eclipse with Unity Launcher

  1. In your terminal, xdg-open ~/.local/share/applications to open the directory with the file browser
  2. Drag and drop the eclipse.desktop on Unity Launcher
# Eclipse Shortcut
# https://gist.github.com/2922285
[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=<ECLIPSE_DIR>/icon.xpm
Exec=<ECLIPSE_DIR>/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse
@vhuber
Copy link

vhuber commented Apr 13, 2019

Thank you

@r-rachuri
Copy link

It worked, thank you!

Copy link

ghost commented Jun 13, 2019

Didn't work for me..
eclipse is installed in "/home/username/eclipse/eclipse-jee-2019-03/eclipse" directory
i tried the same procedure but it didn't work

@rajeevshukla
Copy link

rajeevshukla commented Jul 20, 2019

@Maliksajad004, Sometimes it does not work straight.

Below is how you can fix this problem
$gsettings get org.gnome.shell favorite-apps
you will see something like -
['org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'google-chrome.desktop']

Now add eclipse.desktop in this your favorite app using :
$gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'google-chrome.desktop','eclipse.desktop']"

You will see the eclipse icon on the favorite bar and when you click on it, It should work.

@sunilks23
Copy link

@rajeevshukla

Thanks. It worked for me.

@FanchGadjo
Copy link

Thank you ! 👍

@nbmhoang
Copy link

nbmhoang commented Mar 2, 2020

Worked on Ubuntu 18.04. Thanks!

@phenrimachado
Copy link

Worked on Ubuntu 20.04. Thanks for creating that repository, I loved!

@kikeflowers
Copy link

Thank you, works for Spring Tool Suite 👍

@raza-basit
Copy link

Didn't work for me..
eclipse is installed in "/home/username/eclipse/eclipse-jee-2019-03/eclipse" directory
i tried the same procedure but it didn't work

In your case Exec value will be
Exec=home/username/eclipse/eclipse-jee-2019-03/eclipse/eclipse

@r4lly99
Copy link

r4lly99 commented Oct 6, 2020

Thank you , it's work

@gordontytler
Copy link

It worked for me on 18.04 except for the drag and drop of eclipse.desktop to the launcher.
Instead, click on Activities, search for Eclipse, right click -> Add to favourites.

@rodrigobittencourtlima
Copy link

Thank you , it's work!

@CodeWithSouma
Copy link

Thanks

@kamapu
Copy link

kamapu commented Nov 13, 2021

This is great! I was struggling with the default installation because the respective button always opened a new button on the side bar of Ubuntu for every opened workspace and there was no way to know, which button belonged to which workspace. In this one you all active workspaces just in one button and select them by their names.

@aino-gautam
Copy link

@Maliksajad004, Sometimes it does not work straight.

Below is how you can fix this problem $gsettings get org.gnome.shell favorite-apps you will see something like - ['org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'google-chrome.desktop']

Now add eclipse.desktop in this your favorite app using : $gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'google-chrome.desktop','eclipse.desktop']"

You will see the eclipse icon on the favorite bar and when you click on it, It should work.

that did the trick.. neat :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment