! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-terminal opens HTTP links in Firefox even though Chrome is default browser
Status:
RESOLVED: WORKSFORME
Product:
Xfce4-terminal
Component:
General

Comments

Description Tore Anderson 2013-08-26 21:05:17 CEST
(Forwarded from https://bugzilla.redhat.com/show_bug.cgi?id=1001082)

Description of problem:

Summary says it all... If you right-click a http link in the terminal and select "open link", the link will open in Firefox even though Google Chrome is the default browser in Xfce.

Version-Release number of selected component (if applicable):

xfce4-terminal-0.6.2-1.fc19.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above.

Actual results:

See above.

Expected results:

See above.

Additional info:

exo-preferred-applications shows google-chrome as being the preferred web browser. Also running "exo-open http://some.link" or "xdg-open http://some.link" will correctly open the links in Chrome.

This is a regression from Fedora 18, which did everything right.
Comment 1 Kevin Fenzi 2013-08-26 21:08:36 CEST
I can confirm this here as well with midori set as default: 

% xdg-settings get default-web-browser
midori.desktop
(and exo-preferred-applications also set to midori)
Comment 2 Jarno Suni 2014-01-13 11:13:38 CET
Here xfce4-terminal (0.6.2) opens chromium-browser, even if chromium-browser, exo-preferred-applications, and "xdg-settings get default-web-browser" tell it is NOT my default/preferred browser.
Comment 3 Jarno Suni 2014-01-15 21:55:45 CET
Changing "x-scheme-handler/http" setting to desirable desktop file under [Default Applications] in file "$HOME/.local/share/applications/mimeapps.list" helped.
Comment 4 René Genz 2015-06-26 19:12:45 CEST
wanted to point out that this is still present in xfce4-terminal-0.6.3-7.fc22.x86_64.rpm

changing the default browser in 'applications -- settings -- preferred applications' does not make a difference for HTML files as well as HTTP links


in case you want to fix it system wide for all new users but for the Xfce session only, append
---
[Default Applications]
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
---
to /etc/xdg/xfce-mimeapps.list
Comment 5 Kevin Fenzi 2015-06-26 19:48:58 CEST
But that just sets it to firefox right? we want it to honor the users pref here.
Comment 6 René Genz 2015-06-27 10:59:23 CEST
Yes, it does not fix the problem. My wording was wrong.
For my use case it is a workaround.
Comment 7 runkharr 2015-11-06 20:05:33 CET
Hi!

I found solution for this problem. I had a very similar problem, but the difference is that for me it was always `Google Chrome´ which was started, even if i had another browser selected as `preferred application´.

The reason for (in my case) `Google Chrome´ being invoked is the GTK+ utility function `gtk_show_uri()´. This uses the (via Glib's `g_app_info_launch_default_for_uri()´) the files in the directories `.../share/applications´ (systemwide *and* local). The solution is simple:

1. Create a file `exo-launch.desktop´ in your `~/.local/share/applications´ directory wit something like the following content:

    [Desktop Entry]
    Name=Exo Launcher
    Type=Application
    Icon=gtk-open
    Categories=Desktop;
    Comment=A try to force 'xfce4-terminal' to use the preferred application(s)
    GenericName=Exo Launcher
    Exec=exo-open %u
    MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;application/x-mimearchive;
    Terminal=false
    OnlyShowIn=XFCE;

2. Create (if not already existing) a local `defaults.list´ file, again in your `~/.local/share/applications´ directory. This file must start with a "group header" of

    [Default Applications]

3. Insert the following three lines somewhere below this `[Default Applications]´ group header the folowing three lines:

    x-scheme-handler/http=exo-launch.desktop;
    x-scheme-handler/https=exo-launch.desktop;
    x-scheme-handler/ftp=exo-launch.desktop;

This should solve your problems ...
Comment 8 runkharr 2015-11-06 20:07:51 CET
Small TYPO (line 1):

I found solution ... ==> I a found solution ... ;)
Comment 9 Igor editbugs 2016-07-27 17:17:02 CEST
Not reproducible here under Cinnamon: changing the default browser between Firefox and Chromium in preferences makes xfce4-terminal open urls with the selected one.
Can anyone else check the terminal git version?
Comment 10 René Genz 2016-07-28 00:11:59 CEST
for new installed computers with Fedora 24 x86_64 in Xfce session with package:
xfce4-terminal-0.6.3-9.fc24.x86_64

I cannot reproduce the problem.
Change of default browser with 'applications -- settings -- preferred applications' is honored for HTTP, HTTPS links and HTML file links.

On the Fedora 24 machine where I applied the change to file '/etc/xdg/xfce-mimeapps.list' the default browser change of users is not honored.

To set default browser for all users on the local computer in Xfce edit 'WebBrowser' line in '/etc/xdg/xfce4/helpers.rc'.
With this, users can change their default browser and the change is honored.
Comment 11 Igor editbugs 2016-07-28 10:32:30 CEST
René, thanks for the update.

Anyway, URLs are opened by calling GTK API (https://developer.gnome.org/gtk3/stable/gtk3-Filesystem-utilities.html#gtk-show-uri) which means that the terminal is not responsible for a non-default browser being used since it's a matter of proper configuration of the GTK environment.
Comment 12 Igor editbugs 2016-07-28 10:34:19 CEST
Closing as non-reproducible.
If such issue occurs it means that the GTK environment is misconfigured.

Bug #10314

Reported by:
Tore Anderson
Reported on: 2013-08-26
Last modified on: 2016-07-28

People

CC List:
6 users

Version

Attachments

Additional information