【发布时间】:2022-09-08 17:10:13
【问题描述】:
我正在使用带有 raspbian lite、openbox 和 chromium-browser 的树莓派 4 设置双屏信息亭(两个屏幕都处于纵向模式),它显示 2 个静态网页(即广告),但我无法得到它正常工作。我将下面的代码放在 /etc/xdg/openbox/autostart 脚本中:
#Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms
#Setup screens
xrandr --output HDMI-1 --mode 1920x1080 --pos 0x0 --rotate left
xrandr --output HDMI-2 --mode 1920x1080 --pos 0x1920 --rotate left
#Allow quitting the X server with CTRL-ALT-Backspace
setxkbmap -option terminate:ctrl_alt_bksp
#Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --new-window --incognito --disable-infobars --window-position=0,0 --kiosk --user-data-dir=/tmp/monitor1 'https://[left-screen-url]'
chromium-browser --new-window --incognito --disable-infobars --window-position=0,1920 --kiosk --user-data-dir=/tmp/monitor2 'https://[right-screen-url]'
其中 [left-screen-url] 和 [right-screen-url] 实际上分别是两个屏幕的完整 url。
问题是它只显示左屏幕页面而将右屏幕留空。当我注释掉倒数第二行(第一个 chromium-browser 命令)时,左侧屏幕保持空白(如预期的那样),但现在右侧屏幕完美运行!我该怎么做才能让它同时显示两个屏幕?
非常感谢!
【问题讨论】:
标签: chromium raspberry-pi4 kiosk openbox