debloper / piosk

One-shot set up Raspberry Pi in kiosk mode as a webpage shuffler, with a web interface for management.
Mozilla Public License 2.0
69 stars 5 forks source link

Auto-generated splash screen with a QR code that goes to the management interface with the hostname #33

Closed andiohn closed 1 week ago

andiohn commented 2 weeks ago

Theoretically this should be easy because we could simply replace the splash from plymouth with this new generated one. Do it once on install, and you could even prompt in the installer script for a 'support link' and if it has a valid web address, put that side by side.

Piosk is booting, please wait.

To manage the configuration: If this screen is displayed for longer than 20 minutes, please contact support here: QR QR

http://www.linux-magazine.com/Online/Features/Generating-QR-Codes-in-Linux https://forum.puppylinux.com/viewtopic.php?t=9961

andiohn commented 2 weeks ago

Splash screen is located here: /usr/share/plymouth/themes/pix/splash.png

So replacing it with another one is trivial.

andiohn commented 2 weeks ago

Then to rebuild it so it shows: sudo plymouth-set-default-theme --rebuild-initrd pix

andiohn commented 2 weeks ago

Also, rpi-update would apply it too.

andiohn commented 2 weeks ago

Also I followed some of this to make the boot up look better: https://scribles.net/customizing-boot-up-screen-on-raspberry-pi/#:~:text=Remove%20text%20message%20under%20splash,script%E2%80%9D%20as%20root.&text=Then%2C%20remove%20(or%20comment%20out,message_sprite%20%3D%20Sprite()%3B%20message_sprite.

I didn't do the message sprite though, that's useful.

andiohn commented 2 weeks ago

On device QR code generation is this html5 thing too: https://github.com/six-two/qr.html

andiohn commented 2 weeks ago

Here's a demo of having it pre-filled out. https://qr.15c.me/qr.html#Hello,%20world!%F0%9F%8E%89

andiohn commented 2 weeks ago

image

debloper commented 1 week ago

Theoretically this should be easy

Level of difficulty is almost never the main holdback. The tradeoff between utility & side effects are.

This is a security nightmare. As the dashboard doesn't have authentication, any bystander can scan the QR code while it's booting/rebooting, visit the dashboard & CRUD the page list to show whatever they want to.

The users are absolutely free to create a QR code splash screen like this:

cd /usr/share/plymouth/themes/pix/
sudo mv splash.png splash.png.bak
qrencode "http://$(hostname)/" -o splash.png

(or follow the guides you've linked) at their own personal discretion, acknowledging the risk.

andiohn commented 1 week ago

For sure, good point!