Kubuntu setting default components don't affect gnome/gtk apps

Bug #52670 reported by Kyromaster on 2006-07-11
This bug affects 4 people
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Declined for Gutsy by Henrik Nilsen Omma
thunderbird (Ubuntu)
Mozilla Bugs
Declined for Gutsy by Henrik Nilsen Omma

Bug Description

Binary package hint: kubuntu-desktop

I´ve installed firefox and set it up as my default web browser in the system settings. But when I click on a link in Thunderbird, Konqueror is still opened. Thunderbird should use the web browser set as default in "kde components".

This affects all Gnome applications, such as Open Office, as well. To overcome this, sudo update-alternatives --config x-www-browser needs to be run. The same effect should be achieved from within the GUI.

This bug is part of kcontrol, not kde-systemsettings which is kubuntu's app ==> kdelibs is the source for kcontrol

Kenny Duffus (kduffus) wrote :

please report bugs on the relevant package

Changed in kubuntu-meta:
status: Unconfirmed → Rejected
Kyromaster (kyromaster) wrote :

Why do you reject this?
Where should thunderbird know what´s the default web browser? I think this is really different on kubuntu and ubuntu!

You can reassign bugs to the correct place.

If i remember correctly, this is a setting in thunderbird's users.js - so not a kubuntu metapackage bug.

This is similar to the bug that occurs with getting thunderbird to open with firefox 1.5, at least with the mozilla binaries.

Changed in kubuntu-meta:
status: Rejected → Unconfirmed
John Vivirito (gnomefreak) wrote :

sudo update-alternatives --config x-www-browser (or its www-x-browser) either way you set FF as default there and thunderbird will use it this is not a bug. i am going to close this now thank you for your report. If this does not fix it please re-open this bug.

Changed in mozilla-thunderbird:
status: Unconfirmed → Rejected
Kyromaster (kyromaster) wrote :

This is really nice, but (k)ubuntu should be a distribution which is usable without cryptic commands, so I suggest to integrate this with the environment.
There should be a configuration GUI for that and in kubuntu KDE should be set to use the symlink created by "alternatives" by default, so that the setting will be used in KDE automatically!

Kyromaster (kyromaster) wrote :

BTW how do I reopen a bug?

John Vivirito (gnomefreak) wrote :

click on it where it says affects and you will see drop down box and just set it to unconfirmed/confirmed. If you want to make it a gui app or suggest it to be implenmented please open a different bug for that.

John Vivirito (gnomefreak) wrote :

i reopened this as it is a legit wishlist item

Changed in mozilla-thunderbird:
status: Rejected → Unconfirmed
Daniel T Chen (crimsun) on 2006-07-22
Changed in mozilla-thunderbird:
importance: Untriaged → Wishlist
status: Unconfirmed → Confirmed

> sudo update-alternatives --config x-www-browser (or its www-x-browser) > either way you set FF as default there and thunderbird will use it this is > not a bug. i am going to close this now thank you for your report. If this > does >not fix it please re-open this bug.

Interesting. it seems that the module in system settings doesnt actually modify the path of sudo update-alternatives --config x-www-browser. I'm suspecting it should.

Actually, there are only two solutions:

1) Either the default browser of thunderbird points to the default set by kcontrol.

2) Either kcontrol should update x-www-browser.

However, as far as I know, option (1) is not portable across different desktop environments, while option (2) requires root privileges and it is system-level rather than user-level.

Perhaps someone from the Kubuntu Team can provide some insight on this issue.

On the other hand, perhaps we need a "update-alternatives" tool that works on the user-level also.

Sorry, there is another solution:

3) Thunderbird offers a list of known browsers.

PJJ (pj90292) wrote :

Where is the list and how does one get to it?

I was merely enumerating possible solutions to the problem. Sorry to disappoint you. Also, unfortunately I have not seen any spec about this for Feisty. I guess we are all too busy...

Kyromaster (kyromaster) wrote :

What I think of the correct solution:

The debian-alternatives system is better than the KDE one, but there shouldn´t exist 2 systems.

