6

I have tried to create a .desktop file to run vncviewer (tight vnc connecting to a mac). I have entered below into the file.

[Desktop Entry]
Version=x.y
Name=VNCViewer
Comment=This is my comment
Exec=/usr/bin/vncviewer 10.0.1.5:5900
Terminal=true

When I double click the file it returns "There was an error launching the application."

Any suggestions what I have done wrong in my .desktop file?

0

3 Answers 3

3

Ok I found what the problem was.

You are missing one entry in the file. Place the following entry into the file

Type=Application

After you save the file, you'll notice it's icon change to look more like an application than what is looks like now (a text/script file).

Even if you make the file executable Ubuntu Desktop doesn't know if this file is a script or application and assumes it's a script. But if you place the Type=Application it will run it fine.

2
  • Have a look at Arronax for a GUI to create .desktop files Aug 11, 2012 at 0:39
  • gnome-desktop-item-edit --create-new path/to/folder is useful... Feb 21, 2013 at 18:11
0

Adding

Path=/path/to/directory

may be required if the application requires the user to start the executable binary in a certain directory. That was the case for me when just compiling a program from source but not installing system-wide.

0

Maybe you can give this a try: Exec=bash -c "/usr/bin/vncviewer 10.0.1.5:5900"

Also make sure your .desktop file is executable. chmod +x your_file.desktop

You must log in to answer this question.

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