Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 9 default browser

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Debian 9 default browser

#1 Post by uthappam »

I have Firefox Quantum in /opt in Debian 9 XFCE and want it to be the default browser. I tried

Code: Select all

 update-alternatives --config x-www-browser 
but Firefox Quantum is not shown as an option.

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Debian 9 default browser

#2 Post by arzgi »

uthappam wrote:I have Firefox Quantum in /opt in Debian 9 XFCE and want it to be the default browser. I tried

Code: Select all

 update-alternatives --config x-www-browser 
but Firefox Quantum is not shown as an option.
update-alternatives works only with Debian packages .

Code: Select all

man update-alternatives
How did you install Firefox Quantum?

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#3 Post by uthappam »

I unpacked the downloaded bz2 file and moved the directory which it created to /opt.

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Debian 9 default browser

#4 Post by arzgi »

uthappam wrote:I unpacked the downloaded bz2 file and moved the directory which it created to /opt.
It is not a Debian package, which are all installed by apt from Debian repos, so I see no solution to your problem.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#5 Post by uthappam »

Thank you.


uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#7 Post by uthappam »

Thank you. The second procedure is the one I followed, and Firefox Quantum 61.0.1 is installed and running. But when I click on a URL in an e-mail message, Chromium is what starts up.


User avatar
kingocounty
Posts: 12
Joined: 2018-03-14 13:11

Re: Debian 9 default browser

#9 Post by kingocounty »

If you make a Desktop entry for the new Firefox, you should be able to see it in your list of default choices. This works for me:

Code: Select all

# name this file firefox-quantum.desktop and place it in /usr/share/applications

[Desktop Entry]
Name=Firefox Quantum
Comment=Browse the Web
GenericName=Web Browser
X-GNOME-FullName=Firefox Quantum Web Browser
### make sure the next line matches your executable path ###
Exec=/opt/firefox/firefox %u 
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Firefox-quantum
StartupNotify=true
You may need to adjust it a bit to match your installation location. Take note of the line starting with 'Exec'.

edit: I just noticed you use XFCE (I shouldn't be trying to answer stuff before morning coffee :mrgreen: ). You can probably exclude the line 'X-GNOME-FullName='. You should be able to get some details at the XFCE Wiki.
Last edited by kingocounty on 2018-07-28 11:23, edited 1 time in total.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#10 Post by uthappam »

@arochester, mailto: links are not what troubles me: they are working well in Thunderbird, the default.

Thank you, kingocounty. I shall follow your instructions and tell you what happens.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#11 Post by uthappam »

@kingocounty, I copied your instructions carefully and acted on them: but they did not solve my problem.

In the end I used these two commands

Code: Select all

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200
sudo update-alternatives --set x-www-browser /opt/firefox/firefox
and all is right with my small world.

User avatar
kingocounty
Posts: 12
Joined: 2018-03-14 13:11

Re: Debian 9 default browser

#12 Post by kingocounty »

Glad you got it sorted. As you can tell, I'm a Gnome user :) . After adding a Desktop entry in Gnome, you can then select it under Settings->Details->Default Applications. I'm just adding this note in case any Gnome users stumble across this post. Thanks for posting your solution!

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#13 Post by uthappam »

In XFCE, Settings -> Preferred Applications -> Internet -> Web Browser appears to be meant for the same thing, but I do not know if it works for
executables in places other than /usr/bin.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Debian 9 default browser

#14 Post by Head_on_a_Stick »

uthappam wrote:

Code: Select all

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200
sudo update-alternatives --set x-www-browser /opt/firefox/firefox
^ Be very careful with that command, I've broken my alternatives system more than once that way.

I would recommend galternatives instead.
deadbang

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#15 Post by uthappam »

I shall do that. Thank you. [addition] I installed galternatives: but it does not accept my root password.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Debian 9 default browser

#16 Post by Head_on_a_Stick »

Try

Code: Select all

 # apt install gksu
gksu galternatives
pkexec() would be better but the program doesn't seem to allow that (yet).
deadbang

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#17 Post by uthappam »

Thank you.

Bulkley
Posts: 6387
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Debian 9 default browser

#18 Post by Bulkley »

With all due respect all of the above looks like way too much trouble. The whole idea is to make Firefox Quantum the default browser. Right? Just download the latest firefox tarball, open it and run it in user space. It does not need to be installed. Then use your WM's autostart.sh to open it when booting. Done.

My apologies if I have misunderstood the problem.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Debian 9 default browser

#19 Post by uthappam »

Before Firefox was added to the alternatives list, clicking on a link in an e-mail message would call up the Chromium browser -- even when Firefox was open and running.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Debian 9 default browser

#20 Post by Head_on_a_Stick »

Bulkley wrote:The whole idea is to make Firefox Quantum the default browser. Right? Just download the latest firefox tarball, open it and run it in user space. It does not need to be installed. Then use your WM's autostart.sh to open it when booting. Done.
But that method won't solve the problem because Debian systems are configured to call /usr/bin/x-www-browser rather than FF or Chromium or whatever so changing the alternative is the correct approach.
deadbang

Post Reply