Ubuntu

gnome-open uses firefox while it's not the preferred browser

Reported by Ian Corne on 2010-11-02
172
This bug affects 29 people
Affects Status Importance Assigned to Milestone
Chromium Browser
Unknown
Unknown
chromium-browser (Ubuntu)
Medium
Chris Coulson
Natty
Medium
Chris Coulson
gnome-control-center (Ubuntu)
Medium
Michael Terry
Natty
Medium
Michael Terry
xdg-utils (Fedora)
Unknown
Unknown
xdg-utils (Ubuntu)
Medium
Chris Coulson
Natty
Medium
Chris Coulson

Bug Description

Chromium is set as prefered browser, but firefox opens.

$ gconftool --get /desktop/gnome/url-handlers/http/command
/usr/bin/chromium-browser %s

[Workaround]
Run:
  xdg-mime default chromium-browser.desktop x-scheme-handler/http
  xdg-mime default chromium-browser.desktop x-scheme-handler/https

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: libgnome2-0 2.32.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.36-1.7-generic-pae 2.6.36
Uname: Linux 2.6.36-1-generic-pae i686
Architecture: i386
Date: Tue Nov 2 22:13:37 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: libgnome

Ian Corne (icorne) wrote :
Changed in libgnome (Ubuntu):
status: New → Confirmed
summary: - gnome-opens uses firefox while it's not the prefered browser.
+ gnome-open uses firefox while it's not the preferred browser
Evan Broder (broder) on 2010-11-20
Changed in libgnome (Ubuntu):
importance: Undecided → Medium
Anders Kaseorg (anders-kaseorg) wrote :

Hmm. I think this is related to

firefox (4.0~b7+nobinonly-0ubuntu1) natty; urgency=low
  …
  * Add x-scheme-handler magic to desktop files
    - update debian/firefox.desktop.in
    - update debian/firefox-beta.desktop.in
    - update debian/firefox-nightly.desktop.in
    - update debian/firefox-unofficial.desktop.in
  …
 -- Chris Coulson <email address hidden> Wed, 17 Nov 2010 21:35:57 +0000

which causes these warnings when running ‘update-desktop-database’:

