如何轻轻地杀死Linux / OS X上的Firefox进程 [英] How to gently kill Firefox process on Linux/OS X
本文介绍了如何轻轻地杀死Linux / OS X上的Firefox进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
kill
Firefox进程使用 kill -3
或 kill -2
命令,下一次我打开一个新的Firefox窗口,询问我是否想在安全模式下运行。我知道调用 kill -9
可能会混淆Firefox,所以它会尝试以安全模式运行,但是 -3
应该如果你有任何想法如何轻轻松松地告诉Firefox正常关闭?解决方案
wmctrl -cMozilla Firefox
?
是你想要的吗?
注意:
- 这个命令可能需要在同一个DISPLAY&大概是相同的虚拟桌面,您的firefox正在运行。
- 只有第一个匹配的窗口将被关闭。您可能需要循环执行此命令。
I'm doing some automation with Firefox and although I can open Firefox window from shell, I'm not able to terminate it properly. If I
kill
Firefox process withkill -3
orkill -2
command the next time I open a new Firefox window it asks me if I want to run in safe-mode. I understand that callingkill -9
could confuse Firefox so it would try to run in safe-mode but-3
should be fine.Do you have any idea how to gently tell Firefox to close properly?
解决方案How about
wmctrl -c "Mozilla Firefox"
?
Is it what you want?
NOTEs:
- This command may need to be fired in same DISPLAY & probably same virtual desktop, on which your firefox is running.
- Only first matching window will be closed. You may need to loop this command.
这篇关于如何轻轻地杀死Linux / OS X上的Firefox进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文