5

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.

0

3 Answers 3

3

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
2
  • @Braiam you are correct. sudo is not needed with apt-cache policy.
    – MountainX
    Aug 26, 2013 at 23:18
  • All projects mentioned here are currently discontinued, now the PPA is called plasmazilla, see launchpad.net/~plasmazilla
    – ggll
    Mar 20, 2017 at 13:04
1

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
2
  • The plasmazilla PPA has v52 as its latest Thunderbird version. In Kubuntu 16.04 I am currently on v60, so I don't dare not install from this PPA. Apr 23, 2019 at 3:59
  • This PPA was discontinued at the end of 2018. It was intended for users of Maui Linux, which was discontinued at the end of 2017. I suggested they label the PPA as discontinued, but I don't think anyone is monitoring the old GitHub repo either. I did track down where the new packages are built for Debian-based Netrunner at one point but couldn't get them to install on Kubuntu.
    – Alex Ball
    Nov 21, 2019 at 10:43
-1

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .