3

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]
   Encoding=UTF-8
   Name=Gort
   Comment= Gort Pi Status Info
   Exec=/usr/bin/python/home/pi/Gort/py
   Icon=/usr/share/pixmaps/Sqeak.png
   Terminal=false
   Type=Applications
   Categories=None

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
1

Ok I found the errors.

I modified this line

Exec=/usr/bin/python/home/pi/Gort/py

to

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

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

#!/usr/bin/python

to

 #!/usr/bin/env python3 #the script is python3
|improve this answer|||||

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.