piframe/docs/splash_screens.md

2.3 KiB

Splash Screens

The below will get you setup with splash screens for boot, shutdown and halt events on your PiFrame.

You will need to obtain your own images for these screens. Please adjust the following accordingly.

Further Reading / Inspiration


cat > /etc/systemd/system/boot-logo.service <<EOF
[Unit]
Description=boot splash screen
DefaultDependencies=no
After=local-fs.target

[Service]
User=fim
ExecStart=/usr/bin/fim --verbose --etc-fimrc /usr/local/etc/fimrc --no-commandline --no-history --device /dev/fb0 --vt 1 --execute-commands-early "clear" --execute-commands 'display;sleep "300";quit;' --autozoom /home/fim/noun_startup_749601.png
Type=exec

[Install]
WantedBy=sysinit.target
EOF

cat > /etc/systemd/system/shutdown-logo.service <<EOF
[Unit]
Description=show image on starting shutdown
DefaultDependencies=no
Before=halt.target poweroff.target reboot.target shutdown.target

[Service]
User=fim
ExecStartPre=-/usr/bin/killall fim
ExecStart=/usr/bin/fim --verbose --etc-fimrc /usr/local/etc/fimrc --no-commandline --no-history --device /dev/fb0 --vt 1 --execute-commands-early "clear" --execute-commands 'display;sleep "300";quit;' --autozoom /home/fim/noun_landing_1746270.png
Type=exec

[Install]
WantedBy=halt.target poweroff.target reboot.target shutdown.target
EOF

cat > /etc/systemd/system/halt-logo.service <<EOF
[Unit]
Description=safe-to-power-off image
DefaultDependencies=no
After=umount.target
Before=final.target

[Service]
User=fim
ExecStartPre=-/usr/bin/killall fim
ExecStart=/usr/bin/fim --verbose --etc-fimrc /usr/local/etc/fimrc --no-commandline --no-history --device /dev/fb0 --vt 1 --execute-commands-early "clear" --execute-commands 'display;sleep "300";quit;' --autozoom /home/fim/noun_unplug_601044.png
Type=exec

[Install]
WantedBy=halt.target halt.target poweroff.target reboot.target shutdown.target
EOF

systemctl daemon-reload
systemctl enable boot-logo.service
systemctl enable halt-logo.service
systemctl enable shutdown-logo.service