I would like to be sure no miskakes were made. I put in /etc/xdg/openbox/autostart all startup operations such as
- xset s off
- xset -dbms
- xset s noblank
- call_a_bash_program
- vncserver :1
Is it correct to put these instructions in this file? Thanks.
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.
Sign up to join this communityI would like to be sure no miskakes were made. I put in /etc/xdg/openbox/autostart all startup operations such as
Is it correct to put these instructions in this file? Thanks.
The autostart file is called only when Openbox starts. If it fails to start for some reason, then anything in that file won't be running. As danielbathke mentioned, /etc/rc.local is a more appropriate place for background programs. Anything there will be run at boot regardless. However, since that's run before X11 starts, anything like xset which requires X won't execute correctly, and so the proper location for these things is in the autostart file.
Fundamentally, the difference is things in /etc/rc.local will start regardless of whether or not OpenBox or LXDE is started, while anything in the autostart file will only started when the GUI does.
I'd put call_a_bash_program
and vncserver :1
in /etc/rc.local; and xset s off
, xset -dbms
, and xset s noblank
in autostart.
It depends if you like to run background programs.
If background, give a try to /etc/rc.local. It runs before.
If interface programs, try /etc/xdg/lxsession/LXDE/autostart. It runs when LXDE session is started.