I'm trying to use openbox to customize my raspberry pi 3. Basically, what I want to do is start an openbox session on boot up and have openbox autostart a GUI application. This is what I have so far

in ~/.config/lxsession/LXDE-pi/autostart

I commented out the first 3 lines:

#@lxpanel --profile LXDE-pi
#@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash

and added this line:


This causes openbox to start when I boot up my system. I see a black screen

Following this guide: http://openbox.org/wiki/Help:Autostart It says that

"When you log in with the "Openbox" session type, or launch Openbox with the openbox-session command, the environment script will be executed to set up your environment, and the autostart script can launch any applications you want to run at startup."

so, I edited the autostart file in ~/.config/openbox/autostart in my pi user. (I also tried editing the global file) I put this in the file:


On first reboot it worked my GUI starts up which is great but...next reboot I'm back to black screen and I see part of my GUI in the top left corner and all the rest is black.

  • 1
    Hi did you ever solve this? I'm researching the most light-weight possible way to create a kiosk that will show a web page with possible image transitions (dakboard.com specifically). I would like to use a Pi Zero W so it's gotta be REALLY light. I wish someone had an opengl or framebuffer driven browser that could run from the GPU from the terminal (graphical - not lynx) – Adam Plocher May 19 '17 at 6:57

I had the same problem. I post it for any future googlers.

  1. Disable Desktop autologin

    Run sudo raspi-config and navigate to 3 Boot Options / B1 Desktop / Cliand choose B2 Console Autologin
  2. Run startx in rc.local

    Open rc.local with sudo nano /etc/rc.local. At the end, before exit 0 add startx &
  3. Configure xinitrc

    sudo nano /etc/X11/xinit/xinitrc

    Comment this line

    . /etc/X11/xsession

    Add this line to start openbox

    exec openbox-session
  4. Run your programs with autostart

    sudo nano /etc/xdg/openbox/autostart

    Add your commands

    /path/to/program &

    Important: End all commands with &

Voilà, you have now an Raspberry Pi that automatically boots to Openbox and autostarts your applications


This is the simple answer: sudo update-alternatives --config x-session-manager One can just run this and select the openbox-session then the next restart will get you the openbox window manager. No need for hacking files etc.

New contributor
David Savage is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Can you edit and expand upon your answer, else it may be deleted. Stack Exchange is looking for comprehensive answers. – Greenonline 2 days ago

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.