How to Use KDE Dialogs in Gtk Apps

The solution has been given in this forum topic. The specific answer is buried somewhere in that thread. But I'll provide the steps here. However, that forum topic will keep you updated as things evolve. These steps allow the use of KDE dialogs with Firefox in Kubuntu 12.04 (other KDE distros are supported too -- see the forum topic).

My solution (given below) is the comprehensive solution. If the amount of detail here confuses you, see the forum thread or ask questions here.

First, you need to add a PPA to Kubuntu. I know of two suitable PPA's. blue-shell is the primary one, but alexey-ivanov is also available. Please check the forum topic (or do a search) to see if the PPA's mentioned here are still the best choices. (UPDATE: The replies below suggest that the alexey-ivanov PPA may be defunct now.) I expect blue-shell to remain a good choice because they are a significant KDE player.

Caveat: as long as there is a Firefox package in the PPA, it should be given priority over other (non-KDE) versions from Ubuntu (by default). But if there is no package in the PPA, the regular (non-KDE) Firefox will be installed. That generally makes KDE users unhappy.

There are several easy solutions for that minor annoyance. (You could even ignore the possibility mentioned in my caveat and take a simpler approach -- but I'm offering the comprehensive solution in this answer. I also discuss a couple of other options in the forum topic mentioned above.)

My recommended solution is to add both PPA's mentioned above. (Adding two is almost as easy as adding one.) If there is a problem with one PPA, the KDE-enabled Firefox can be pulled from the other PPA. The solution is not perfect, but it is reasonable. (Again, see the topic for detailed discussion.)

Here is a URL relevant to each PPA along with code which can be executed in the terminal to add the PPA.

  1. http://www.bluemintlinux.com/2012/08/kubuntu-gets-kde-support-in-firefox.html:

    sudo apt-add-repository ppa:blue-shell/firefox-kde

  2. https://launchpad.net/~alexey-ivanov/+archive/firefox-kde:

    sudo apt-add-repository ppa:alexey-ivanov/firefox-kde

As mentioned, I added both PPA's to my system and I think that is a good strategy. But you can follow these instructions for just one of the PPA's by leaving out the steps related to the other.

Now set the installation priority of each PPA as follows:

sudo nano /etc/apt/preferences.d/blue-shell-firefox-kde-pin-1001

That file should contain this text:

Package: *
Pin: release o=LP-PPA-blue-shell-firefox-kde
Pin-Priority: 1001

Do the same for the other PPA if you added both:

sudo nano /etc/apt/preferences.d/alexey-ivanov-firefox-kde-pin-1000

Here's the text that goes in the 2nd file:

Package: *
Pin: release o=LP-PPA-alexey-ivanov-firefox-kde
Pin-Priority: 1000

Note that the Pin-Priority values are not the same. I gave higher priority to blue-shell. (If you only install one PPA, just use a value of 1000 for it.)

Now execute this code in a terminal:

sudo apt-get update

At this point you could install or update Firefox (using apt-get install). But I want to show another step that I include. Before running apt-get install I execute this command:

apt-cache policy firefox

The output will resemble this (with different version numbers, of course):

Installed: 16.0.2+build1-0ubuntu0.12.04.1+ppa1
Candidate: 17.0+build2-0ubuntu0.12.04.2~ppa2
Version table:
 17.0.1+build1-0ubuntu0.12.04.1 0
   500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
   500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
 17.0+build2-0ubuntu0.12.04.2~ppa2 0
   1001 http://ppa.launchpad.net/blue-shell/firefox-kde/ubuntu/ precise/main amd64 Packages
 *** 16.0.2+build1-0ubuntu0.12.04.1+ppa1 0
 11.0+build1-0ubuntu4 0
   500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

The three asterisks above point to the one that's installed. "Candidate" shows you which one will be installed if you run apt-get install. Looking over this quickly will help you avoid any surprises (such as losing your KDE-enabled version of Firefox if a PPA is down).

Summary (tl;dr)

The first time you do this, use all these steps:

  1. sudo add-apt-repository ppa:XXXXXXXXXXX (as above)
  2. edit the /etc/apt/preferences.d/XXXX file for each PPA (set priority)
  3. sudo apt-get update
  4. apt-cache policy firefox
  5. sudo apt-get install firefox firefox-kde-support

For later manual updates, if you don't use automatic updates, do this:

  1. sudo apt-get update
  2. (optional) apt-cache policy firefox
  3. sudo apt-get install firefox firefox-kde-support

For newest versions (current is 54.0) ppa:plasmazilla/releases works just fine:
https://launchpad.net/~plasmazilla/+archive/ubuntu/releases

Just run:

sudo add-apt-repository ppa:plasmazilla/releases
sudo apt-get update
sudo apt-get install firefox-plasma thunderbird-plasma

and finally if You have problems installing firefox-plasma run:

sudo aptitude install firefox-plasma