Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
    
Have a look at Arronax for a GUI to create .desktop files –  Florian Diesch Aug 11 '12 at 0:39
    
Thank you very much! That did the trick! –  Mikael Aug 11 '12 at 23:24
    
gnome-desktop-item-edit --create-new path/to/folder is useful... –  artfulrobot Feb 21 '13 at 18:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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