- In the LX terminal type sudo raspi-config and a menu should appear where you can select to change the configuration for startup, so that when you start the pi it will skip the login step and the startx step and go straight to your desktop.
- In the /home/pi/.config directory create a folder called 'autostart'.
- In Leafpad create a file called 'mypythonprogram.desktop' and write the following code and save it to the directory /home/pi/desktop/ :
Encoding=UTF-8
Type=Application
Name="The name of your program"
Comment=
Exec=sudo python "The place where the program is saved for
instance /home/pi/mypython.py"
StartupNotify=false
Terminal=false
Hidden=false
- Then cut and paste the file into the autostart folder you created.
- Test it to see if it works by typing sudo reboot into the LX terminal.
No comments:
Post a Comment