1

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.

1

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.

1

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.

  • Thanks. So, both solutions are correct? – bit Feb 12 '14 at 18:16
  • Late to the party here, but no, trying to run an X program in rc.local is not correct, because X has likely not yet started at that point in the boot process. – Jon Watte Apr 3 '16 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.