[ubuntu-za] .desktop file

Charl Wentzel charl.wentzel at vodamail.co.za
Mon Jan 9 15:56:32 UTC 2012


Hi Guys

I'm trying to create a "nice" shortcut for Eclipse in my Unity Launcher.
So I did the following:

1. I created a file eclipse.desktop in /usr/share/applications.  The
content is as follows:

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 3.7 Indigo
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

[C++ Shortcut Group]
Name=C++ Workspace
Exec=eclipse -data ~/eclipse-c
TargetEnvironment=Unity

[PHP Shortcut Group]
Name=PHP Workspace
Exec=eclipse -data ~/eclipse-php
TargetEnvironment=Unity

2. I started eclipse and then right-clicked on its icon in the launcher
and clicked "Keep in Launcher".

3. Logged out and back in again.

Everything works except for the right-click menu where I'm expecting to
see two additional options:
   - C++ Workspace
   - PHP Workspace

I've change the Icon and Name parameter and found that they changed
accordingly in the launcher.  So this file is the one affecting the item
in the launcher, but I can't figure out why I don't get my right-click
options.

I tried the following:
- copied the file to ~/.local/share/applications, but this made no
change
- copied the contents from another destkop file, but this gives me a
blank icon in the laucher with no name.

Any ideas?

Regards
Charl




More information about the ubuntu-za mailing list