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.

David C.
3121 silver badge8 bronze badges
asked Jan 15, 2016 at 12:34
1
  • Have you tried chmod 777 ~/Desktop/Gort.desktop and then tried running it to make sure this is a permissions problem? Commented Jan 15, 2016 at 12:58

1 Answer 1

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
Patrick Cook
6,3758 gold badges39 silver badges63 bronze badges
answered Jan 15, 2016 at 14:21
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.