I am new to Linux, and I am using Ubuntu 16.04.
I am trying to create a
.desktop file for the simplest code ever. However, I can't figure out why, but when I double-click it, nothing happens besides the fact that the icon shows up in the Launcher for a few seconds.
Here's my .desktop file :
[Desktop Entry] Version=1.0 Name=Shortcut-Test Comment=No comment for now Exec=/home/julien/Desktop/Test.sh Icon=/home/julien/Desktop/Pic.png Terminal=false Type=Application Categories=Utility;Application;
Here's the Test.sh file it runs :
#!/bin/bash python Test.py
Here's the target Test.py file :
f = open("Test.txt", "w") f.write("Test successful!") f.close()
The .desktop, .sh and .py files are all in
/home/julien/Desktop and have permissions
chmod +x. When I run Test.sh from the terminal, everything works fine and the Test.txt file is created. However, when I double-click on my Shortcut-Test icon, nothing seems to happen.
Does anyone manage to make this simple example work? Any help is welcome!