I have firefox already running on my system, and now in minimised state. What I want is to close the current tab running in firefox. How can I do this by simply using commands in terminal?
How it works
Alias for above command
You can make an alias for the above commands, say the alias name be
If you don't have
open a terminal and enter
And it will close Firefox’s current tab instantaneously.
Note: You need to have
You can install this Add-on: https://github.com/bard/mozrepl/wiki and enable it with Tools->MozRepl->Start. After that you can script Firefox from outside. Create following test.js file:
And run it following way:
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
and click on the tab you want to close.