0

我正在开发一个使用 Firefox 的自助服务终端应用程序,并希望确保它在崩溃时以全屏模式重新启动

没有这样的 xdotool 行,代码运行良好

#!/bin/bash

while true
do
if [ ! `pgrep firefox-bin` ];then
firefox -url http://localhost   
fi
sleep 5
done

但是如果我为全屏添加 xdotool 行,它将每 5 秒打开一次 firefox

#!/bin/bash

while true
do
if [ ! `pgrep firefox-bin` ];then
firefox -url http://localhost &
xdotool search --sync --onlyvisible --class "Firefox" windowactivate key F11 
fi
sleep 5
done

我的脚本中的错误在哪里?谢谢

4

0 回答 0