21

I use Xubuntu 12.04. I uninstalled Firefox and now use Google Chrome version 19.xxx.

To solve this problem, I tried:

  • galternatives

  • the "default apps" under settings and

  • sudo update-alternatives --config x-www-browser

Neither of these worked. Does anybody have an alternative solution for this?

--> Solution: I used the "sudo gedit /usr/share/applications/defaults.list" tip from 天使の and searched for firefox in the whole document! Everytime I found "firefox" I replaced it with "google-chrome.desktop". I also used the "default apps" menu to change it to google-chrome. And now it works.. I hope it helps some other ;-)

4
  • You uninstalled Firefox, so presumably only have Chrome left as a browser... so what exactly are you trying to do that leads to the conclusion Chrome isn't your default browser? May 28, 2012 at 11:28
  • 1
    If I click "Webbrowser" in the application menu, Xubuntu asks me, what it should use as default webbrowser. If I start google chrome, chrome says, it is not the default browser. So, I´m just trying to start chrome and xubuntu tells me in a different ways, that the only webbrowser I have is not the default one. I guess the way, which leads to the conclusion is clear...
    – mpm
    May 28, 2012 at 15:37
  • Chrome often doesn't seem to think it is the default browser (even when it is) on Linux. That the Xfce shortcut for Web Browser does not work when you've set Preferred Apps is odd, but easily fixed by replacing the shortcut for a shortcut for Chrome. One way to tell your default browser is really chrome is to click on links in various applications and see if they open in Chrome. From what you've described, it should work. May 29, 2012 at 3:49
  • See also: github.com/mate-desktop/mate-control-center/issues/91 (for MATE, not XFCE) Mar 23, 2014 at 12:19

10 Answers 10

28

SOLVED:

Listen, the easy way to do this is open xfce4-settings-manager as root either with

sudo bash
xfce4-settings-manager

or

gksu xfce4-settings-manager

then select preferred apps, and under browsers select other then paste:

/usr/bin/X11/chromium-browser

close it and you are good for all users, forever. :D

2
  • He is not asking about Chromium. He's asking about Chrome.
    – Green
    Jul 6, 2013 at 18:02
  • 1
    This works and is easy. He just put the wrong browser in there. In Preferred Applications you can browse for it in /usr/bin/ - it's called google.chrome, which is a symlink to /opt/google/chrome/google-chrome. Or you can just paste /usr/bin/google-chrome "%s" in there. I think you need the %s arg. You can also get there through the Applications Menu: Settings > Settings Manager > Preferred Applications.
    – paul
    Oct 9, 2013 at 16:51
14

Maybe use this way

gksudo gedit /usr/share/applications/defaults.list

try to find x-www-browser and set its value to your google-chrome.desktop location

EDIT

if you won't find x-www-browser, then try to search for


text/html=firefox.desktop;google-chrome.desktop
text/xml=firefox.desktop;google-chrome.desktop
application/xhtml_xml=google-chrome.desktop
x-scheme-handler/http=firefox.desktop;google-chrome.desktop
x-scheme-handler/https=firefox.desktop;google-chrome.desktop
x-scheme-handler/ftp=google-chrome.desktop
3
  • Thanks for the tip! Unfortunately, it doesn´t worked. I only found the sentences after your Edit and I changed all of them to "google-chrome.desktop" only. I also changed "application/xhtml+xml=google-chrome.desktop". After restarting the system, nothing changed and I´m gonna asked again, what I want to use.
    – mpm
    May 28, 2012 at 15:49
  • Please replace sudo with gksudo. ubuntuforums.org/showpost.php?p=7904987&postcount=7
    – ignis
    Oct 7, 2012 at 10:19
  • ok @ignis, now will edit
    – hingev
    Oct 8, 2012 at 15:41
2

In "settings manager", chose "preferred applications". The path to the chromium executable is /usr/bin/X11/chromium-browser. Had the same problem as you, and this solved it.

