如何在 Raspbian 上设置图像幻灯片信息亭
1. 配置自动登录
sudo raspi-config -> 1 System options -> S5 Boot / auto-login -> 设置为 B2 Console Autologin
2. 使用我们的脚本配置信息亭
how-to-setup-image-slideshow-kiosk-on-raspbian.sh
sudo apt -y install xserver-xorg xinit x11-xserver-utils matchbox-window-manager xautomation unclutter feh
mkdir -p ~/kiosk-images
sudo cat >~/kiosk.sh <<EOF
#!/bin/sh
xset -dpms
xset s off
xset s noblank
matchbox-window-manager -use_titlebar no &
unclutter &
feh -Y -x -q -D 5 -B black -F -Z -z -r ~/kiosk-images
EOF
chmod a+x ~/kiosk.sh
sudo cat >>~/.bashrc <<EOF
# 信息亭 xinit
xinit ~/kiosk.sh -- vt$(fgconsole)
EOF3. 将图像放在 ~/kiosk-images 中
例如通过 scp 或 rsync
4. 重启
sudo reboot
**注意:**使用 SSH 登录时,.bashrc 技巧(最初在 reelyactive 发现)将导致 xinit 运行,并显示消息
xorg_wrap_error.txt
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server出现在屏幕上且控制台未打开。在这种情况下,只需键入 Ctrl+C 停止 xinit 并查看正常 shell。
Check out similar posts by category:
Raspberry Pi
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow