Integrating Firefox and Thunderbird into KDE

Integrating Firefox and Thunderbird into KDE


Ever since I first fired up KDE on openSuSE, I’ve been in love. The KDE interface just swept me off my feet. But there’s always been one nagging thing. Firefox and Thunderbird stick out like two sore thumbs. They don’t look like KDE apps (see figure 1 and figure 4), they don’t work with KDE programs (like KPrinter), and they just don’t feel like they belong in KDE. Luckily, since both of these apps have support for add-ons, it is easy to remedy this.

Figure 1: Firefox with default interfaceFigure 1: Firefox with default interface
Figure 2: Thunderbird with default interfaceFigure 2: Thunderbird with default interface

Making Firefox and Thunderbird look like KDE apps

To start off, let’s add a nice theme. My favorite for both Firefox and Thunderbird is Mostly Crystal (especially since it has support for theming extensions like Go Up). If you don’t like Mostly Crystal, there are tons of other Firefox themes including:

Thunderbird users can use my favorite Mostly Crystal, Plastikthunder, or Doodle Plastik for Thunderbird. If you can’t choose, download all of them, and then try each one.

Now that the themes are installed, it’s time for more advanced theming. First, install the CuteMenus—Crystal SVG extension (Firefox version, Thunderbird version). All of your Firefox and Thunderbird menus should now have Crystal icons.

In GNU/Linux, Firefox and Thunderbird use the GNOME file picker. But why use that when you could use a KDE file picker? In Firefox 2.0 and higher, just open about:config, look for the boolean ui.allow_platform_file_picker, and change it to false. You can do the same: just open about:config in Thunderbird 1.5 or later via Tools→Options→Advanced→General→Config Editor (button), and change ui.allow_platform_file_picker to false. See figure 3 for the final result:

Figure 3: KDE file pickerFigure 3: KDE file picker

The last tool you’ll need is the Konquefox extension. This adds a Clear URL button, a Go Up button, and some zoom buttons to make Firefox look a little more like Konqueror.

Making Firefox and Thunderbird work with KDE apps (and vice versa)

Just because Firefox and Thunderbird look like they are KDE apps doesn’t mean they work nicely with them. You don’t have access to powerful KDE utilities like KPrinter, KGet, or Kate. Also, KDE doesn’t exactly play nicely with Firefox or Thunderbird either (it prefers Konqueror and Kmail). Luckily, it’s easy to fix many of these problems.

I use KPrinter for handling my printers. Unfortunately, the Mozilla apps don’t work with KPrinter by default. So it’s time to open up about:config again. Set print.printer_PostScript/Default.print_command to kprinter --stdin and print.always_print_silent to true. When printing, make sure you choose Postscript/default (leaving “Print to file” unchecked) and then click the Print button. At this point you will get the KPrinter dialog. Note that this may not work for Thunderbird.

KGet is one of my favorite download managers. But Firefox and Thunderbird by default won’t recognize anything except their own (and extremely weak) download manager. So, get the FlashGot extension (Thunderbird version here). Then go to Tools→Add-ons, open FlashGot’s preferences, and change the download manager to KDE KGet. Whenever you want to download a file using KGet, just choose the option to use FlashGot instead of the Mozilla download manager.

KDE comes with Konqueror and Kmail set as the default web browser and email client. However, I prefer the deadly duo of Firefox and Thunderbird. To change them to become the default programs, open KControl, open KDE Components, and click on Default Applications. Change the Email Client to thunderbird. Then open Web Browser, change the option to open http and https URLs to firefox, and hit Apply. Now, every time you click on a mailto:, http://, or https:// link, Thunderbird or Firefox will open.

One of the few things I miss are the Windows Media, QuickTime, and Real Media plugins that Windows and Macintosh users have access to. That all stopped when I found the Kaffeine plugin for Firefox. Just install the kaffeine-mozilla plugin, and Firefox will stream files that Kaffeine supports using the Kaffeine plugin.

Occasionally, the tools that Firefox supply don’t do the job I want. If you agree, just use Launchy for both Firefox and Thunderbird. Add the program to the launchy.xml file (see the homepage for more). Then whenever you want to open a page in an external program, click the Launchy button and click the appropriate menu item.

Conclusion

Although Firefox and Thunderbird are, out of the box, extremely non-KDEish, the power of add-ons has made it so that both can look like, feel like, and work with KDE apps (see figure 4 and figure 5 for the final product). The developers are also working on fixing platform issues. They are planning to add support for KWallet (Bug 278343), KDE-like keyboard shortcut dialogs (Bugs 57805 and 257241), and much more (see Platform Integration at the Mozilla wiki). But that shouldn’t be a big surprise. The combination of the excellent developers and terrific add-ons are two of the reasons Firefox has over 30% of the browser market share, and Thunderbird remains one of the most popular free software email clients.

