Update: There is a new and very general solution available now. It works with Firefox and other GTK apps running in KDE. See the DK Bose's answer.
Original question:
I want to use KDE file dialogs (file open, file save) in Firefox in Kubuntu 12.04.
This requires something like the ancient KGtk script, but for KDE 4.x and recent Firefox versions.
OpenSuse offers this kind of functionality. Kubuntu dropped it, but surely someone has worked on bringing this back to Kubuntu (I hope).
Note, I'm not asking about theming/looks. I'm asking about actually using KDE file dialogs instead of XUL or GTK dialog.
And the preference ui.allow_platform_file_picker doesn't affect this. I have already tried setting it to true and false. Neither options results in using KDE dialogs.
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, butalexey-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 expectblue-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.
http://www.bluemintlinux.com/2012/08/kubuntu-gets-kde-support-in-firefox.html:
sudo apt-add-repository ppa:blue-shell/firefox-kde
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:
That file should contain this text:
Do the same for the other PPA if you added both:
Here's the text that goes in the 2nd file:
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:
At this point you could install or update Firefox (using
apt-get install
). But I want to show another step that I include. Before runningapt-get install
I execute this command:The output will resemble this (with different version numbers, of course):
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:
For later manual updates, if you don't use automatic updates, do this:
For newest versions (current is 54.0)
ppa:plasmazilla/releases
works just fine:https://launchpad.net/~plasmazilla/+archive/ubuntu/releases
Just run:
and finally if You have problems installing
firefox-plasma
run:I'm not sure if this is what the OP is looking for, but the
kde-config-gtk
package lets you apply your QT theme to GTK applications. It won't change the dialogs to be identical, but it could be what you're after.