Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Where is default browser set?
On 2017-06-14 03:39, Anton Aylward wrote:
On 13/06/17 03:34 PM, L A Walsh wrote:
Let me rephrase a previous Q --

When some program tries to show a URL, it invokes
your "default browser". How does it know what your
default browser is and where is that set?

Is it a symlink somewhere in your home directory,
or a text file with the browser name in it? Or what?


in many of the situations, what happens is xdg-open is called:

EG: xdg-open ''

Opens the website in the user's default browser.

xdg-open /tmp/foobar.png

Opens the PNG image file /tmp/foobar.png in the user's default image viewing


Of course typing a the command prompt

xdg<tab> shows a fe more, like

xdg-settings --help
xdg-settings ? get various settings from the desktop environment


xdg-settings { get | check | set } {property} [subproperty] [value]

xdg-settings { --help | --list | --manual | --version }

Use 'man xdg-settings' or 'xdg-settings --manual' for additional info.

And hence

xdg-settings --list
Known properties:
default-url-scheme-handler Default handler for URL scheme
default-web-browser Default web browser

and so, onto

xdg-settings get default-web-browser

And that works regardless of the DM I'm using.

I knew it! I knew it! :-)

I mean, I knew there must be a desktop independent way. Thank you! :-)))

Let's try it.

cer@Telcontar:~> xdg-settings get default-web-browser


cer@Isengard:~> xdg-settings get default-web-browser

Oops. Does not work on my two computers that are running this instant.

Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >