I want to develop an app using Tkinter GUI and want to launch it from a Desktop icon. I have created the script which works from the terminal and from IDLE3 and is just a test script at present.I have made this executable with chmod +x I have made a .desktop file and put it in /usr/share/applications/ I have not made any specific permission changes to this file. I have also put it in the /home/pi/Desktop/ I have an icon on the desktop and an entry under Other in the menu. I am getting the error:

invalid desktop entry file: '/home/pi/Desktop/Gort.desktop'

from clicking on the icon and similar from the menu entry:

invalid desktop entry file: '/usr/share/applications/Gort.desktop'

This is my desktop file

[Desktop Entry]
   Comment= Gort Pi Status Info

Any help much appreciated.

  • Have you tried chmod 777 ~/Desktop/Gort.desktop and then tried running it to make sure this is a permissions problem? – Patrick Cook Jan 15 '16 at 12:58

Ok I found the errors.

I modified this line



Exec=/home/pi/Gort.py #location of the file

And in the file Gort.py I modified the shebang from



 #!/usr/bin/env python3 #the script is python3
  • Just wondering... Where did you get gort.py from, and it should only need a shebang if it is a .bash or .sh – David C. Jan 17 '16 at 22:59

Okay it seems like there are a lot of misspellings here so I am not sure but I am pretty sure the problem is one of these:
Comment= Gort Pi Status Info
--------------^ The space will mess it up.

Missing u will make an error because of a missing file

Is this what you typed in? If so, this is messed up, and you should replace it with Gort.py


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.