0

I am totally new to Ubuntu/Linux and I want to create a link on a desktop (is this called an application launcher?).

I created a .desktop file placed on the Desktop with this content but it doesn't start the application:

[Desktop Entry]
Type=Application
Comment=GIT Version Control System 6.0.3
Icon=/usr/local/bin/develop/versioncontrol/smartgithg-6_0_3/bin/smartgithg-64.png
Exec=/usr/local/bin/develop/versioncontrol/smartgithg-6_0_3/bin/smartgithg.sh
Terminal=false
Categories=Development;IDE;Java;
Name[en_US]=SmartGIT 603

ll outputs...

-rwxrwxr-x  1 diulrich diulrich  321 Jun 18 18:35 SmartGIT 603.desktop*

I am using Ubuntu 12.04

Also, I have checked 'Allow executing file as program' in the Permissions tab when right-clicking the desktop symbol.

Update:
I tried to set required environment variable SMARTGITHG_JAVA_HOME in .bashrc, .profile and in /etc/environment without success.

Modifying the EXEC property in the .desktop file this way:

Exec=env SMARTGITHG_JAVA_HOME=/usr/lib/jvm/jdk1.7.0_40 /usr/local/bin/develop/versioncontrol/smartgithg-6_0_3/bin/smartgithg.sh

I am able to start the application by clicking the desktop symbol.

I wonder why this happens? Is GNOME (GNOME is responsible for running .desktop files, isn't it?) using another shell so that it does not execute .bashrc/.profile an subsequently SMARTGITHG_JAVA_HOME is not set?

  • If it is a shell script you might want to check with Terminal=true. – muru Jul 16 '14 at 8:31
0

You can do it with gnome panel.

If it is not already installed run:
sudo apt-get install gnome-panel

Then create the shortcut with:
gnome-desktop-item-edit ~/Desktop/ --create-new

In the creation window choose the type and location of the target and then click OK.

  • I get E: Command line option --create-new is not understood – du-it Jul 16 '14 at 8:54
  • Just tested it on 12.04 and it works fine for me. Can you post a screenshot of the command you entered and the output you got. – Pabi Jul 16 '14 at 9:09
  • myName@ub1204d:~$ sudo apt-get install gnome-panel gnome-desktop-item-edit ~/Desktop/ --create-new E: Command line option --create-new is not understood myName@ub1204d:~$ – du-it Jul 16 '14 at 9:30
  • There are two seperate commands. First run sudo apt-get install gnome-panel to instal gnome panel then gnome-desktop-item-edit ~/Desktop/ --create-new to create the desktop icon. – Pabi Jul 16 '14 at 9:31
  • Here's the generated output: #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon[en_US]=/usr/local/bin/develop/versioncontrol/smartgithg-6_0_3/bin/smartgithg-64.png Exec=/usr/local/bin/develop/versioncontrol/smartgithg-6_0_3/bin/smartgithg.sh Comment[en_US]=SmartGIT 6.0.3 yet Name[en_US]=SmartGIT 6.0.3 Name=SmartGIT 6.0.3 Comment=SmartGIT 6.0.3 yet #Icon=gnome-panel-launcher ...but couble-clicking on it has no effect. – du-it Jul 16 '14 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.