Python/Tkinter App run on Raspberry Pi boot Python/Tkinter App run on Raspberry Pi boot tkinter tkinter

Python/Tkinter App run on Raspberry Pi boot


You may not need the desktop, but tkinter does. So you can't disable the graphical boot.

First, make your python file executable with this command:

chmod +x my_program.py

Then add a shebang to the top of the file. For python2, the first line of the file must be:

#!/usr/bin/env python

Now you can launch your python program like any other program, including adding it to autostart. When I did this I just run the command

nano /home/pi/.config/lxsession/LXDE-pi/autostart

to start the nano text editor and add the line

@/home/pi/folder/my_program.py

to the end.