Remove obsolete audio and buzzer control documentation files, including detailed guides and HTML interfaces, to streamline the repository and eliminate redundancy. This cleanup enhances maintainability and focuses on essential resources for the reTerminal DM4 audio and buzzer functionalities.
This commit is contained in:
36
emmc-provisioning/cloud-init/fix-reterminal-display.sh
Normal file
36
emmc-provisioning/cloud-init/fix-reterminal-display.sh
Normal file
@@ -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, no duplicate [Daemon]) ==="
|
||||
if [[ -f /etc/plymouth/plymouthd.conf ]]; then
|
||||
sed -i '/^Theme=/d' /etc/plymouth/plymouthd.conf
|
||||
sed -i '/^\[Daemon\]$/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 (rpd-labwc / labwc Wayland) ==="
|
||||
echo "To set rotation and wallpaper now (in a labwc session), run as $PI_USER:"
|
||||
echo " wlr-randr --output \$(wlr-randr | awk '/^[A-Za-z0-9_-]+ /{print \$1; exit}') --transform 270"
|
||||
echo " pcmanfm --set-wallpaper /usr/share/rpd-wallpaper/splash.png --wallpaper-mode=crop"
|
||||
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