xdg-open doesn't respect $BROWSER for URLs
I expect $BROWSER
to be respected by xdg-open
,
% env | grep BROWSER
BROWSER=firefox
But it's not:
% xdg-open https://example.com
<opens in chromium>
This output from xdg-settings
is evidence that the intention would be for browser to be respected before other settings:
% xdg-settings set default-web-browser firefox.desktop
xdg-settings: $BROWSER is set and can't be changed with xdg-settings
Here, xdg-settings
implies that set default-web-browser
should have no effect if $BROWSER
is set, so it refuses to do anything. But that disagrees with xdg-open
's actual behavior.
% uname -a
Linux pele 6.12.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 27 Dec 2024 14:24:37 +0000 x86_64 GNU/Linux
% pacman -Qo =xdg-open
/usr/bin/xdg-open is owned by xdg-utils 1.2.1-1
Edited by Pat Brisbin