Firefox is by far one of the best browsers available for Linux and is the prefered web browser of millions. However, if you use Firefox in KDE, you will notice that it sticks out from the rest of the KDE applications and look rather ugly. In this article, we show you how to make a better integration into your Kubuntu system.
As firefox has been coded for Gtk and not Qt, it is not possible to achieve a perfect integration (unless you actually change the code and port it to Qt). Here we will do the next best thing and get it to work better with other KDE applications.
First of all change the theme of firefox into a more KDE-ish one.
- If you use the Oxygen theme in KDE, go to either Oxygen 1.0 or KDE4+Firefox3 0.13 page. The KDE4+Firefox3 0.13 theme is still in the experimental add-on section. However I find it much more applealing. Unfortunately, themes for Air is not available. However, Air is close enough to Oxygen so that you can still use the Oxygen theme.
- In the Mozilla Add-ons page, click on "Add to Firefox" button. For the KDE4+Firefox3 0.13 theme, you have to mark the checkbox saying "Let me install this experimentall add-on" to make the "Add to Firefox" button active.
- After the theme has been installed, restart firefox.
After installing the theme, fix the buttons, scroll bars and other general appearence.
- Install GTK Styles and Fonts. To do this open the Konole and run this command:
sudo apt-get install gtk-qt-engine.
- Open GTK Styles and Fonts from KRunner (Alt+F2 to bring up the KRunner) or from Kickoff -> Computer -> System Settings -> Style -> GTK Styles and Fonts.
- Under GTK Styles, enable the "Use my KDE style in GTK applications" radio button.
- Under GTK Fonts, enable the radio button for "Use my KDE fonts in GTK applications".
- Under Firefox and Thunderbird, click on the "Install scrollbar fix..." button.
- Click on "Apply" and "Ok".
The next thing you can do is to enable the Qt File Selector. The default GTK file selector, however, looks just fine after GTK Styles and Fonts steps above and I prefer it to the Qt selector. If you want to change to the Qt File Selector, just follow the following steps:
- Enter "about:config" (without the quotes) in the URL bar. You will get a warning; click on the "I'll be careful, I promise" button.
- In the Filter bar, enter "ui.allow_platform_file_picker" (without quotes again).
- Double click on the entry ui.allow_platform_file_picker to change the value to to false.
- Now you will get the Qt file selector. If you want the Gtk file selector, just change the value of ui.allow_platform_file_picker back to "true".
To make Firefox the default browser with other KDE applications like KMail, Kopete, Akregator etc., follow the steps given below:
- Go to Default Applications through KRunner or if you prefer the longer way Kickoff -> Computer -> System Settings -> Default Applications (under the heading Personal).
- Select Web Browser and click on the radio button next to "in the following browser".
- In the entry field which is now activated, enter "firefox" (without quotes).
- Click on "Apply" button. Now your KDE applications will use Firefox as the default web browser.
The above steps will not affect non-KDE (read Gnome) applications. So if Firefox is not the default web browser in the other non-KDE applications, you have to change it individually.
The next step is to integrate KGet, KDE's default download manager, with Firefox. To do this follow the steps given below:
- In Firefox, go to Tools -> Add-ons.
- In the Add-ons window, click on Get Add-ons. Search for "flashgot" and install it.
- Restart Firefox.
- In Firefox, go to Tools -> FlashGot -> More options.
- In the FlashGot Options window, under the tab General, click on the drop-down menu for Download Manager, scroll down and choose KDE KGet.
- Go to the tab Downloads, check on Autostart downloads and click on the "Intercept all downloads" radio.
- Click on Ok.
If you want to use KPrinter with Firefox, follow the steps given below:
- Open the config page by entering "about:config" in the URL bar.
- In the filter bar, enter "print.printer_PostScript/default.print_command".
- Double click on the entry and change the value to "kprinter".
- Now right-click somewhere other than the previous entry, choose New -> Boolean.
- Enter the preference name as "print.always_print_silent" and set its value to "true".
- Again right click somewhere else, choose New -> Boolean.
- Enter the preference name as "print.postscript.cups.enabled" and set its value to "false".
With this your Firefox integration to KDE in Kubuntu is done. If you have any other ideas to better integrate Firefox in KDE, we would like to hear it. And if you run into any trouble with any of the above steps, feel free to tell us via a comment.