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?
Thanks! linda
in many of the situations, what happens is xdg-open is called:
EG: xdg-open 'http://www.freedesktop.org/'
Opens the freedesktop.org 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 application.
RTFM.
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
Synopsis
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 firefox
WOW. And that works regardless of the DM I'm using. WOW!
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@Telcontar:~> Oops. cer@Isengard:~> xdg-settings get default-web-browser cer@Isengard:~> Oops. Does not work on my two computers that are running this instant. Sigh... -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)