You are not logged in.

#1 2020-06-07 10:25:12

jones
Member
Registered: 2013-03-14
Posts: 268

[SOLVED] How to make firefox open a link from xfce4-terminal

$ pacman -Q xfce4-terminal 
xfce4-terminal 0.8.9.2-1

Hey everyone, if I click on a link in my terminal, it open chromium. How can I make it open the link in firefox?
This is already the setting in xfce's "preferred programs" (or whatever exactly it is called in English) menu. It also works for other links, e.g. in LO Writer.


SOLUTION
Here: https://bbs.archlinux.org/viewtopic.php … 7#p1909287

Last edited by jones (2020-06-09 20:31:37)

Offline

#2 2020-06-07 10:57:30

ronmon
Member
Registered: 2011-04-15
Posts: 48

Re: [SOLVED] How to make firefox open a link from xfce4-terminal

I just tried it in mine. If I left-click on the link nothing happens at all, and I do have Chromium installed.

If I right-click and select 'Open Link' it opens in Firefox, which I also have selected as preferred application. Maybe try the second way.

Offline

#3 2020-06-07 11:14:39

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 193
Website

Re: [SOLVED] How to make firefox open a link from xfce4-terminal

Is it using XDG?  Have you set your default browser correctly with xdg-settings?

Offline

#4 2020-06-07 12:05:24

jones
Member
Registered: 2013-03-14
Posts: 268

Re: [SOLVED] How to make firefox open a link from xfce4-terminal

ronmon wrote:

I just tried it in mine. If I left-click on the link nothing happens at all, and I do have Chromium installed.

If I right-click and select 'Open Link' it opens in Firefox, which I also have selected as preferred application. Maybe try the second way.

Thank you for your reply. I tried that. Chromium gets opened.

Malvineous wrote:

Is it using XDG?  Have you set your default browser correctly with xdg-settings?

Thank your for your reply.
I think so. I mean, I do not remember whatever *exactly* I set up in January, but they seem to be installed. One is configured properly, based on what I can say. See here:

$ xdg-settings get default-web-browser 
firefox.desktop
$ xdg-settings get default-url-scheme-handler 
xdg-settings: default-url-scheme-handler not implemented for xfce

I suppose this is the culprit then? I googled around for a bit (only searched for that specific line and found this chromium commit which includes this very line: https://chromium.googlesource.com/chrom … g-settings in line 895:

895:    exit_failure_operation_impossible "default-url-scheme-handler not implemented for $DE"

However after I looked through xdg-settings' manual and tried "$ xdg-settings set default-url-scheme-handler https firefox.desktop", it again said "xdg-settings: default-url-scheme-handler not implemented for xfce".

Would anyone of you know how to proceed?



(Just to make sure, I ran "$ xdg-open ." and it opened my home directory so that worked alright.)

Offline

#5 2020-06-09 18:25:32

glitsj16
Member
Registered: 2015-04-26
Posts: 126

Re: [SOLVED] How to make firefox open a link from xfce4-terminal

Xfce4 relies on exo-open from the exo package. The latter installs /etc/xdg/xfce4/helpers.rc, which sets firefox as default WebBrowser. Perhaps you have chromium set in your local override ~/.config/xfce4/helpers.rc? In any case, you can run /usr/bin/exo-preferred-applications to set things up the way you prefer.

Offline

#6 2020-06-09 20:22:20

jones
Member
Registered: 2013-03-14
Posts: 268

Re: [SOLVED] How to make firefox open a link from xfce4-terminal

Hi glitsj16, thank you for your reply.

$ cat /etc/xdg/xfce4/helpers.rc 
#
# Default helpers.rc for Xfce's Preferred Applications
#
# Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org>
#

WebBrowser=firefox
MailReader=thunderbird
TerminalEmulator=xfce4-terminal
FileManager=Thunar

and

$ cat ~/.config/xfce4/helpers.rc 
WebBrowser=firefox

This is also reflected by the menu which gets open by running exo-preferred-applications, as stated in the opening post.

Offline

#7 2020-06-09 20:30:14

jones
Member
Registered: 2013-03-14
Posts: 268

Re: [SOLVED] How to make firefox open a link from xfce4-terminal

SOLUTION
... based on glitsj16's post, I went on googling and found this post from 2011: https://forum.xfce.org/viewtopic.php?id=6013
To solve this, I added the lines

x-scheme-handler/http=exo-web-browser.desktop;
x-scheme-handler/https=exo-web-browser.desktop;

to

$ locate mimeapps.list
/home/my_username/.config/mimeapps.list

After logging out + logging in again, clicking on a URL in xfce4's terminal opens the link in a new firefox tab. Splendid. smile

Last edited by jones (2020-06-09 20:30:23)

Offline

Board footer

Powered by FluxBB