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?

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
Mikael
  • 141
  • 1
  • 2
  • 3

3 Answers3

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.

exIT Solutions
  • 284
  • 1
  • 8
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

Sander
  • 394
  • 5
  • 16
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.

hg8
  • 13,410
  • 12
  • 71
  • 103