How to gently kill Firefox process on Linux/OS X

前端 未结 7 1447
盖世英雄少女心
盖世英雄少女心 2021-02-08 06:02

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 with

7条回答
  •  执念已碎
    2021-02-08 06:32

    How about

    wmctrl -c "Mozilla Firefox"
    

    ?

    Is it what you want?

    NOTEs:

    1. This command may need to be fired in same DISPLAY & probably same virtual desktop, on which your firefox is running.
    2. Only first matching window will be closed. You may need to loop this command.

提交回复
热议问题