Skip to content

fix(web): Try xdg-open before hardcoded browsers#890

Open
ipilcher wants to merge 1 commit into
mitmproxy:mainfrom
ipilcher:main
Open

fix(web): Try xdg-open before hardcoded browsers#890
ipilcher wants to merge 1 commit into
mitmproxy:mainfrom
ipilcher:main

Conversation

@ipilcher
Copy link
Copy Markdown

Currently, web.open_browser() doesn't always honor the user's browser preference on Linux. It tries x-www-browser, which is Debian (and derivatives)-specific, and it tries gnome-open, which was a GNOME 2 mechanism.

This adds xdg-open to the list of "browsers", used by web.open_browser(), right before it starts trying specific browsers - Chrome, Chromium, Firefox, etc. Thus, users who are currently using the Debian alternatives system (or GNOME 2 settings) won't be affected by this change.

Currently, web.open_browser() doesn't always honor the user's browser
preference on Linux.  It tries x-www-browser, which is Debian (and
derivatives)-specific, and it tries gnome-open, which was a GNOME 2
mechanism.

This adds xdg-open to the list of "browsers", used by
web.open_browser(), right before it starts trying specific browsers -
Chrome, Chromium, Firefox, etc.  Thus, users who are currently using
the Debian alternatives system (or GNOME 2 settings) won't be affected
by this change.

Signed-off-by: Ian Pilcher <arequipeno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant