Bug 170055 - Improve Firefox KDE integration
Summary: Improve Firefox KDE integration
Status: RESOLVED FIXED
: 299595 409251 494376 537102 537471 (view as bug list)
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: Firefox (show other bugs)
Version: Milestone 4
Hardware: Other SuSE Linux 10.1
: P2 - High : Normal with 3 votes (vote)
Target Milestone: ---
Assignee: Lubos Lunak
QA Contact: E-mail List
URL:
Whiteboard: gnome-function-does-not-work desktop-...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-27 06:15 UTC by Quentin Jackson
Modified: 2020-04-05 18:11 UTC (History)
11 users (show)

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
strace output for firefox while encountering freezes (24.58 KB, application/octet-stream)
2009-10-04 20:02 UTC, Atri Bhattacharya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Quentin Jackson 2006-04-27 06:15:14 UTC
When right-clicking an image in firefox under KDE and choosing set as desktop background, your background stays the same, later when entering the Gnome Window manager you find your image went there.
Comment 1 Stephan Binner 2006-04-27 11:14:06 UTC
Sounds like a task for Portland.
Comment 2 Wolfgang Rosenauer 2006-05-02 18:39:29 UTC
Stephan, if you know who can do anything here, please reassign it.
That's one more GNOME vs. KDE integration and w/o anyone interested from the KDE side this will never change.
Firefox writes the wallpaper setting into gconf.
Comment 3 Stephan Kulow 2006-05-03 08:26:09 UTC
The easiest way would be to call "/opt/kde3/bin/dcop kdesktop  KBackgroundIface setWallpaper <filename>". I don't know if firefox yet has a concept under which desktop it runs.
Comment 4 Wolfgang Rosenauer 2006-05-03 10:16:34 UTC
It has no concept at the moment. We have some code-paths where it makes a difference though.
This stuff is handled by
http://lxr.mozilla.org/mozilla1.8.0/source/browser/components/shell/src/nsGNOMEShellService.cpp

I think it wouldn't be too hard to create another component which would do (almost) the same under KDE. But I don't know anything about KDE. 
Comment 5 Dirk Mueller 2006-05-03 10:22:07 UTC
on my todo
Comment 6 Wolfgang Rosenauer 2007-01-02 08:10:47 UTC
On my TODO is a general concept now to recognize which desktop is used.
To get started with something practical it would be _very_ nice if someone from KDE would implement a nsKDEShellService like the nsGNOMEShellService implementing this interface:
http://lxr.mozilla.org/seamonkey/source/browser/components/shell/public/nsIShellService.idl

It seems that at least something can be done using dcop commandline. I wonder if there is C/C++ interface as well (preferably w/o linking all of KDE for it).

