我有一个在 Kiosk 模式下运行的 Chromium。 我想通过 SSH 更改页面的 URL
如果不是 Kiosk 模式,我会使用 xdotool:
export DISPLAY=":0"
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key ctrl+l
xdotool type 'www.example.org'
xdotool key Return
但这行不通。可能是因为它处于信息亭模式。
除此之外,我的 xdotools 工作正常
export DISPLAY=":0"
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key ctrl+F5
刷新我的页面
也许 xdotool 不是这种情况下的最佳选择?
最佳答案
只需离开信息亭模式
!#/bin/sh
export DISPLAY=":0"
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key F11
xdotool key ctrl+l
xdotool type 'www.google.com'
xdotool key Return
xdotool key F11
关于ssh - 如何通过 ssh 更改 Chromium kiosk 模式下的 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31340063/