$ sudo update-desktop-database
Warning in file "/usr/share/applications/firefox.desktop": usage of MIME type "x-scheme-handler/http" is discouraged (the use of "x-scheme-handler" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/usr/share/applications/firefox.desktop": usage of MIME type "x-scheme-handler/https" is discouraged (the use of "x-scheme-handler" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/usr/share/applications/firefox.desktop": usage of MIME type "x-scheme-handler/ftp" is discouraged (the use of "x-scheme-handler" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/usr/share/applications/firefox.desktop": usage of MIME type "x-scheme-handler/chrome" is discouraged (the use of "x-scheme-handler" as media type is strongly discouraged in favor of a subtype of the "application" media type)

If I remove the x-scheme-handler types from /usr/share/applications/firefox.desktop and rerun ‘update-desktop-database’, the problem goes away, and gnome-open lets me use my preferred web browser again.

affects: libgnome (Ubuntu) → firefox (Ubuntu)
Sebastien Bacher (seb128) wrote :

the issue is rather that chromium and other need similar updates

Sebastien Bacher (seb128) wrote :
affects: firefox (Ubuntu) → chromium (Ubuntu)
affects: chromium (Ubuntu) → chromium-browser (Ubuntu)
Anders Kaseorg (anders-kaseorg) wrote :

I now have chromium-browserchromium-browser 9.0.587.0~r66374-0ubuntu1~ucd~dev2 from ppa:chromium-daily-dev, which has already been updated to include
  MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
in /usr/share/applications/chromium-browser.desktop. However, this isn’t sufficient to cause Chromium to act as the default browser, either when I select it in gnome-default-applications, or when I tell Chromium to make itself the default browser in its Preferences page.

It finally worked after I manually ran
  xdg-mime default chromium-browser.desktop x-scheme-handler/http
  xdg-mime default chromium-browser.desktop x-scheme-handler/https

gnome-default-applications-properties needs to be updated to set the default associations for these new types, and xdg-settings needs to be updated so that chromium can set them for itself.

Bastien Nocera (hadess) wrote :

Downgrade to a glib2 that's not targetted for GNOME 3, or upgrade the control-center to GNOME 3. It's a packaging bug, with mismatching versions.

Evan Broder (broder) on 2010-11-22
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Medium
Changed in xdg-utils (Ubuntu):
importance: Undecided → Medium
Alex Mayorga (alex-mayorga) wrote :

These Mozilla Minefield crashes might be related:
Firefox-4.0 4.0b9pre Crash Report [@ nsGNOMEShellService::SetDefaultBrowser ] http://crash-stats.mozilla.com/report/index/0cad1e34-8713-48d0-b123-2f3372110103

Dmitry Shachnev (mitya57) wrote :

I get the same on the latest Chromium from ppa:chromium-daily/ppa:

Warning in file "/usr/share/applications/chromium-browser.desktop": usage of MIME type "x-scheme-handler/http" is discouraged (the use of "x-scheme-handler" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/usr/share/applications/chromium-browser.desktop": usage of MIME type "x-scheme-handler/https" is discouraged (the use of "x-scheme-handler" as media type is strongly discouraged in favor of a subtype of the "application" media type)

Chris Coulson (chrisccoulson) wrote :

Alex - yes, quite possibly. I will investigate that and address as part of https://bugzilla.mozilla.org/show_bug.cgi?id=611953 if it's related

Changed in gnome-control-center (Ubuntu):
assignee: nobody → Michael Terry (mterry)
Sebastien Bacher (seb128) wrote :

gnome-control-center (1:2.32.1-0ubuntu3) natty; urgency=low

  * 140_backport_default_internet_apps.patch:
    - Backport default Internet app panel from 3.0 to 2.32. This lets one
      set the new-style glib url handlers for web and mail.
  * 141_set_default_internet_apps.patch:
    - On startup, set the web and mail combo boxes to the current glib
      value. Patch sent upstream.
  * 142_fix_icons_for_default_apps.patch:
    - Fix icon handling for web and mail combo boxes. Patch sent upstream.
  * 143_write_default_internet_apps_to_gconf.patch:
    - Until we update GNOME to 3.0, write back the current glib url
      handlers to gconf for apps still directly using such keys rather than
      the glib functions for launching apps.

Changed in gnome-control-center (Ubuntu):
status: New → Fix Released
Dmitry Shachnev (mitya57) wrote :

I think a solution for Chromium will be to use "new" mimes only on Natty, and revert to the old ones on Lucid/Maverick.
(It does not affect the current 8.0.552 branch, but it will affect 9.0.593+ branch when it'll be released. Also, it affects beta/dev/nightly ppas).

Sebastien Bacher (seb128) wrote :

seems the issue has been fixed upstream in http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=6f49c05ceb2a1935d07c49c2e100b5cf3cdf5f26 if someone wants to work on backporting that to natty

Changed in xdg-utils (Ubuntu):
status: New → Triaged
Sebastien Bacher (seb128) wrote :

not that the GNOME3 detection code will need to be updated since the libraries changed in natty but GNOME is still 2.32 so checking for the binary the way it's done upstream will not work on natty

Do you plan to include Gnome Control Centre 3 (when it is released) in Natty?

Sebastien Bacher (seb128) wrote :

no, GNOME3 is released some weeks before natty

Bryce Harrington (bryce) on 2011-03-18
description: updated
Changed in xdg-utils (Ubuntu):
assignee: nobody → Chris Coulson (chrisccoulson)
status: Triaged → In Progress
milestone: none → ubuntu-11.04-beta-2
Changed in chromium-browser (Ubuntu Natty):
status: Confirmed → Triaged
assignee: nobody → Chris Coulson (chrisccoulson)
milestone: none → ubuntu-11.04-beta-2
Changed in xdg-utils (Ubuntu Natty):
status: In Progress → Triaged
Chris Coulson (chrisccoulson) wrote :

I can't upload xdg-utils, so I'll just attach the diff here.

This is just a backport of the relevant parts of http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=6f49c05ceb2a1935d07c49c2e100b5cf3cdf5f26 to make the default browser/mail settings use the x-scheme-handler mimetypes.

In addition to this though, I had to also fix xdg-mime to use the users correct default mimetype handler settings (it was using ~/.local/share/applications/defaults.list, which is wrong. It'e meant to be ~/.local/share/applications/mimeapps.list, according to http://www.freedesktop.org/wiki/Specifications/mime-actions-spec and this is what everything else already uses)

Chromium is shipping its own xdg-mime and xdg-settings, so I've assigned myself to that too

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-utils - 1.1.0~rc1-2ubuntu2

---------------
xdg-utils (1.1.0~rc1-2ubuntu2) natty; urgency=low

  * Fix LP: #670128 - gnome-open uses firefox while it's not the preferred
    browser. Backport upstream changes to use the x-scheme-handler types
    for checking/setting the default browser/mail client in xdg-settings
    and xdg-email. In addition to this, we fix xdg-mime to get/set
    default mimetype handlers using the users mimeapps.list, rather than
    the defaults.list, which doesn't work anywhere
    - add debian/patches/gnome-3.0.diff
    - update debian/patches/series
 -- Chris Coulson <email address hidden> Fri, 08 Apr 2011 02:00:05 +0100

Changed in xdg-utils (Ubuntu Natty):
status: Triaged → Fix Released
Didier Roche (didrocks) on 2011-04-08
Changed in chromium-browser (Ubuntu Natty):
status: Triaged → Invalid

This bug is still present in chromium-browser. (To be sure, I tested again with chromium-browser 10.0.648.204~r79063-0ubuntu2 and xdg-utils 1.1.0~rc1-2ubuntu2.)

See Chris’s comment #16: “Chromium is shipping its own xdg-mime and xdg-settings, so I've assigned myself to that too”.

Changed in chromium-browser (Ubuntu Natty):
status: Invalid → Confirmed
Sebastien Bacher (seb128) wrote :

doesn't seem sponsoring is required there so unsubscribing the sponsors but feel free to add them back if that's wrong

tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package chromium-browser - 10.0.648.205~r81283-0ubuntu1

---------------
chromium-browser (10.0.648.205~r81283-0ubuntu1) natty; urgency=high

  * New upstream minor release from the Stable Channel (LP: #762275)
    This release fixes the following security issues:
    - [75629] Critical, CVE-2011-1301: Use-after-free in the GPU process.
      Credit to Google Chrome Security Team (Inferno).
    - [78524] Critical, CVE-2011-1302: Heap overflow in the GPU process. Credit
      to Christoph Diehl.
  * Make the default mail client and browser settings work with the
    x-scheme-handler method of registering URI handlers in gnome3.
    This is based on the xdg-utils 1.1.0~rc1-2ubuntu3 fix by Chris Coulson
    <email address hidden>, itself based on Bastien Nocera <email address hidden>
    upstream fix (LP: #670128)
    - add debian/patches/xdg-utils_gnome3_lp670128_for_natty.patch
    - update debian/patches/series
  * Fix the apport hooks to pass the expected 'ui' to add_info(), needed when
    called from apport/ubuntu-bug (LP: #759635)
    - update debian/apport/chromium-browser.py
  * Report a dedicated WMClass per webapp, needed by Unity/bamf.
    (backported from trunk) (LP: #692462)
    - add debian/patches/webapps-wm-class-lp692462.patch
    - update debian/patches/series
 -- Fabien Tassin <email address hidden> Thu, 14 Apr 2011 22:36:16 +0200

Changed in chromium-browser (Ubuntu Natty):
status: Confirmed → Fix Released
Otus (jan-varho) wrote :

This is *not* fixed in chromium 10.0.648.205~r81283-0ubuntu1 for me. The browser asks to set default at each launch, but doesn't actually set even if I give it permission.

James Cuzella (trinitronx) wrote :

This bug does *not* seem fixed for me. I'm running:

google-chrome-stable - 11.0.696.68-r84545
xdg-utils - 1.1.0~rc1-2ubuntu3
Ubuntu 11.04 "natty"

Setting via chrome's internal "Make Google Chrome my default browser" button does *not* work.
Setting via "sudo update-alternatives --config x-www-browser" does *not* work.
Setting via 'System'->'Preferences'->'Preferred Applications' does *not* work.

Micah Gersten (micahg) wrote :

If it's just about setting the default browser, that's being tracked in bug 776393. This bug was for opening links in chromium/chrome once it already is set as the default.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.