I could do the work to make the mozilla specific stuff work since it would need some restructuring to either load the GNOME or the KDE shell service.
Comment 7 Francis Giannaros 2007-08-11 17:00:53 UTC
*** Bug 299595 has been marked as a duplicate of this bug. ***
Comment 8 Wolfgang Rosenauer 2008-07-15 14:39:00 UTC
*** Bug 409251 has been marked as a duplicate of this bug. ***
Comment 9 Stephan Binner 2009-08-02 09:18:11 UTC
Can we rename this to "Don't show 'Set Desktop Background' under KDE" unless a generic solution pop ups? :-)
Comment 10 Lubos Lunak 2009-08-03 12:33:18 UTC
I think this deserves a bit better priority now that it is the default. Most of the stuff in the interface should not be very difficult.
Comment 11 Wolfgang Rosenauer 2009-08-04 19:37:46 UTC
(In reply to comment #3)
> The easiest way would be to call "/opt/kde3/bin/dcop kdesktop  KBackgroundIface
> setWallpaper <filename>". I don't know if firefox yet has a concept under which
> desktop it runs.

It has no generic concept still but we are using at least one patch which just checks for $DESKTOP_SESSION.

@KDE team: What is the current way to determine (env variables preferred) if the app is running under KDE(4) and what is the correct command for KDE(4) to set the wallpaper.
Comment 12 Wolfgang Rosenauer 2009-08-04 21:44:47 UTC
And while we are at it: Is there a (dcop) command which can set a default application (checking for or making Firefox the default browser)?
Comment 13 Lubos Lunak 2009-08-05 12:02:47 UTC
Determining if running in KDE: see KDE_FULL_SESSION in /usr/bin/startkde.

The interface from comment #6:

- isDefaultBrowser:
===
browserapp=$(kreadconfig --file kdeglobals --group General --key BrowserApplication)
if test "$browserapp" = "MozillaFirefox" -o "$browserapp" = "!firefox"; then
  echo Yes it is
fi
===

- setDefaultBrowser:
===
kwriteconfig --file kdeglobals --group General --key BrowserApplication MozillaFirefox
===

- setDesktopBackground:
probably no easy way right now, will check

- openApplication:
We do not really have a usercase of just opening a mail client without anything, there is only API for opening mailto: URL. But it can be read from settings:
===
profile=$(kreadconfig --file emaildefaults --group Defaults --key Profile)
client=$(kreadconfig --file emaildefaults --group "PROFILE_$profile" --key EmailClient)
if kreadconfig --file emaildefaults --group "PROFILE_$profile" --key TerminalClient --type bool; then
  term=$(kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole)
  client="$term -e $client"
fi
if test -z "$client"; then
    client=kmail
fi
echo $client
===
We do not have a setting for news reader at all. Just use "knode".

- desktopBackgroundColor
Is this supposed to actually do something and in which directions? Otherwise it's the same like with the wallpaper.

- openApplicationWithURI:
I'm not sure I get this one, what is it supposed to do other than "<application> <url>" ? Download the file first if necessary? Also, why does the application need to be specified, why not simply ask that URL to be opened, by whatever the desktop finds appropriate?
Opening an URL by whatever KDE finds appropriate is the "kde-open" binary. Downloading the contents of the URL and opening locally by an application is "kioexec" binary (which is not in $PATH and is to be located using "kde4-config --type exe --locate kioexec"). Using that one however is most probably wrong with KDE (that's why it's internal), since most KDE applications can handle URLs directly.

- defaultFeedReader:
Is this supposed to be the default RSS reader? We do not have a setting for this, I don't use RSS, but I think here you simply want to use "akregator".
Comment 14 Stephan Binner 2009-08-07 12:34:42 UTC
Info was provided.
Comment 15 Lubos Lunak 2009-08-07 12:47:05 UTC
Let me complete the list: what is needed by setDesktopBackground and desktopBackgroundColor is not easily doable with KDE 4.3 - it should be with 4.4, so we might try to create some hack now, but if you would find it sufficient, I suggest to just remove the 'set as wallpaper' action in Firefox for KDE for now.
Comment 16 Lubos Lunak 2009-08-30 20:58:18 UTC
*** Bug 494376 has been marked as a duplicate of this bug. ***
Comment 17 Lubos Lunak 2009-09-04 11:12:30 UTC
Mostly done, code-wise. Firefox code has been extended with calls checking for KDE and using an external helper to do the work in that case, and there is simple support for having KDE-specific Firefox settings. This means that Firefox needs patching and a new package mozilla-xulrunner191-kde4 with the helper needs to be created (just simple KDE code, all written by me). It fixes most of the major integration problems and is quite safe. Status is at http://en.opensuse.org/KDE/FirefoxIntegration .
Comment 18 Markus S 2009-09-04 14:27:58 UTC
Cool. I've just installed your Mozilla packages. Here's my bug report:
Open/Save window is not translated.
Open/Save window has no icon.
Open/Save window's caption says KMozillaHelper.

Regarding widget style in the wiki: I suggest using QtCurve for KDE- and GTK-Applications (at least when using KDE as desktop). There are also Oxygen themes for GTK, but at least by my experience, they are not that good.
Comment 19 Atri Bhattacharya 2009-09-06 23:22:47 UTC
Trying out the firefox packages from 

http://download.opensuse.org/repositories/home:/llunak:/mozilla/KDE_KDE4_Factory_Desktop_openSUSE_11.1/

I see the following problem
Clicking on links in kmail, akregator, etc. opens some temporary file in firefox instead of the correct url. This is probably because the application downloads the link to a temp location first and opens that with firefox instead of just passing the link directly to firefox.

Should I open a new bug?
Comment 20 Forgotten User --EoyBps8f 2009-09-07 06:00:50 UTC
(In reply to comment #19)
> I see the following problem
> Clicking on links in kmail, akregator, etc. opens some temporary file in
> firefox instead of the correct url. This is probably because the application
> downloads the link to a temp location first and opens that with firefox instead
> of just passing the link directly to firefox.

That works for me. Do you have both -kde4 packages installed and does zypper dup not show any old packages left? Also make sure systemsettings > standard components has firefox set as default browser.

I remember that I got some temporary konqueror progress window in some application, yet I'm not sure which one it was, it works without those in kmail from plain-text emails.
Comment 21 Wolfgang Rosenauer 2009-09-07 11:33:16 UTC
*** Bug 537102 has been marked as a duplicate of this bug. ***
Comment 22 Lubos Lunak 2009-09-11 09:03:08 UTC
*** Bug 537471 has been marked as a duplicate of this bug. ***
Comment 23 Markus S 2009-09-23 11:35:51 UTC
Button order:
Add bookmark (Ctrl D) has GNOME button order.

Open/Save window doesn't save my view preferences. It's always "Enable icon previews" and scale slider in the middle.
Comment 24 Markus S 2009-09-23 11:42:52 UTC
Forgot something:
"Preferences" should be moved to the "Tools" menu. While not labeled like the KDE "Settings" menu, KDE users' muscle memory expects it to be in the second menu from the right.
Comment 25 Atri Bhattacharya 2009-10-04 19:57:55 UTC
(In reply to comment #20)
> (In reply to comment #19)

> dup not show any old packages left? Also make sure systemsettings > standard
> components has firefox set as default browser.
> 

Thanks, setting the systemsettings > standard components > default browser to firefox instead of mozillafirefox (probably set when I chose to make firefox default from firefox) worked.
Comment 26 Atri Bhattacharya 2009-10-04 20:02:33 UTC
Created attachment 320985 [details]
strace output for firefox while encountering freezes

Noticing random lockups and x-restarts with latest firefox package from the repository

http://download.opensuse.org/repositories/home:/llunak:/mozilla/KDE_KDE4_Factory_Desktop_openSUSE_11.1/

Using openSUSE-11.1/x86_64

Attached strace output.
Comment 27 Atri Bhattacharya 2009-10-04 20:07:36 UTC
(In reply to comment #26)
> Created an attachment (id=320985) [details]
> strace output for firefox while encountering freezes
> 
> Noticing random lockups and x-restarts with latest firefox package from the
> repository
> 
> http://download.opensuse.org/repositories/home:/llunak:/mozilla/KDE_KDE4_Factory_Desktop_openSUSE_11.1/
> 
> Using openSUSE-11.1/x86_64
> 
> Attached strace output.

Forgot to add the version of firefox:
Version: 3.5.3-135.2
Comment 28 Markus S 2009-10-08 00:20:28 UTC
Firefox does not send a "startup finished" notification to KDE. The cursor continues to bounce.
Comment 29 Lubos Lunak 2009-10-16 14:37:25 UTC
Closing, pretty much everything here is fixed, except for #26 which is a separate bugreport and #24 which is a WONTFIX, I won't move just one item in the menu structure, especially this important item.
Comment 30 Bernhard Wiedemann 2016-04-15 09:02:05 UTC
This is an autogenerated message for OBS integration:
This bug (170055) was mentioned in
https://build.opensuse.org/request/show/19975 Factory / mozilla-xulrunner191-kde4
https://build.opensuse.org/request/show/20436 Factory / mozilla-xulrunner191
https://build.opensuse.org/request/show/20525 Factory / MozillaFirefox
https://build.opensuse.org/request/show/22141 Factory / MozillaFirefox
Comment 31 Tristan Miller 2019-09-24 13:25:29 UTC
One of the patches introduced as a result of this bug (namely, the one that forces setting of the browser.preferences.instantApply to "false") appears to have broken at least one Thunderbird extension, CardBook.  I have opened an issue for this: Bug 1151186.  It would be great if the folks responsible for the current issue could have a look at the CardBook one.