1. Thunderbird should use the browser set by the alternatives system
2. Threre should be a littel GUI to set options for that system
3. The KDE settings to set a web browser and email Program (and whatever is managed by debian-alternatives) should be removed, instead the debian-alternatives settings should be used.

I don´t know in how far the ubuntu team modifies KDE but this should be possible and is IMHO the most user-friendly and best solution

Actually, there is a big problem there. The debian alternatives-system cannot handle per-user configuration.

Without knowing the intricacies, surely this should be quite easy to fix? Gnome-based apps such as Thunderbird use /etc/alternatives/x-www-browser. So when the default browser is changed, can it not change the default there as well?

This is one of the major gripes new Kubuntu users have :)

description: updated


No because alternatives and kde default components are different. Alternatives are system-wide, they require sudo (root privileges). Kde default components are per-user, they don't require any privileges.

In my opinion, the best ideal solution would be that alternatives could handle per-user configuration and don't require sudo, then kde default components could use the alternatives system. But that is tricky. You have to think about usercases in multi-user environments, how updates would affect per-user alternatives, etc. It would be great to have a specification, https://wiki.ubuntu.com/FeatureSpecifications , but so far no one has volunteered to even try to write it.

Anyway, if you think there is an easy solution, it is worth to try to detail it and write a specification. If you (or someone else) implement it, it would be certainly better than the current situation.

