Posted on Leave a comment

Raspberry Pi – Running a program after the PIXEL desktop starts

To automatically run a python program when the PIXEL loads, you need to add a command to the autostart file that can be found here:

/etc/xdg/xsession/LXDE-pi/autostart

Here’s the process:

  1. Open the autostart file: sudo nano /etc/xdg/xsession/LXDE-pi/autostart
  2. Create a new line above the line beginning: @xscreensaver
  3. On the new line add the command to start your program or script. NB: You should include the full path name
  4. Save and exit with ctl x then y then Enter.
  5. Next time the Pi boots, your program will run.

Mike – G4WNC

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.