1
  • /usr/bin/X11 is just a symbolic link to /usr/bin, for backward compatibility. A more canonical path for chromium-browser is /usr/bin/chromium-browser. However, and more importantly, this question is about making Chrome the default browser. Google Chrome and Chromium are related but different browsers. Jun 4, 2012 at 18:24
2

First I tried replacing firefox with chromium-browser everywhere in this document:

gksudo gedit /usr/share/applications/defaults.list

It didn't work. Still Firefox would open my documents rather than Chromium.

Then I did this alternative:

sudo update-alternatives --config x-www-browser

Got three alternatives:

0 - auto
1 - manual Chromium-browser
2 - manual Firefox

I selected 0. Now it works!

1

If you meant the 'Web Browser' shortcut at the bottom screen dock, when you click it, it will ask you to choose the browser you want to use and in the list, there is no chrome right?

Just choose "Other..." (it's on the bottom of the drop-down menu) and enter 'google-chrome' and press ok.

It will now open chrome when you click it later on.

Happy Xubuntuing! ;)

1

Instructions for setting up SRWare (Iron Browser) as your default in Linux Mint 14:

sudo apt-get install chromium ( or use synaptic ) then..

sudo apt-get install galternatives then.....

sudo update-alternatives --config x-www-browser

You will now see choices and you should now see chromium (was option 0 for me.. choose and hit enter)

Example:

  0            /usr/bin/chromium-browser   40        auto mode
  1            /usr/bin/chromium-browser   40        manual mode
  2            /usr/bin/firefox            40        manual mode

Now go into "preferred applications" and you'll see chromium, change that to Chromium.

Now selecting links in IRC, ect., it will open up Iron Browser and not the default Firefox, and wont open in Chromium as long as you have Iron already opened up!

Oh happy days are here again!! \o/

(if you do not install chromium before doing any of this, you will see no other options in x-www-browser, config editor or preferred applications)

Hope this helps all the complaints I see all over the place on Iron not setting as default in Mint! :)

1

Xubuntu 14.04 LTS

Making Chrome as the default browser for XFCE.

gedit ~/.local/share/applications/mimeapps.list

[Added Associations]
text/plain=gedit.desktop;openoffice.org-writer.desktop;
application/x-shellscript=gedit.desktop;
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;
inode/directory=Thunar-folder-handler.desktop;
application/xml=gedit.desktop;
application/pdf=qpdfview.desktop;

[Default Applications]
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
application/pdf=qpdfview.desktop
0

I'm running 11.04 with Chrome 18 and I was able to change the default browser inside Chrome's Settings via the wrench menu.

At the very bottom of the main Settings page is a button for default browser. I had an external application open. The first time Firefox started. After the change, a new Chrome tab opened upon clicking a link in the external application, without restarting any of the applications.

You didn't say whether you have tried this, so we don't know whether this is an issue with 12.04.

Edit: It may be that Chrome's settings don't have the desired effect in Xubuntu, as they do in stock Ubuntu. More info might help us find an answer.

0

This is still broken in 13.04. I installed Chrome, and now every time I click on a link in another application, it asks what browser I want to make the default (I click chromium-browser); and every time I start Chrome manually, it asks if I want to make it the default browser (yes).

Why is this setting not sticking? Has someone in Ubuntu dev got it in for Chrome?

This has been an issue since 12.04 and is still not fixed. Fixing it via the command line or config edit is fine for experts and sysadmins, but so far I have had to explain it away to all my users by saying that someone fouled up the code and you have to do this by hand and one day perhaps they'll get it fixed.

It really looks bad when this kind of thing never gets fixed.

-1
gvfs-mime --set x-scheme-handler/http google-chrome.desktop
gvfs-mime --set x-scheme-handler/https google-chrome.desktop
gvfs-mime --set text/html google-chrome.desktop
1
  • 3
    this is a code-only answer. Please explain what this does and why it helps.
    – guntbert
    Sep 7, 2016 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .