dantup / browserselector Goto Github PK
View Code? Open in Web Editor NEWSmall utility to launch a different browser depending on the domain of the url being launched.
License: MIT License
Small utility to launch a different browser depending on the domain of the url being launched.
License: MIT License
Just a note I've added this project to the AlternativeTo website. I used Choosy on OSX for a few years and was very happy. Recently am back on Windows and been looking at alternatives. I tried all those listed there and found this later on. Honnestly I feel like this one is the best at routing in a very fine-grained & customizable way. It just needs a decent GUI, and perhaps later on some browser extensions (per-browser projects ;-)) to achieve the "in-browser" routing, since those seem not to work for now (those never get routed to your app)... Just thinking out loud, this is how Choosy did it anyway. I'd contribute more if I knew my way around .Net, but I'm more into Java... Keep it up! :-)
This is on ie9 with Chrome set as the first browser.
URLs that match my ie rules open in new windows. I'll check the reuse windows option when I get my windows machine out again.
At first i watn to thank you for this small but usefull piece of code.
I made some modifications in my fork https://github.com/stgolem/BrowserSelector
So i want to discuss with others, should we merge them together into something bigger and more user-friendly?
My direction is:
Please share your ideas with me.
On those two browsers (Waterfox G4.1.1 and LibreWolf 99.0-1 - both 64bit) 100% reproducible is getting error window with such content:
Unable to launch browser, sorry :(
Please send a copy of this error to DanTup.
System.ComponentModel.Win32Exception (0x80004005): Nie można odnaleźć określonego pliku
w System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
w System.Diagnostics.Process.Start()
w System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
w DanTup.BrowserSelector.Program.LaunchBrowser(String url, Boolean waitForClose).
used configuration like this:
BrowserSelector.txt
also I've tested with quotes.
Works fine with Firefox, Vivaldi, Chrome.
The tool fails when a chromium browser is called using a command line option like user-data-dir.
The use case is using one browser with more than one instance for different usages (programming vs. office) and calling them like
C:\opera\launcher.exe --user-data-dir="C:\Opera\profiles\profileA"
Provide a text box where you can copy the URL as CURL command for easy pasting into a shell
thanks!
Thanks a lot for the program, it is helpful already.
However, sometimes a per-url-choice would come in handy, is it possible to code a tiny GUI dropdown that would let the user pick a browser if the given site is not specified in the ini?
When not being local administrator, and running "BrowserSelector --register", the application does not provide any output, but All Control Panel Items -> Default Programs -> "Set Your Default Programs" does not list "BrowserSelector" as a default program, therefore does not work.
Expected behaviour: provide clear error message when running "BrowserSelector --register", for example when registry entry cannot be created.
some browsers install themselves to the %LocalAppData%
Directory inside %UserProfile%
would be nice if you'd be able to use Environment variables. FYI %ProgramFiles%
is a thing.
As a workaround I use cmd.exe for the variable expansion, which works but is a bit of a hack.
brave = "C:\WINDOWS\system32\cmd.exe" /c start %LocalAppData%\BraveSoftware\Brave-Browser\Application\brave.exe
also maybe update the 32bit paths in the documentation
ff = "C:\Program Files\Mozilla Firefox\firefox.exe"
ffdev = "C:\Program Files\Firefox Developer Edition\firefox.exe"
Would be nice if this ran in .NET Core.
When I choose "Version history" or "View on Dropbox.com" in the Windows Explorer context menu of a file in my Dropbox, I get the "Usage" dialog box.
The specific URL given to BrowserSelector.exe by the Dropbox context menu command is a simple file URL on the form file:///C:/Users/MyUserName/AppData/Local/Temp/dbfidti_h6j.html#f0387784fbe3c8c15a2532530f (I changed the cryptic codes, but the pattern is the same).
I have to turn BrowserSelector completely off as default browser due to this, effectively rendering the program useless. :-(
I guess it could be solved with changing the line
if (arg.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || arg.StartsWith("https://", StringComparison.OrdinalIgnoreCase) || arg.StartsWith("ftp://", StringComparison.OrdinalIgnoreCase))
to
if (arg.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || arg.StartsWith("https://", StringComparison.OrdinalIgnoreCase) || arg.StartsWith("ftp://", StringComparison.OrdinalIgnoreCase) || arg.StartsWith("file://", StringComparison.OrdinalIgnoreCase))
in the file Program.cs, but I'm unsure how that affects the detections or .url files etc. in the lines that follow.
BrowserSelector can't open local file with file:///C:/TEMP/xxx.html
URI.
Run:
BrowserSelector.exe --unregister
under Windows 7 and BrowserSelctor will crash.
After something deleted my BrowserSelector config file, I got the following exception:
This happens for URLs
My BrowserSelector is of version 0.3.0.0 and has worked perfectly
After I restored the config file, everything worked again
PS: You should perhaps write something more explicit than (e.g. the URL of this repo)
Please send a copy of this error to DanTup
Mentioned in #5; it doesn't seem to show up despite the registry keys.
This comment suggests that everything works just using HKCU
so maybe we can tweak this to not require admin?
Trying to install Atlassian SourceTree, I cannot log in to my Bit Bucket account. The browser (Chrome) just hangs and the sign-in process fails to complete, making installation of SourceTree impossible.
Workaround is to set Edge as the default browser, install SourceTree, then set BrowserSelecteor as default browser again.
When an url contains an explicit port specification (like: "http://my.domain.tld:/whatever") a rule like this one:
my.domain.tld = <browser nickname>
doesn't triggers
one have to explicitely write the rule like this:
my.domain.tldr:<port> = <browser nickname>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.