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

Bug #52670 reported by Kyromaster
88
This bug affects 4 people
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Gutsy by Henrik Nilsen Omma
thunderbird (Ubuntu)
Confirmed
Wishlist
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".

UPDATE:
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

Revision history for this message
Kenny Duffus (kduffus) wrote :

please report bugs on the relevant package

Changed in kubuntu-meta:
status: Unconfirmed → Rejected
Revision history for this message
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!

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

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
Revision history for this message
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
Revision history for this message
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!

Revision history for this message
Kyromaster (kyromaster) wrote :

BTW how do I reopen a bug?

Revision history for this message
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.

Revision history for this message
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)
Changed in mozilla-thunderbird:
importance: Untriaged → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) 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.

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.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

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.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Sorry, there is another solution:

3) Thunderbird offers a list of known browsers.

Revision history for this message
PJJ (pj90292) wrote :

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

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

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...

Revision history for this message
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.
So:

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

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

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

Revision history for this message
Ian Gilfillan (launchpad-greenman) wrote :

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
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote : Re: Thunderbird (and other Gnome apps) use konqueror as web browser

@Ian

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.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

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
Revision history for this message
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.

Revision history for this message
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 :)

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

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.

Revision history for this message
Joseph Garvin (k04jg02) wrote : Possible solution

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.

Revision history for this message
Joseph Garvin (k04jg02) wrote :

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

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Assigned to Mozilla Team

Changed in mozilla-thunderbird:
assignee: nobody → mozilla-bugs
Revision history for this message
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!

Revision history for this message
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)
Changed in thunderbird:
status: Confirmed → Rejected
Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

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.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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

see:
https://bugs.launchpad.net/ubuntu/+bug/52670

Revision history for this message
tmp (skrald) wrote :

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

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

not currently. I believe Cimmo was looking into it.

Tsvi Mostovicz (tsvi)
description: updated
Revision history for this message
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");
 config->setGroup("General");
 QString exec;
 if (radioExec->isChecked())
 {
    exec = lineExec->text();
    if (m_browserService && (exec == m_browserExec))
       exec = m_browserService->storageId(); // Use service
    else
       exec = "!" + exec; // Litteral command
 }
 config->writePathEntry("BrowserApplication", exec, true, true);
 config->sync();
 delete config;

 KIPC::sendMessageAll(KIPC::SettingsChanged);

 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.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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...

Revision history for this message
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:
#!/bin/sh
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.

Revision history for this message
D. Brodzik (amyrose) wrote :

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

Revision history for this message
D. Brodzik (amyrose) wrote :

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

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

@Amy

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.

Revision history for this message
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.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

@Amy

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).

Revision history for this message
D. Brodzik (amyrose) wrote :

@manu

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.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

@Amy

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 :

#!/bin/sh
exec /usr/bin/kfmclient OpenURL "$*"

That makes a lot of sense, I think.

Revision history for this message
D. Brodzik (amyrose) wrote :

@manu

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.

Revision history for this message
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).

Revision history for this message
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? :)

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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