Skip to content

Instantly share code, notes, and snippets.

@costerwi
Last active March 4, 2024 19:12
Show Gist options
  • Save costerwi/2edad016e4a0bca184ed to your computer and use it in GitHub Desktop.
Save costerwi/2edad016e4a0bca184ed to your computer and use it in GitHub Desktop.
Raspbian startup

Normal Raspbian startup sequence

/usr/bin/raspi-config is a shell script to change some of the following options. docs

  1. /etc/inittab sets the default runlevel and runs /etc/init.d/rc to execute startup scripts.
  2. /etc/rc3.d/S03lightdm launches lightdm for runlevel 3.
  3. /etc/lightdm/lightdm.conf contains configuration options for lightdm, including autologin-user
  4. /etc/X11/Xsession sources all files in /etc/X11/Xsession.d
  5. /etc/X11/Xsession.d/50x11-common_determine-startup will set STARTUP to either ~/.xsession or ~/.Xsession if it exists. If not executable, it will prepend ${SHELL:-sh}. The default is STARTUP=/usr/bin/x-session-manager which is linked to /etc/alternatives/x-session-manager which is linked to /usr/bin/startlxde-pi
  6. lxde is the "Lightweight X11 Desktop Environment"
  7. /usr/bin/startlxde-pi finishes by starting an lxsession called LXDE-pi: exec /usr/bin/lxsession -s LXDE-pi -e LXDE

lightdm autologin of kiosk user

  1. Add a kiosk user: sudo adduser kiosk
  2. Make /boot/kiosk-session which may be edited outside of linux if necessary. Data in this file may include options from xinitrc below.
  3. Link ln -s /boot/kiosk-session /home/kiosk/.xsession to run that script rather than lxde when kiosk logs in.
  4. Edit /etc/lightdm/lightdm.conf to set autologin-user=kiosk and autologin-user-timeout=5 to start kiosk after 5 seconds.

Kiosk rc.local and xinitrc method

HOWTO: Boot your Raspberry Pi into a fullscreen browser kiosk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment