[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changing default XDB browser w/o GNOME etc.

On 13/12/15 09:19, Eduard Bloch wrote:
Observation: various programs use the XDG mechanism (freedesktop
configuration method) to start a specific browser to visit a hyperlink.
Easy to verify with the xdg-open tool.

But how can I change this setting in a persistent way especially when I
don't use Gnome or Kde or Xfce? I tried LxQt once and apparently the
stupid thing has reset some configuration and now xdg-open starts
Qupzilla which I don't like. Before, some other stupid program has reset
it to Chromium which I don't like either.

xdg-open examines your environment to determine what desktop environment (if any) you are invoking it under, and follows a DE-specific strategy if you're using one of the DEs it knows about (KDE, LXDE, XFCE, Gnome, Darwin, MATE). This is an entirely reasonable design decision, but also one that reasonable people can disagree with.

If you are not using one of the desktop environments it knows about, then it uses its "generic" approach. For HTTP URLs, the generic approach is "check the BROWSER environment variable, then try the web browsers in a specified order if BROWSER isn't set". The first entry in that ordering is www-browser if DISPLAY is not set, and x-www-browser if DISPLAY *is* set.

xdg-open is written in POSIX shell, so you could easily copy it into a higher-priority location in your particular user account's PATH and modify it.

Reply to: