Update first-boot.sh to set hostname and configure /etc/hosts for improved system identification; add fix-reterminal-display.sh for post-boot adjustments to splash screen and Plymouth theme; modify meta-data for instance identification; update app.py to reflect new local hostname.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# One-time fix for reTerminal DM after first-boot: splash, Plymouth theme, rotation, wallpaper.
|
||||
# Run on the device as root (e.g. sudo bash fix-reterminal-display.sh).
|
||||
# Or run over SSH: ssh pi@DEVICE_IP 'sudo bash -s' < fix-reterminal-display.sh
|
||||
|
||||
set -e
|
||||
PI_USER="${PI_USER:-pi}"
|
||||
PI_HOME="/home/$PI_USER"
|
||||
CFG_PATH="/boot/firmware/config.txt"
|
||||
[[ -f "$CFG_PATH" ]] || CFG_PATH="/boot/config.txt"
|
||||
|
||||
echo "=== Fixing boot splash (disable_splash=0) ==="
|
||||
if [[ -f "$CFG_PATH" ]]; then
|
||||
sed -i 's/^disable_splash=1$/disable_splash=0/' "$CFG_PATH" || true
|
||||
grep -q '^disable_splash=' "$CFG_PATH" || echo 'disable_splash=0' >> "$CFG_PATH"
|
||||
echo "Done. config: $(grep disable_splash "$CFG_PATH")"
|
||||
fi
|
||||
|
||||
echo "=== Fixing Plymouth theme (custom only) ==="
|
||||
if [[ -f /etc/plymouth/plymouthd.conf ]]; then
|
||||
sed -i '/^Theme=/d' /etc/plymouth/plymouthd.conf
|
||||
grep -q '^\[Daemon\]' /etc/plymouth/plymouthd.conf || echo '[Daemon]' >> /etc/plymouth/plymouthd.conf
|
||||
echo 'Theme=custom' >> /etc/plymouth/plymouthd.conf
|
||||
echo "Done. plymouthd.conf Theme: $(grep Theme= /etc/plymouth/plymouthd.conf)"
|
||||
fi
|
||||
update-initramfs -u -k all 2>/dev/null || true
|
||||
|
||||
echo "=== Rotation and wallpaper (run as $PI_USER at next login or now via sudo -u) ==="
|
||||
echo "To set rotation and wallpaper now (with X running), run as $PI_USER:"
|
||||
echo " export DISPLAY=:0"
|
||||
echo " kscreen-doctor output.DSI-1.rotation.right"
|
||||
echo " plasma-apply-wallpaperimage /usr/share/rpd-wallpaper/splash.png"
|
||||
echo ""
|
||||
echo "Or ensure one-shots run at next login (they are in autostart if still present)."
|
||||
echo "=== Reboot to apply splash and initramfs ==="
|
||||
echo " sudo reboot"
|
||||
Reference in New Issue
Block a user