Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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]
Comment=This is my comment

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

Ok I found what the problem was.

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


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



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

Your Answer


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.