Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Some applications don't follow default browser settings

24 views
Skip to first unread message

Tianyu Chen

unread,
Oct 4, 2022, 12:30:06 AM10/4/22
to
Hi all,

I'm using Google Chrome (/opt/google/chrome/google-chrome) as my default
browser, which is set by `update-alternatives` command. However my
firefox-esr is always launching when links are opened in Telegram and
Mozilla Thunderbird.

I'd like to know why firefox-esr is launching, and how can i switch to
Chrome? I'm not gonna removing my Firefox :(

Some information attached:

    $ readlink -f /usr/bin/x-www-browser
    /opt/google/chrome/google-chrome

    $ xdg-settings get default-web-browser
    google-chrome.desktop

    $ cat ~/.config/mimeapps.list
    [Default Applications]
    x-scheme-handler/tg=userapp-Telegram Desktop-ZS5OS1.desktop
    text/html=google-chrome.desktop

    [Added Associations]
    x-scheme-handler/tg=userapp-Telegram Desktop-ZS5OS1.desktop;
    text/html=google-chrome.desktop;


Any help is appreciated, thanks!

Tianyu Chen

John Conover

unread,
Oct 4, 2022, 1:00:05 AM10/4/22
to
Tianyu Chen writes:
>
> I'm using Google Chrome (/opt/google/chrome/google-chrome) as my default
> browser, which is set by `update-alternatives` command. However my
> firefox-esr is always launching when links are opened in Telegram and
> Mozilla Thunderbird.
>
> I'd like to know why firefox-esr is launching, and how can i switch to
> Chrome? I'm not gonna removing my Firefox :(
>

Setting the default programs is kind of a mess, and there are two
methods, which must agree, else conflicts occur:

update-alternatives --set gnome-www-browser /usr/bin/google-chrome-stable
update-alternatives --set x-www-browser /usr/bin/google-chrome-stable
xdg-settings set default-web-browser google-chrome.desktop
xdg-settings set default-url-scheme-handler mailto thunderbird.desktop

The names of your programs may be different, be sure to check the executable
names for google-chrome and thunderbird.

Also, if you are using XFCE:

Applications->Settings->Default Applications

has to agree with the above settings, too.

John

--

John Conover, con...@panix.com, http://www.johncon.com/

Max Nikulin

unread,
Oct 4, 2022, 1:00:06 AM10/4/22
to
On 04/10/2022 11:07, Tianyu Chen wrote:
>
> I'm using Google Chrome (/opt/google/chrome/google-chrome) as my default
> browser, which is set by `update-alternatives` command. However my
> firefox-esr is always launching when links are opened in Telegram and
> Mozilla Thunderbird.

Almost certainly Thunderbird ignores alternatives, mailcap and queries
XDG settings from mimeapps.list, mimeinfo.cache files

>     $ xdg-settings get default-web-browser
>     google-chrome.desktop

xdg-mime query default x-scheme-handler/http
xdg-mime query default x-scheme-handler/https

or
xdg-settings get default-url-scheme-handler http
that likely invokes xdg-mime

>     $ cat ~/.config/mimeapps.list
>     [Default Applications]
>     x-scheme-handler/tg=userapp-Telegram Desktop-ZS5OS1.desktop
>     text/html=google-chrome.desktop

My guess is that when applications are going to open a link, MIME type
is not known yet, so scheme handler is queried. Likely you miss the
following associations in the [Default Applications] section:

x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;

Do not forget to run update-desktop-database with a proper directory as
its argument.

Tianyu Chen

unread,
Oct 4, 2022, 1:30:08 PM10/4/22
to
在 2022年10月4日星期二 UTC+8 13:00:06,MaxNikulin写道:
>x-scheme-handler/http=google-chrome.desktop;
>x-scheme-handler/https=google-chrome.desktop;
>
>Do not forget to run update-desktop-database with a proper directory as
>its argument.
Thanks! Changing the x-scheme-handler to google-chrome.desktop works for me!
Tianyu Chen
0 new messages