I make a game in Python with the turtle
module but I want to make it executable by double clicking on it. I follow these steps:
My Python file has
#!/usr/bin/env python3
on top.I created a file called
launcher.desktop
on the desktop. It contains:[Desktop Entry] Name = Pong Exec = /home/username/Desktop/MyGame/game.py Version = 1.0 Icon = /home/username/Desktop/MyGame/game.icon Type = Application
I marked the file as executable.
However, when I double-click on that file, it opens in text editor.
Can someone tell me how can I make the Python file executable by double-clicking in Ubuntu 20.04?