Page 1 of 1

Starting a GUI program at startup

Posted: Tue Mar 08, 2016 4:39 pm
by SpeedingPullet
I have a Python program using a GUI based on the PyQt toolkit.
I have written a .sh file, hoping to make my program run at startup.

While the .sh file works when executed at the command line, it doesn't work when called by /etc/X11/I it/xinitrc or /etc/X11/Xsession.

Where should my .sh file be called from? I know that rc.local is appropriate for command-line programs but not for GUI programs.

Re: Starting a GUI program at startup

Posted: Tue Mar 08, 2016 4:59 pm
by JimmyN
Put it in your desktop autostart file. That will run it when the desktop starts.

Code: Select all

nano ~/.config/lxsession/LXDE-pi/autostart
Add a line at the bottom

Code: Select all

@/path/to/your/script.sh

Re: Starting a GUI program at startup

Posted: Tue Mar 08, 2016 7:42 pm
by SpeedingPullet
Thank you, JimmyN.
That did the trick!