我正在设置一个双屏幕亭(两个屏幕都处于纵向模式),使用带有raspbian、openbox和铬浏览器的raspberry pi 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]'其中左屏幕url和右屏幕url实际上分别是两个屏幕的完整url。
问题是,它只显示左屏幕页,并保留右屏幕空白。当我注释掉第二行到最后一行(第一个铬浏览器命令)时,左边的屏幕保持空白(正如预期的那样),但是现在右边的屏幕工作得很好!我能做些什么使它同时显示两个屏幕?
非常感谢!
发布于 2022-09-08 09:10:13
最近我有一个朋友也有同样的问题,他的修正是在花边线的末尾添加一个&,否则脚本就停止了!
https://stackoverflow.com/questions/73618107
复制相似问题