I have a basic .desktop file for a .py:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Appy
Comment=some app
Exec=/home/me/Documents/py/cs/simi0op.py
Icon=/usr/share/icons/hicolor/48x48/apps/pic.jpeg
Terminal=true
When I double click the desktop icon I get a terminal err msg that the .ext isn't in path. But it is.
My err msg :
Failed to execute child process “path/to/file.py” (No such file or directory)
But I can cd via terminal and run via python3 without problem. The .py file does use an import or two but these work fine so they should work from the .desktop shortcut as well...no?
My Exec var is correctly set up, I think. Clicking on icon produces error, but file exists - and runs via python3 in terminal:
Exec=/usr/bin/python3 /home/[username]/path/file.py
– John Orion Jan 25 '18 at 00:46chmod a+x /home/me/Documents/py/cs/simi0op.py
. Make sure the python script has a shebang. – frabjous Mar 21 '22 at 16:44