Launch electron app when browser opens?


Hi there!

I am definitely new to app development, but so far, Electron has been a great entry point. (I’m still very proud of myself for figuring out how to properly implement JQuery and JQueryUI.)

Recently, I discovered the ability to launch external applications such as the default web-browser using shell.openExternal(). This factors in very well to a certain app I would like to (attempt to) make, which is one where the user, from the main electron app (which should run in the background and probably be kept in the tray) can paste in links into a dynamic array of urls, and then launch their selected browser from either the desktop or from within the app, having all of their links open in new tabs, no matter from which location their browser gets launched. Basically, I want to develop an app that, when set to active, has control over which user-entered tabs are opened by default.

Obviously, without extra helpful features, this app sounds kind of pointless, so just to be clear, this is not the whole app.

But I’m not sure if something like this is even possible with Electron. I’m guessing so, but even after Googling for such a prospect, I didn’t find anything.

I would be very grateful for any help! Thanks a ton,



So, I guess there’s no way?


I’m assuming you could have to have the Electron app at the running in the background to detect when an external app has been opened, but it is even possible?

Please answer, anyone, and thanks,



It’s not a question of whether it’s possible in Electron. It’s a question of whether the other program makes it possible. Programs have ways of controlling one another, and Node has the possibility to access any of these, but in order for what you’re considering to be feasible, the target browser has to make those features available to other programs.


Okay, so if I were using Chrome, Opera, Firefox, Edge, or whatever, and if I’m understanding correctly, the browsers themselves would have to have some kind of built in feature that would allow Node to detect and do something when they’ve been launched, correct? If so, is there anything or any example program you could recommend to help me learn (if I’m even ready for something like that)? If not, it’s okay.

Apologies if I’m not very coherent, I’m a little tired right now, and thank you for your reply



What you’re talking about sounds like a fantastic way to introduce massive security holes into browsers. You could try looking at Chrome extensions and seeing if you can come up with a way to take over all the tabs from the outside, but I would think that browser developers would be opposed to that.


Okay, thanks for the insight, that’s a good point too. I’ll try to look into something like that for Chrome, but I’ll keep my hopes low.

Thanks again,