You Are Here: Home » Hacks » How-To » Linux » Tips & Tricks

A Complete Guide To Firefox Integration In Kubuntu

By Ricky on September 20th, 2009 
Advertisement

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

The Looks

First of all change the theme of firefox into a more KDE-ish one.

  1. 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.
  2. 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.
  3. After the theme has been installed, restart firefox.
    KDE4+Firefox3 Theme

    KDE4+Firefox3 Theme

    Oxygen Theme

    Oxygen Theme

After installing the theme, fix the buttons, scroll bars and other general appearence.

  1. Install GTK Styles and Fonts. To do this open the Konole and run this command: sudo apt-get install gtk-qt-engine.
  2. 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.
  3. Under GTK Styles, enable the "Use my KDE style in GTK applications" radio button.
  4. Under GTK Fonts, enable the radio button for "Use my KDE fonts in GTK applications".
  5. Under Firefox and Thunderbird, click on the "Install  scrollbar fix..." button.
  6. Click on "Apply" and "Ok".
    KDEfirefox2

    GTK Styles and Fonts window

    Firefox after the above steps

    Firefox after the above steps

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:

  1. 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.
  2. In the Filter bar, enter "ui.allow_platform_file_picker" (without quotes again).
  3. Double click on the entry ui.allow_platform_file_picker to change the value to to false.
  4. 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".
    KDE File Selector

    KDE File Selector

    Gnome File Selector

    Gnome File Selector

Functionalities

To make Firefox the default browser with other KDE applications like KMail, Kopete, Akregator etc., follow the steps given below:

  1. Go to Default Applications through KRunner or if you prefer the longer way Kickoff -> Computer -> System Settings -> Default Applications (under the heading Personal).
  2. Select Web Browser and click on the radio button next to "in the following browser".
  3. In the entry field which is now activated, enter "firefox" (without quotes).
  4. 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:

  1. In Firefox, go to Tools -> Add-ons.
  2. In the Add-ons window, click on Get Add-ons. Search for "flashgot" and install it.KDEfirefox1
  3. Restart Firefox.
  4. In Firefox, go to Tools -> FlashGot -> More options.
  5. In the FlashGot Options window, under the tab General, click on the drop-down menu for Download Manager, scroll down and choose KDE KGet.
  6. Go to the tab Downloads, check on Autostart downloads and click on the "Intercept all downloads" radio.
  7. Click on Ok.

If you want to use KPrinter with Firefox, follow the steps given below:

  1. Open the config page by entering "about:config" in the URL bar.
  2. In the filter bar, enter "print.printer_PostScript/default.print_command".
  3. Double click on the entry and change the value to "kprinter".
  4. Now right-click somewhere other than the previous entry, choose New -> Boolean.
  5. Enter the preference name as "print.always_print_silent" and set its value to "true".
  6. Again right click somewhere else, choose New -> Boolean.
  7. Enter the preference name as "print.postscript.cups.enabled" and set its value to "false".
  8. Done!

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.

Advertisement







A Complete Guide To Firefox Integration In Kubuntu was originally published on Digitizor.com on September 20, 2009 - 10:35 pm (Indian Standard Time)