Make Raspberry Pi display an URL on boot27 April, 2021
There's often a couple of Raspberry Pi laying around, or an old laptop. Let's make it into a status screen, that'll show any URL on boot.
Reinstall Raspberry Pi OS or Debian
"Do I have to, it already got an OS?" No you don't, but there's a risk that you'll regreat that you didn't – especially if your Pi or laptop is old.
# Firefox apt-get install iceweasel -y
Write startup script
Add this script as
#!/bin/sh # open build screen url in firefox iceweasel --kiosk http://url.to.build.screen.com
Add script to startup
chmod 755 /home/pi/startup.sh mkdir -p .config/lxsession/LXDE-pi vim .config/lxsession/LXDE-pi
This is the boot file, saying what the Po should do on startup. If you have a public display, where the Pi should be locked down, simply write the following and save.
If you want to have the desktop available, and easy access to config things, write the following instead.
@lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xset s off @xset -dpms # Turns off screensaver @xset s noblank point-rpi @./startup.sh
This boots up the desktop too.
That's it! You can test it by rebooting :)
If you want to get out of a locked down kiosk-mode, press ctrl + alt + F2 to get a login terminal.
If your screensaver is not turned off, see
If you need to login or send key presses to the browser, e.g. typing in a password or similar, check out /build-screen-bootup/ post, using xdotools.