To run an application you simply add it on a line starting with a character. This is the same file that is edited if you are disabling the screen saver, it causes things to be done when the GUI loads for a user. If the above gives a blank file, then there is not a per user file so edit the global one: sudo nano /etc/xdg/lxsession/LXDE-pi/autostart Continue here Bodge, but it works for us… Setting An Application / Your Application To Automatically Run In The GUI Raspbian Buster sudo nano /etc/xdg/lxsession/LXDE-pi/autostart Raspbian Jesseįor the standard Pi user (if not using “sudo startx”): sudo nano /home/pi/.config/lxsession/LXDE-pi/autostartįor the root Pi user (if running the GUI with “sudo startx”): sudo nano /root/.config/lxsession/LXDE-pi/autostart Instead we started our application using a script with a delay before it runs so that it simply appears on top of the error message. There’s lots of google resources on no session for PID with lxpolkit but after a few hours of trying we didn’t manage to resolve. Lxpolkit is a “Policy authentication agent”. You can use command “ps 696” to see the process there is no session for, for us it was: It may well be because of using sudo startx. We get this message when using this method, the number will be random based on system. Re-boot your RPi and it should automatically run the GUI as the root user. Now open this file (the “sudo nano” assumes you are editing it from the command line): sudo nano /etc/rc.localīefore the “exit 0” line in it add the following line: #Auto run the GUI as root However if you need to run with root privileges due to needing IO pin control (yes yes its not advised to run as root, but for many uses its fine where the security issues aren’t a concern) then set the raspbian preferences to boot to the command line. You can use the raspbian preferences via the GUI to cause the pi user to be auto logged in at boot up and the GUI automatically run. If you need to disable the screen saver / screen auto switch off see here.