ssh - 如何通过 ssh 更改 Chromium kiosk 模式下的 url

标签 ssh debian chromium kiosk xdotool

我有一个在 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/

相关文章:

c++ - Debian 测试中缺少 `/usr/lib/libboost_unit_test_framework-mt.so'

docker - 在 Docker 中运行 Chromium - Gtk : cannot open display: :0

javascript - Google Chrome 开发者工具中的自定义堆栈跟踪?

linux - 在shell脚本中并行运行ssh并设置远程变量

docker - 在 Docker 镜像上安装 SSH

linux - 在 Linux 上使用 jetbrains appcode IDE

javascript - Raspberry Pi - JavaScript 在 chromium kiosk 模式下不起作用

ssh - ssh-copy-id 究竟是做什么的?

java - 在 intellij-run jrebel tomcat 服务器上通过 ssh 重新加载类

mysql - Debian 8 上的 PowerShell - 从 mysqldump 到 gzip 的管道