Closed peteruithoven closed 5 years ago
For most cases, simply using xdg-open
is sufficient, or in an app, Gtk.show_uri ()
. I don't think supporting a non-standard environment variable in order to support a non-standard method of performing a search is something we'd want to do. It's clever, but also seems error-prone.
@alcinnz also had a good point:
Here's the standard APIs you can use to find and run the default browser (as well as the default app for any URI scheme or MIMEtype): https://valadoc.org/gio-2.0/GLib.AppInfo.html
I'll close the issue.
Could we start supporting the $BROWSER env variable? That would make calling the default browser from the command line easier. This would allow us to for example initiate a search with the user's default browser with the user's default search engine with something like:
https://wiki.archlinux.org/index.php/environment_variables#Default_programs
It's currently tricky to retrieve the default browser: https://stackoverflow.com/questions/3124556/clean-way-to-launch-the-web-browser-from-shell-script https://blog.codef00.com/2011/02/18/the-default-browser-on-linux-debacle/