I don't think this is a problem in package mozilla-thunderbird.
It might be better to assign it to kde-guidance, kcontrol or even the package that contains update-alternatives (I don't know which one it is).

description: updated
Joseph Garvin (k04jg02) wrote :

I think we are overcomplicating this. Do all gnome apps only look at /etc/alternatives/x-www-browser? I find it hard to believe that Gnome has no way of setting a per-user preferred browser. If there is a way to set it, then kcontrol / guidance (whichever is responsible, I'm unsure) should simply be patched so that it also changes wherever Gnome apps look for the user's preferred browser. For example, if KDE apps looked at ~/.kde/config/mybrowser (just for example, no idea where KDE apps actually look) and Gnome apps looked at ~/.gnome/config/mybrowser, kcontrol should simply be patched to change both.

It is possible that the user may have both KDE and Gnome installed, and prefer to use Konqueror when in KDE, and say, Epiphany whilst in Gnome, in which case it might be good to look to see if Gnome apps pay attention to an enivornment variable like $BROWSER that could be set.

Ideally maybe freedesktop.org will maybe have a solution someday, but the above seems good enough for now.

Kyromaster (kyromaster) wrote :

I´d also like the solution above, so that firefox just uses gconf and the settings GUI also updates gconf. This could be applied to kde programs under ubuntu (with gnome) as well. Perhaps the user should be informed that this change will also be applied to the other desktop environment if installed.
This would be a good solution IMHO :)

Then, gconf would need to be installed in KDE and KDE needs to understand and track gconf API and all applications that are not KDE and not Gnome apps like Firefox, Thunderbird and OpenOffice would have to understand and track gconf API as well.

I hope you can prove me wrong but I think that scenario is, to say it very mildly, unlikely. And even if someone accepted the burden to develop the patches, it would be very time-consuming to maintain them. After all, KDE, Gnome, Firefox, Thunderbird, OpenOffice, etc change rapidly and I seriously doubt such patches will be accepted upstream.

But I don't want to discourage you to implement it, even if it turns out to be impractical for one reason or another, it would be worth the try and it would be good to know the reasons.

Question: Where do gnome apps look for the per-user browser setting? It may not be gconf. I wasn't suggesting gconf be used.

If I had to guess, I'd say they probably are running /usr/bin/sensible-browser. It's a simple bash script, and if you look at the source, the first thing it does is check the $BROWSER environment variable, and failing that looks at /etc/alternatives/x-www-browser.

This is easily made user configurable by just having kcontrol/guidance changing the $BROWSER environment variable -- it's the first thing checked. Setting an environment variable is easily coded and wouldn't pull in any extra packages for gconf.

Joseph Garvin (k04jg02) wrote :

P.S. This shouldn't be wishlist. It's a bug.

Yuriy Kozlov (yuriy-kozlov) wrote :

I think the solution should be to change x-www-browser to kfmclient openURL on Kubuntu.

This is certainly not a thunderbird bug, I think it's a kubuntu-default-settings bug.

Nick Coghlan (ncoghlan) wrote :

From an end-user POV, this definitely lands in the bug category (it just bit me today when I finally migrated my main email & RSS PC over to Edgy from XP - blog links in Thunderbird's RSS reader insisted on opening in Konqueror instead of in Firefox, even though I had already changed my browser preference. This bug report was the first hit on a Google search for 'thunderbird konqueror').

I like Yuriy's solution: point x-www-browser at 'kfmclient openURL <url>' as part of the default Kubuntu install. That should get the normal situation ('I don't care if it's a GTK or Qt app, I just want it to do what I want') right, and power users that want to use both Gnome & KDE and have them behave differently are still free to go in and change it.

Assigned to Mozilla Team

Changed in mozilla-thunderbird:
assignee: nobody → mozilla-bugs
Marco Cimmino (cimmo) wrote :

I really cannot understand why giving the ball to wrong people!
This is NOT a thunderbird bug, or a gtk bug or whatever!

This is a KUBUNTU specific bug or kde anyway, that doesn't set correctly defaults.
Also openoffice impress has the same problem, also if I set in system settings to firefox there is NO way to open links with firefox instead of konqueror, only with:
sudo update-alternatives --config x-www-browser

so it's NOT a mozilla thunderbird bug!

Owdy (osku) wrote :

I agree with Cimmo. I use differend distro at the moment, with KDE. This isnt issue in this distro. With Kubuntu it was.

Marco Cimmino (cimmo) on 2007-06-08
Changed in thunderbird:
status: Confirmed → Rejected

Thanks for your bug report. To maintain a respectful atmosphere, please follow the code of conduct. <http://www.ubuntu.com/community/conduct/> Bug reports are handled by humans, so please bear this in mind.

Most of the time, the humans arent paid to work on ubuntu either. Feel free to provide a patch, and this will get fixed a lot quicker.

This especially applies to Cimmo, who behaves like this on every bug report that I've seen, and is yet to actually provide a helpful solution, via a debdiff. As far as I can recall, anyway.

Marco Cimmino (cimmo) wrote :

Sarah I have asked a lot of time that someone help me understand how all rules for debdiff should be applied and how to make debian packages, none has the time to teach me.
Of course I cannot put debdiff that has wrong version number, wrong changelog, wrong... etc.

Also some people here _are_ payed to maintain packages, so I don't know which packages are "sponsored" and which not. typically I assume that components in main are sponsorized and this bug is part of package that I'm quite sure it's in main.

Anyway you cannot believe that a person understand alone how to produce debdiff and all the stuff so I disagree to provide a debdiff without a proper knowledge.

Last but not least:
it's not the first time that bugs remains in a vaporware area for ages, because people say that it's affecting that package, no this, no that... why not staying in the real world and understand that this bug doesn't affect A single program but whole kubuntu where default browser/mail client settings are a lot of time ignored?

I'm not discussing that sometimes works is done for free, I'm discussing that the same energies spent to avoid to understand the real problem can be spent to fix it, and have a better kubuntu!
When I have knowledge I always put all my best to test or whatever, see famous bug for usb safely removal that I have tested _all_ solutions provided and given feedback and suggestions.

For further discussion we can meet in irc, hope that this bug will be discussed for real now without giving to others responsibility and fixed soon, because its first birthday is only 1 month far.

Joseph Garvin (k04jg02) wrote :

Regardless of whether the bug is rooted in thunderbird or another component of Kubuntu, why was it rejected? It most definitely exists. Or is it only rejected under thunderbird or something? I can't tell from the description at the status table at the top.

Marco Cimmino (cimmo) wrote :

joseph I have only rejected against thunderbird because I don't really think that fixing thunderbird will affects openoffice and all gtk programs


tmp (skrald) wrote :

Is this bug being worked on? -It's hard to tell from the above comments/statusinfo.

not currently. I believe Cimmo was looking into it.

Tsvi Mostovicz (tsvi) on 2007-06-25
description: updated
Tsvi Mostovicz (tsvi) wrote :

Ok, I did some analysis of what happens when you set defaults in kde default applications.
As I mentioned above this has nothing to do with kde systemsettings which is just a cute view of kcontrol meant for kubuntu.
When you select another default application for email/browsing etc. kcontrol (which is part of kdebase) runs the following function.

void CfgBrowser::save(KConfig *) {

 KConfig *config = new KConfig("kdeglobals");
 QString exec;
 if (radioExec->isChecked())
    exec = lineExec->text();
    if (m_browserService && (exec == m_browserExec))
       exec = m_browserService->storageId(); // Use service
       exec = "!" + exec; // Litteral command
 config->writePathEntry("BrowserApplication", exec, true, true);
 delete config;


 emit changed(false);

If you check the headers, you'll find the function writePathEntry is part of the kconfigbase class.
This function will write a entry to the users home directory at ~/.kde/share/config/some_file (depending on the setting you're changing.)

So to detect changes you'd want something that can detect KIPC::sendMessageAll(KIPC::SettingsChanged);

The true problem here is as mentioned above, the fact that Thunderbird doesn't check the browser environment variable but goes directly by calling x-www-browser which is system wide defined by update-alternatives and therefore should not be changed on a multi-user platform.

So yes, there's where I stop the problem seems to be with thunderbird and not with kde for it not checking user specific variables (where are they set in gnome?) for the moment.

Tsvi Mostovicz (tsvi) wrote :

Check my comments below, thunderbird should check for user set variables for the browser instead of calling directly x-www-browser

Changed in thunderbird:
status: Invalid → Confirmed
Tsvi Mostovicz (tsvi) wrote :

Something should check when KDE sets variables and set the equivalent for Gnome configurations in case a gnome app is installed and should use the same defaults. But this is not really the job of this bug.

Changed in kde-systemsettings:
status: New → Invalid
Joseph Garvin (k04jg02) wrote :

I realize that x-www-browser is set by update-alternatives system wide, but what about modifying x-www-browser it so it first looks for the users preference (it checks if $BROWSER exists first)? After all, setting x-www-browser really just lets the administrator say what browser should be default, it isn't meant to lock down the system to prevent the use of other browsers. I think changing it so that it only used the default if $BROWSER is not set would be reasonable. This lets individual users specify their own browsers without changing the system wide default (without running update-alternatives).

On the other hand, if there is some fd.o approved way of getting the preferred browser, it would probably be preferable to try to get the thunderbird code to use that and make sure kcontrol respects it too.

nathan r (nrutman) wrote :

Over a year later, bug is still unresolved (ubuntu 7.04), and users (me) still find it annoying enough to google for a solution...

D. Brodzik (amyrose) wrote :

I have a workaround to make Thunderbird and Firefox use KDE's settings.

First, create a script called /usr/local/bin/kfmclientexec that contains these two lines only:
kfmclient exec "$*"

Save and make it executable (+x).

Next, in Firefox, go to about:config and create or edit a string value called "network.protocol-handler.app.mailto" and set it to "/usr/local/bin/kfmclientexec". This should make Firefox use the e-mail client you configured in KDE.

In Thunderbird, go to the about:config screen (Edit --> Preferences, Advanced, General, Config Editor) and create or set two string values called "network.protocol-handler.app.http" and "network.protocol-handler.app.https" to "/usr/bin/kfmclientexec"

This should work with the default settings in both programs. I hope this works, at least until things get sorted out better. :) It works for me, at least.

D. Brodzik (amyrose) wrote :

oops, that should be /usr/local/bin/kfmclientexec under Thunderbird. Sorry, my bad.

D. Brodzik (amyrose) wrote :

Oh and if you're paranoid, you can substitute "openURL" for "exec" in the small script.


You implemented option (1) that I described in comment #10 above. It is a nice solution. However, it is not portable at all. In order to implement it as a real fix, Kubuntu would need packages for thunderbird and firefox different from those from Ubuntu. Also, it will break the update-alternatives system (but it is kind of broken right now, so not sure that it matters so much). Nonetheless, perhaps someone could try to package thunderbird-kde and firefox-kde with all the settings adjusted for kde, like your fix plus using kprinter by default (bug 138756) plus using kde file dialogs (bug 43238) and etc.

D. Brodzik (amyrose) wrote :

I just mentioned this as a workaround. A better solution is to provide a script that calls "kfmclient openURL" as an alternative to x-www-browser, and make that script the default in Kubuntu, I think.


You would still need different packages for Kubuntu and Ubuntu since kfmclient is not available in GNOME. I wonder how GNOME is implementing this. (Or for that matter, how OpenSUSE or Fedore implement this in their KDE desktops).

D. Brodzik (amyrose) wrote :


Are you even paying attention to what I said? I'm talking about making this an alternative for /etc/alternatives/x-www-browser Konqueror's an alternative for that when you have KDE installed, but it won't even be an option if it's not installed. Similarly, you'd see the kfmclient-based thing as an option only when you have KDE installed. So no, you wouldn't need to repackage Thunderbird for Kubuntu.


OK. I did not understand that you were talking there about modifying the alternatives for x-www-browser since in your previous comments you were talking about modifying thunderbird and firefox through about:config.

So you mean that instead of Konqueror being an alternative for x-www-browser, it should be a script like /usr/bin/kde-browser :

exec /usr/bin/kfmclient OpenURL "$*"

That makes a lot of sense, I think.

D. Brodzik (amyrose) wrote :


Yes, that's exactly what I meant. :)

This could be fixed upstream if Firefox and Thunderbird would check if the environment variable KDE_FULL_SESSION is set to "true" and that DESKTOP_SESSION is set to "kde", then use kfmclient and kmailservice. I'll go check the Mozilla bug tracker.

Joseph Garvin (k04jg02) wrote :

Is anything wrong with this solution?:

Change the x-www-browser script to first check if the $BROWSER environment variable is set. If it is set, use the browser it says. If not, use the browser specified by debian-alternatives. Then update kcontrol to also change $BROWSER.

Because environment variables can be changed by users, this lets users change their preferred browser without having to sudo edit some script, _and_ there can still be a system default (the one specified by debian alternatives).

I think this is preferable to checking for KDE_FULL_SESSION or the value of DESKTOP_SESSION because that would mean putting a desktop environment specific (KDE) hack into Thunderbird. Then we have to think of submitting a bug to the Mozilla team for what it should do if XFCE is the desktop, or Rox filer is, etc. The above solution gives users will get consistent behaviour even if they do something odd like run kcontrol within Gnome and change the preferred browser setting (this is not unheard of -- e.g. I am going to install kcontrol on my friend's laptop so he can use the GUI font installer since Gnome currently lacks one, and some Gnome users probably install it to change the theme of their QT apps).

Joseph Garvin (k04jg02) wrote :

Thinking about it, I realize that this might "change the meaning" of what the x-www-browser alternative specifies. Its behaviour currently you could describe as, "the preferred browser," whereas with my proposed change it would be, "the default (overridable) preferred browser." Because this isn't really a security issue (if an admin wants to enforce use of a specific browser he needs to properly make sure it's the only one users can use through access privileges, not change x-www-browser) and different users on the same box may prefer different browsers, I think my solution makes more sense. But maybe I haven't thought of something? :)

Paulus (donmatteo) wrote :

For the record, to have hardy's Thunderbird open http links in Opera, I had to change "/desktop/gnome/url-handlers/http/command" (and the corresponding "https" setting), despite this being Kubuntu. Gconf-editor wasn't even installed.

x-www-browser didn't have any effect.

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

Other bug subscribers