0

I created a GUI that tells me the temperature based on the temperature sensor I connected to the raspberry pi, that works fine, but then, I tried to do a desktop shortcut, and when I click on it, the Terminal opens for like a millisecond, and then it closes (I recorded it in slo-mo and noticed that it opened the normal terminal first, then the lxterminal and then a terminal with the name of my program, but after it opened that one, the terminal closed and nothing happened.), The code I made to create the shortcut was originally shorter than this one but after a lot of research I added many things, but it still wont open. My code is the following:

[Desktop Entry]
Terminal=true
Name=Temperatura
Exec=lxterminal -e /home/pi/GUI_TMP.py
MultipleArgs=false
Type=Application
Category=Accesories
StartupNotify=true
Icon=/home/pi/Pictures/tmp.jpeg
Hidden=false
X-KeepTerminal=true
NoDisplay=false

1 Answer 1

0

Have you tried calling the interpreter of the script instead of the script itself?, like this:

Exec=lxterminal -e python /home/pi/GUI_TMP.py

or

Exec=lxterminal -e /usr/bin/python3 /home/pi/GUI_TMP.py
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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