From 1f970404e093dcbc2f1899c964d644e5287dae9f Mon Sep 17 00:00:00 2001 From: Marco Sirabella Date: Sun, 25 Mar 2018 09:50:29 -0400 Subject: [PATCH] Check $BROWSER before xdg-mime query default --- scripts/xdg-open.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index 2972257..12006a5 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -403,14 +403,14 @@ open_generic() fi fi - if has_display; then - open_generic_xdg_x_scheme_handler "$1" - fi - if [ -n "$BROWSER" ]; then open_envvar "$1" fi + if has_display; then + open_generic_xdg_x_scheme_handler "$1" + fi + # if BROWSER variable is not set, check some well known browsers instead if [ x"$BROWSER" = x"" ]; then BROWSER=www-browser:links2:elinks:links:lynx:w3m -- 2.16.1