How to make xdg-open work with the getfirefox.com firefox

Archived topics about LMDE 1
Forum rules
venom104
Level 1
Level 1
Posts: 46
Joined: Sun Sep 05, 2010 11:58 am

How to make xdg-open work with the getfirefox.com firefox

Postby venom104 » Tue Aug 14, 2012 3:24 am

Let me guess, you probably have the same problem I have...links open in chrome and not firefox right? HERE IS HOW TO FIX THAT!

It took me a while to figure this out, so I'll post the solution...

If you downloaded firefox from getfirefox.com (the executable version) and you try and open links in pidgin or something other than a broswer, you'll notice that they may not open in firefox. Here is how to get it to work... I will paraphrase the directions from here...http://crunchbanglinux.org/forums/topic ... -resolved/


Open your favorite text editor and paste this...

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Firefox
Comment=Run Firefox
Exec=/opt/firefox/firefox
TryExec=/opt/firefox/firefox
StartupNotify=true
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/firefox.png
GenericName=Web Browser
Categories=Application;Network


Make sure you edit the Exec and TryExec fields to where your firefox executable is.

Save the file, and transfer it to here...

/usr/share/applications

You should need to use sudo for that.

Then follow the directions from here...http://forums.debian.net/viewtopic.php?f=6&t=74538 and here...http://www.cyberciti.biz/faq/install-fi ... -in-linux/

I will paraphrase them for you...

Code: Select all

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 100

Code: Select all

update-alternatives –install  /usr/bin/firefox gnome-www-browser /opt/firefox/firefox 100


Again...alter the second parameter these (the one starting with /opt) and change them to where you firefox executable is.

Then...

Code: Select all

update-alternatives –config gnome-www-browser


Select firefox and press enter

Then

Code: Select all

update-alternatives --config x-www-browser



Select firefox and press enter

The last step is just to check that everything went well

open the file ~/.local/share/applications/mimeapps.list in your text editor and find these entries. MAKE SURE THEY POINT TO FIREFOX AND HAVE .desktop at the end of them.

x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop


Anyway that worked for me...I spent about 2 hours google searching stuff on the internet and this is what worked for me. I am running Linux Mint Debian Edition and my links finally open in other browsers. IN THEORY this should probably work for other browsers, but since I have not tried it I can't be sure.

User avatar
sagirfahmid3
Level 6
Level 6
Posts: 1044
Joined: Sun Sep 04, 2011 12:39 pm

Re: How to make xdg-open work with the getfirefox.com firefo

Postby sagirfahmid3 » Tue Aug 14, 2012 5:58 am

Faster and easier way:
1. "sudo apt-get install galternatives"
2. "gksu galternatives"
Image

venom104
Level 1
Level 1
Posts: 46
Joined: Sun Sep 05, 2010 11:58 am

Re: How to make xdg-open work with the getfirefox.com firefo

Postby venom104 » Tue Aug 14, 2012 11:47 pm

sagirfahmid3 wrote:Faster and easier way:
1. "sudo apt-get install galternatives"
2. "gksu galternatives"
Image



I haven't tried your way, but are you sure it will work? It looks like it just registers the http(s) handlers and doesn't create the firefox.desktop file that you need for xdg-open to work.

User avatar
sagirfahmid3
Level 6
Level 6
Posts: 1044
Joined: Sun Sep 04, 2011 12:39 pm

Re: How to make xdg-open work with the getfirefox.com firefo

Postby sagirfahmid3 » Wed Aug 15, 2012 10:20 am

Works here in Xchat.


Return to “Archive”

Who is online

Users browsing this forum: No registered users and 0 guests