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

Archived topics about LMDE 1 and LMDE 2
Locked
venom104

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

Post by venom104 »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sagirfahmid3

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

Post by sagirfahmid3 »

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

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

Post by venom104 »

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.
sagirfahmid3

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

Post by sagirfahmid3 »

Works here in Xchat.
Locked

Return to “LMDE Archive”