ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thank you jlliagre. I'm writing a bash script and I want to close the whole window. So I supposed to do that through javascript making firefox load a page with that command within. Do you know any other way to close selectively a window without killing the entire process? I've tried with xkill -id window_id, but it kills firefox-bin and so the other windows opened. It's a strange trouble because firefox doesn't open multiple instances but a process only without any parents, so it's hard to control windows from outside the task!
Firefox does have a BrowserCloseWindow() function in its browser.js file, but it can only be called by the browser itself or by an extension. While it is fairly simple to create an extension that will close the window when at the press of a toolbar button or something like that, I don't know of a way to run code from an extension from the command line.
Maybe there's a simpler way to send commands directly to firefox. It acts something like a dcop server. Googling outthere I've found bash strings like:
If anyone knows how that works, maybe it's possible to use such a syntax in order to control the browser internal functions... Unluckyly I didn't find nothing but those examples above!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.