Define Eclipse shortcuts in Unity (Ubuntu)

I wanted to define Eclipse shortcuts in Ubuntu pointing to my individual workspaces.

You can define Eclipse shortcuts including parameters, e.g. the -data parameter via a .desktop file. Once defined you can drag the file into the Dash of Unity to get a new entry (including your shortcuts).

[Desktop Entry]
Icon=application-x-executable
Name=eclipse
Type=Application
Exec=/home/vogella/Eclipse37/eclipse -data /home/vogella/workspace/docu

X-Ayatana-Desktop-Shortcuts=Docu;vogella;
 
[Docu Shortcut Group]
Name=Docu
Exec=/home/vogella/Eclipse37/eclipse -data /home/vogella/workspace/docu
TargetEnvironment=Unity

[vogella Shortcut Group]
Name=vogella
Exec=/home/vogella/Eclipse37/eclipse -data /home/vogella/workspace/vogella
TargetEnvironment=Unity

This should create an entry in the menu with two quick links to your workspaces.

Thanks to Holger Joest for helping with that on G+.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse and tagged , , . Bookmark the permalink.

5 Responses to Define Eclipse shortcuts in Unity (Ubuntu)

  1. Daniel says:

    Genau dass, wonach ich die ganze Zeit gesucht hab – und ich wusste nicht mal, dass es so einfach ist…

    Danke!

  2. Lars Vogel says:

    Also icons could be defined: Icon=/home/vogella/Eclipse37/eclipse/icon.xpm

    Tip via twitter from @theNatd

  3. eselmeister says:

    Hi Lars,

    cool stuff. I’m using this selfmade Unity launcher for Eclipse 3.7.2:

    [Desktop Entry]
    Name=eclipse-3.7.2-rcp
    GenericName=Eclipse 3.7.2 (Indigo SR2) RCP
    Comment=Eclipse Indigo for RCP developers
    Exec=/opt/Eclipse/3.7.2/RCP/eclipse/eclipse
    Terminal=false
    Type=Application
    StartupNotify=false
    Icon=/opt/Eclipse/3.7.2/RCP/eclipse/icon.png
    Categories=GNOME;Application;Development;

    Cheers,
    eselmeister

  4. Daniel says:

    I already used a unity launcher for that since 11.04, but what I disliked since then was the Eclipse logo.
    Don’t misunderstand me: I like the logo in common, but within the Unity launcher it looks a little misplaced, since the logo fills the whole area and the effects like backlight and so on are not visible.
    I simply created a copy and removed all the background from the original for more transparancy. This creates some pixel-steps within the logo, when you view it in a high zoom, but I don’t care: With the symbol size of the launcher set to 32 it looks good enough!

  5. If you are having problems with adding eclipse to the unity launcher (like the eclipse icon not displaying in the unity launcher), you can refer this blog post.
    http://chanakaudaya.blogspot.com/2012/04/how-to-pin-eclipse-to-ubuntu-1104-unity.html

Comments are closed.