LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-01-2014, 10:42 PM   #1
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
URL Handler opens Firefox instead of Chrome


Hi,

I use Google Chrome as main browser, but when I want to open a url, it opens firefox instead.

I know it has to do with mime-types, but I'm not too familiar with it. I tried including the following in ~/.local/share/applications/mimeapps.list:

x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;
x-scheme-handler/ftp=google-chrome.desktop;
x-scheme-handler/chrome=google-chrome.desktop;
text/html=google-chrome.desktop;
application/x-extension-htm=google-chrome.desktop;
application/x-extension-html=google-chrome.desktop;
application/x-extension-shtml=google-chrome.desktop;
application/xhtml+xml=google-chrome.desktop;
application/x-extension-xhtml=google-chrome.desktop;
application/x-extension-xht=google-chrome.desktop;

But I guess this is not enough or not the right thing to do... What do I have to do to make it work?

I have the same problem with torrent-magnet handling. It opens firefox where I would like transmission-gtk to handle it.

Thanks,
 
Old 05-02-2014, 12:01 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,184

Rep: Reputation: Disabled
Quote:
Originally Posted by kcirick View Post
when I want to open a url
To help you, here is what we we need to know:
  • In which program or utility do you open the url?
  • Which desktop or windows manager are you using?
Thanks in advance for your answers.
 
Old 05-02-2014, 01:07 AM   #3
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by Didier Spaier View Post
To help you, here is what we we need to know:
  • In which program or utility do you open the url?
  • Which desktop or windows manager are you using?
Thanks in advance for your answers.
Thanks for your quick reply. Here are the answers to your questions:

- The program could be anything, but as some examples, pidgin and evince.

- I have openbox as WM, but I use a lot of XFCE programs like xfce-terminal and thunar

I hope these are useful information.. let me know if I can provide further information.
 
Old 05-04-2014, 07:44 AM   #4
lopid
Member
 
Registered: Jun 2008
Posts: 156

Rep: Reputation: Disabled
Try xfce4-mime-settings.
 
Old 05-07-2014, 05:25 PM   #5
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Original Poster
Rep: Reputation: 55
Hi,

I have tried xfce4-mime-settings, and I set all of the settings that has Firefox to google-chrome. I just tested pidgin, and it still opens the url in Firefox.

Any other suggestions?

Thanks,
 
Old 05-07-2014, 06:35 PM   #6
beder
Member
 
Registered: Apr 2011
Posts: 82

Rep: Reputation: 28
I have a similar, but maybe not so much, problem to yours.
My problem is that when I update firefox, any program (including Pidgin which you also mentioned) still tries to open the old binary (for ex, /usr/bin/firefox-21) but can't find it.
I got so tired of trying to fix it, that I eventually created a symbolic link /usr/bin/firefox-21 pointing to /usr/bin/firefox, which actually launches the latest version, so it "solved" the issue, even though not in a pretty way

So any answers you might find here may also help solve this upgrade-and-can't-find-the-right-binary-anymore problem
 
Old 05-08-2014, 01:53 PM   #7
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by beder View Post
My problem is that when I update firefox, any program (including Pidgin which you also mentioned) still tries to open the old binary (for ex, /usr/bin/firefox-21) but can't find it.
I answered your one in a post the other day.

Quote:
Originally Posted by ruario View Post
This should fix it:

Code:
$ rm ~/.local/share/applications/userapp-Firefox-*.desktop
$ sed -i '/userapp-Firefox/d' ~/.local/share/applications/mimeapps.list
Quote:
Originally Posted by ruario View Post
Just to expand on the problem. This was caused by Firefox creating a userapp-Firefox-XXXXXX.desktop file and updating mimeapps.list to point to it. This will happen whenever you set Firefox as your default browser from within Firefox itself, rather than your via desktop environment. The breakage is because userapp-Firefox-XXXXXX.desktop can contain hardcoded paths (to binaries, icons, etc.), which might change with future Firefox releases.

I would recommend you set your default browser via the desktop environment itself, e.g. in KDE "System Setting > Default Applications > Web Browser". This avoids having to remove a broken userapp-Firefox-XXXXXX.desktop and correct mimeapps.list manually again in the future.
 
1 members found this post helpful.
Old 05-11-2014, 09:20 AM   #8
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
You might have multiple things going on, here.

KDE and XFCE both subscribe to the xdg-* stuff, from portland.freedesktop.org

Note that all examples are done in XFCE's Terminal under XFCE. Just to make sure I'm using the xdg stuff.

xdg-open is used by KDE/XFCE programs/utilities to open something, so:
Code:
james@gaz:~$ xdg-open 'http://www.linuxquestions.org'
opens the website in your default xdg/freedesktop browser.

To see which browser that is, do this:
Code:
james@gaz:~$ xdg-settings --help
xdg-settings - get various settings from the desktop environment

Synopsis

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

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

Use 'man xdg-settings' or 'xdg-settings --manual' for additional info.
james@gaz:~$ xdg-settings --list
Known properties:
  default-web-browser           Default web browser
james@gaz:~$ xdg-settings get default-web-browser
firefox.desktop
james@gaz:~$
Use xdg-settings set to set it to something else, like chrome.desktop or something. I guess? Haven't done it myself.

This whole thing is in the xdg-utils package, for -current:
Code:
james@gaz:~$ ls -l /var/log/packages/xdg*
-rw-r--r-- 1 root root 8253 Jul 28  2012 /var/log/packages/xdg-user-dirs-0.14-i486-1
-rw-r--r-- 1 root root 1485 Nov  1  2013 /var/log/packages/xdg-utils-1.1.0_rc1-noarch-2
james@gaz:~$
Also xdg-mime for mime-type handling:
Code:
james@gaz:~$ xdg-mime
xdg-mime - command line tool for querying information about file type handling
and adding descriptions for new file types

Synopsis

xdg-mime query { filetype | default } ...

xdg-mime default application mimetype(s)

xdg-mime install [--mode mode] [--novendor] mimetypes-file

xdg-mime uninstall [--mode mode] mimetypes-file

xdg-mime { --help | --manual | --version }

Use 'man xdg-mime' or 'xdg-mime --manual' for additional info.
james@gaz:~$
Non-freedesktop.org / portland (project name?) Desktop Environments use system mime types and similar, I _think_. So, depending upon whether you're using KDE/XFCE programs or, e.g., Window Maker or something, you can expect different behavior.

Hope this helps somebody some.

Last edited by jamesf; 05-11-2014 at 09:26 AM.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
epiphany external protocol/url handler: can't configure ed2k fbianconi Linux - Desktop 0 07-06-2008 01:23 PM
no url handler for dvd:// in totem Simon Bridge Linux - Software 0 08-20-2005 03:57 AM
IRSSI URL Handler? Crashed_Again Linux - Software 5 03-04-2005 01:14 PM
how do I make a url handler? Moses420ca Linux - Software 0 09-24-2003 11:11 AM
telnet url handler ? sn9ke_eyes Linux - Software 2 04-02-2003 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration