xubuntu desktop fails to respect "preferred applications"

Bug #794720 reported by David A. Cobb
88
This bug affects 22 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Invalid
Medium
Unassigned
mozilla-firefox (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: xfwm4

On my wife's desktop, the preferred web-browser is set, via "Settings Manager", to chromium-browser. However, if she clicks a web link received by email (thunderbird), firefox is always launched. Also, clicking the generic "Web Browser" icon in the bottom panel launches firefox.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: xfwm4 4.8.1-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Wed Jun 8 15:36:45 2011
InstallationMedia: Xubuntu 11.04 "Natty Narwhal" - Release i386 (20110427)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xfwm4
UpgradeStatus: No upgrade log present (probably fresh install)

WORKAROUND:
Xfce stores it at ~/.config/xfce4/helpers.rc
There will be a key named WebBrowser. e.g: WebBrowser=firefox

Using an editor, complete the following steps:
1. change preferred browser in Settings -> Preferred Applications
2. open a terminal, type
   cd ~/.config/xfce4/
3. type
   mousepad helpers.rc
4. find "WebBrowser=firefox"
5. change the line to read "WebBrowser=chromium-browser"
6. Save the file
exit the terminal

Revision history for this message
David A. Cobb (superbiskit) wrote :
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

This is probably related to bug 604568. I am marking it triaged, there really should be an easy way for Xubuntu users to change the default browser.

Changed in xfwm4 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
description: updated
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

The button on the bottom panel is a launcher. You can right-click it, click properties. Use the + to add chromium, and the - to remove firefox.

You will also need to change the preferred browser as noted in the WORKAROUND above.

Revision history for this message
David A. Cobb (superbiskit) wrote :

The launcher, and the .desktop file under ~/.config contain the following line:

c=exo-open --launch WebBrowser %u

To be sure, I can change "WebBrowser" to chromium-browser, but how does xfce4 / xfwm4 determine what "WebBrowser" means? There is no /usr/bin/webbrowser. There are links /etc/alternatives/x-www-browser and /etc/alternatives/gnome-www-browser; however those would affect the whole system, and really an application should not be looking in /etc/alternatives.

Revision history for this message
David A. Cobb (superbiskit) wrote :

I did some searching around in ~/.config. The results are attached.
It would appear that the culprit is /usr/share/applications/exo-web-browser.desktop, however that does not mention and specific WebBrowser, and we go around in circles from there. The question is still "How is 'WebBrowser' translated to a specific binary??

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

We will have to wait for a developer that knows the answer to "how". I am a triager who helps insure bugs are ready for the developers. I do not know enough about code and programming languages to determine that.

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

I think thunderbird is a bit special, I'm not sure it respects the default settings for the browser. It's handled in its about:config dialog, check the value of "network.protocol-handler.app.http" key (cf. http://kb.mozillazine.org/Setting_Your_Default_Browser#Setting_the_browser_that_opens_in_Thunderbird_-_Linux for more info).

affects: xfwm4 (Ubuntu) → exo (Ubuntu)
Changed in exo (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Bort (spamher1) wrote :

This bug also affects the defined TerminalEmulator.
I have installed the GNUstep development environment and now my standard Terminal has changed to that.

It is not possible to change that with exo-preferred-applications.

Revision history for this message
Bort (spamher1) wrote :

Also the workaround does not work in that case.
I can change the line in ~/.config/xfce4/helpers.rc to TerminalEmulator=xfce4-terminal
However, clicking on the terminal launcher pops a dialog saying "No application selected" with a list of possible terminals.
The xfce4 terminal is listed but the GNUStep terminal starts up and the line in the helpers.rc is changed back to
TerminalEmulator=Terminal

xfce4-terminal is installed and works fine if I start it from that terminal :(

goos news is, if I select the e.g. Debian X Terminal Emulator it works ... and the helpers.rc line shows correctly
TerminalEmulator=debian-x-terminal-emulator

Revision history for this message
Bort (spamher1) wrote :

Ok my problem is solved. GNUStep terminal links Terminal in /usr/bin with its own Terminal Emulator. I changed that link to xfce4-terminal and it works again. I guess there is naming conflict with these two packages, as disucessed here:
http://www.nuxified.org/topic/gnustep_terminal_app_conflicts_with_xfce4_terminal

Revision history for this message
Rom Raptor (romraptor) wrote :

Installing "galternatives" from Software Center is an easy way to fix this, but new users would not figure that out. A feature to change default browser should be installed by default. Especially when it doesn't work with preinstalled applications like Software Center.

Revision history for this message
TraceyC (grrlgeek) wrote :

Despite having set Firefox as my default browser, links still open with Chromium. I have verified that Firefox is properly set in the preferences file.

$ grep Brows .config/xfce4/helpers.rc
WebBrowser=firefox

I don't see a way to alter this with galternatives.

Revision history for this message
Paul Annekov (paul.annekov) wrote :

1. Google Chrome says me that it doesn't set as default browser. I press "Set as default" button. After that the content of ".config/xfce4/helpers.rc" changes to "WebBrowser=google-chrome".
2. After that when I click some link in Skype chat the dialog appeares and suggests to set up default browser. It says that default browser is not selected. If I choose google-chrome and click other links in Skype - they open in Google Chrome. The content of ".config/xfce4/helpers.rc" changes to "WebBrowser=custom-WebBrowser".
3. If I restart browser - it says again that it doesn't set as default browser (facepalm).

It's a bug! Preferred Applications app must store browser binary name, not some obscure "custom-WebBrowser".

Revision history for this message
William Crandell (crandellws) wrote :

I am having the same issue as well described by Paul Annekov (paul.annekov) in comment #13.

Revision history for this message
Richard Elkins (texadactyl) wrote :

Still a bug in Xubuntu 13.04 (Raring) and 13.10 (Saucy daily).

Whenever I open the Settings Manager > Preferred Applications > Internet panel, the Web Browser indicates no selection. But, I have set this dozens of times to "Chromium". (-:

Here is my exact sequence:
1) I set the default browser to Chromium.
2) I click on a link in Thunderbird mail.
3) Chromium (chromium-browser package) launches and reports that it is no longer the default browser - what do you want to do?
4) Launch Settings Manager who shows that Chromium is still the default browser.
5) Alt-tab back to Chromium. Click set as default.
6) Alt-tab back to Settings Manager. Go up and then back to Preferred Applications.
7) Back to square one: I can see No application selected again. Aiyyyyyyyy!

It must be Chromium that is causing this. A default of Firefox has no issues that I can see (tested).

Revision history for this message
Richard Elkins (texadactyl) wrote :

Changed from exo to chromium-browser because it seems to be a better starting point for resolving this issue.

affects: exo (Ubuntu) → chromium-browser (Ubuntu)
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/794720

tags: added: package-qa-testing
Revision history for this message
Jackson Doak (noskcaj) wrote : Re: [Bug 794720] Re: xubuntu desktop fails to respect "preferred applications"

This affects chrome as well and is indeed a bug in it. It is caused by
chrome not recognising what binary it came from.

On Wed, Sep 25, 2013 at 12:14 AM, Richard Elkins
<email address hidden> wrote:
> Changed from exo to chromium-browser because it seems to be a better
> starting point for resolving this issue.
>
> ** Package changed: exo (Ubuntu) => chromium-browser (Ubuntu)
>
> --
> You received this bug notification because you are a member of Xubuntu
> Bugs Team, which is subscribed to exo in Ubuntu.
> https://bugs.launchpad.net/bugs/794720
>
> Title:
> xubuntu desktop fails to respect "preferred applications"
>
> Status in “chromium-browser” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: xfwm4
>
> On my wife's desktop, the preferred web-browser is set, via "Settings
> Manager", to chromium-browser. However, if she clicks a web link
> received by email (thunderbird), firefox is always launched. Also,
> clicking the generic "Web Browser" icon in the bottom panel launches
> firefox.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: xfwm4 4.8.1-1
> ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
> Uname: Linux 2.6.38-8-generic i686
> NonfreeKernelModules: nvidia
> Architecture: i386
> Date: Wed Jun 8 15:36:45 2011
> InstallationMedia: Xubuntu 11.04 "Natty Narwhal" - Release i386 (20110427)
> ProcEnviron:
> LANGUAGE=en_US:en
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: xfwm4
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> WORKAROUND:
> Xfce stores it at ~/.config/xfce4/helpers.rc
> There will be a key named WebBrowser. e.g: WebBrowser=firefox
>
> Using an editor, complete the following steps:
> 1. change preferred browser in Settings -> Preferred Applications
> 2. open a terminal, type
> cd ~/.config/xfce4/
> 3. type
> mousepad helpers.rc
> 4. find "WebBrowser=firefox"
> 5. change the line to read "WebBrowser=chromium-browser"
> 6. Save the file
> exit the terminal
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/794720/+subscriptions