Figure 4: Firefox: KDE styleFigure 4: Firefox: KDE style
Figure 5: Thunderbird: KDE styleFigure 5: Thunderbird: KDE style

Further reading:[1]HOWTO Integrate Firefox with KDE[2]Mozillux[3]Konquefox Tricks

Category: 

Comments

notthistime's picture
Submitted by notthistime (not verified) on

Nice article! Have you ever managed to integrate kwalletmanager with Firefox?
I know Firefox has its own way of storing passwords, but I prefer kwalletmanager - also because it already has tons of passwords saved...

Andrew Min's picture
Submitted by Andrew Min on

I tried, but I couldn't. The good news is, Mozilla is working on this (see Bug 278343). Who knows when it will be added, but at least they're working on it.

--
Andrew Min

Sak's picture
Submitted by Sak (not verified) on

You may also want to add one other option in about:config for KPrinter. If you install a printer through CUPS, it will default to that printer and start printing to it without confirmation if you enable the silent flag! You can get around that by disabling CUPS in Firefox / Thunderbird, but you'll still have the option to print a CUPS printer once KPrinter comes up. Add the following boolean and set it to "False":

print.postscript.cups.enabled

With those 3 flags set, everytime you hit Print it'll automatically launch KPrinter and you'll have your CUPS printers as well as the defaults (PDF, fax, etc.).

This only sets it for the current user's profile though. If you want to set it as a default for all future new profiles created for all users, you have to edit the main prefs.js file.

tbutka's picture
Submitted by tbutka on

As a linux newbie, one of my big gripes with Open SUSE 10.2 was that while it did install Firefox as a browser, it didn't install Thunderbird, and neither app played nicely with KDE. You have solved my problem, and now I am happily using Thunderbird in a shared environment (small vfat partition between XP Pro x64 and SUSE), and using Foxmarks to synch my bookmarks between theFirefox on the two partitions.

This is very important to me in order to transition from Windows to SUSE, as I can use my two most frequently used programs (e-mail client & browser) seamlessly and synched, while I explore the mysteries of the linux command line & lampp on the two platforms. It will also help me show friends that operating systems are less important when key apps work in any number of platforms without having to relearn basics.

kudos

Graeme P's picture

Is there any way of getting a KDE dialogue, or using the KDE list of apps when a file needs to be opened in an external app?

Incidentally, setting ui.allow_platform_file_picker to false does not use a KDE file picker, it uses a Mozilla one instead of a Gnome one. If you have a KDE look-alike theme installed it looks like the KDE dialogue, but it does not work like one. I want the FUNCTIONALITY of the KDE dialogue.

DerekS's picture
Submitted by DerekS (not verified) on

I just (6 days) moved from win2k to a slackware 12 box running kde. I've been using mozilla since it was netscape 1.x ;-).

Anyway, I've followed the steps here and greatly appreciate the smoother integration, but the most important items still don't work.

Specifically if I have a link in an email like:
http://www.freesoftwaremagazine.com/blogs/integrating_firefox_and_thunderbird_into_kde, when I click on the link in tbird, nothing happens (despite making the changes noted in kcontrol). Not even Konqueror comes up.

And the "inverse" is true. If I right click on a page in firefox and choose "send link" -- again, nothing. Not even Kmail (or whatever it's called).

I've upgraded to ff and tb 2.0.0.9.

Any clues where else to look to get this working better?

Thanks again for the article (nice to have kget)

@Sak about editing prefs.js -- it's easier an way more repeatable to create a user.js file and just drop it into your profile directory. I use it extensively in my windows-based clients to make the cache directory store on a local hard drive, and the mail and other parts of the profile store on a network share (where it gets backed up). I also use a user.js with tbird for some imap mumbo-jumbo.

Author information

Andrew Min's picture

Biography

/ˈændruː/ /mi:n/
(n): a Christian.
(n): a student.
(n): a technology enthusiast.
(n): a journalist for several online publications.

Andrew Min is a student, programmer, and journalist from New York City.

My main forte in the technology realm is journalism. I’ve written for a variety of magazines, both print and non-print, with a focus on open source software and the new web. I’ve also been interviewed on a long list of topics, ranging from politicians on Twitter to open source software and homeschooling.

I also have experience with a variety of programming languages (Bash, Batch, CSS, JavaScript, PHP, and (X)HTML) and content management systems (WordPress). I’ve been hired to design and administer several websites. In addition, I’ve been the lead programmer on several small coding projects.