HACKER Q&A
📣 thesurlydev

How to designate a browser profile (window) via URL pattern?


This has been bugging me for a long time. I have multiple Chrome profiles and a browser window open per profile. Inevitably, I click on a link in a different app and it attempts to open the link in the wrong browser window. The default seems to be the last window used.

Is there a solution which would allow me to open links in the "correct" browser window? This would include allowing me to define url patterns and map them to the correct browser profile (window).


  👤 solardev Accepted Answer ✓
The easiest thing to do is to probably just drag the hyperlink into the right window manually.

Or maybe you can script it at the OS shortcut level, making a URL handler script that captures all https links and then does a regex on them to decide which Chrome profile to launch. Note that the Chrome command-line to open a specific profile seems to change every so often, so not sure which of these is current, but hopefully one of them still works... https://superuser.com/questions/377186/how-do-i-start-chrome...


👤 thesurlydev
Answering my question (partially). Found a great Mac-only app called "Velja" which does exactly what I wanted. It allows you to define rules based on URL patterns and "routes" to the appropriate browser window.

Now I just need the same thing for Linux.