Revision history for this message
Richard Elkins (texadactyl) wrote :

In spite of the documented work-around in the bug description, it no longer works in Saucy (13.10) Xubuntu - maybe other distros too. Every time I click on a link in Thunderbird, it triggers the "Choose Preferred Application" pop-up. I have to select "Chromium" and then I can be on my way. This is really annoying.

Revision history for this message
Richard Elkins (texadactyl) wrote :

This bug seems to be fixed in Xubuntu Saucy (13.10). Thank you. Out of curiosity, what was fixed?

Revision history for this message
Petar Sredojevic (perosredo) wrote :

This is persisting in the 14.04 dailies - setting the default browser to Chromium via Preferred Applications resets on reboot, and even when selected some applications do not honour it.

Revision history for this message
shelleyfrank (michael-pienaar) wrote :

I have discovered that the cause of this behaviour is a file conflict betweentwo seperate defaults.list files. In Mint 17 XFCE my /usr/share/applications/defaults.list and /etc/gnome/defaults.list point to a different web browser. My /usr/share/applications/defaults.list has the entries "x-scheme-handler/http=opera-browser.desktop" and "x-scheme-handler/https=opera-browser.desktop" while /etc/gnome/defaults.list has the entries "x-scheme-handler/http=firefox.desktop" and "x-scheme-handler/https=firefox.desktop". I have Opera set as my preferred application, and that is the browser which opens when exo-open --launch WebBrowser %u is called in the terminal. The applications that open the firefox browser must be reading their instructions from /etc/gnome/defaults.list. When the x-scheme-handler is changed to be opera-browser these applications launch opera in stead of firefox.

Revision history for this message
Zeioth (zeioth) wrote :

In my case the defauly browser is recognized if i open a thunderbird hiperlink, but ignored if i open a webpage from an application. Examples:

LibreOffice > help
Spotify > help
Visual studio code > changelog
etc.

Revision history for this message
Zeioth (zeioth) wrote :

Ok this made the trick for me. Usually, when you install any new browser these values are overriden, and you have to set them again.
Maybe it would be a good idea if these values were automatically updated when you change your default browser using "settings > preferred applications".

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

Source: http://ubuntuforums.org/showthread.php?t=1900454
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1138161

Chad Miller (cmiller)
Changed in chromium-browser (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
dino99 (9d9) wrote :

That version is no more supported

Changed in mozilla-firefox (Ubuntu):
status: New → Invalid
Changed in chromium-browser (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
P. H. Madore (moonpunter) wrote :

As of 15.10, I've noticed that support for at least browser (SeaMonkey) seems to be respected in all applications besides 1) alternative browsers and 2) Thunderbird, which chooses Firefox no matter what, even if you make a change. As a result, I just quit using Thunderbird. I'm not sure if changes were made, but I definitely used to suffer from this bug and no longer do.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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