-   Linux - Desktop (
-   -   Changing multiple file associations in KDE (

ekj 04-04-2010 07:35 AM

Changing multiple file associations in KDE
I want to change the file association for a lot of similar file types at the same time.

For example, for all text files KWrite is preferred rather than Kate, but I want it the other way around. If I would change it manually I would have to perform the change individually for a giant number of file types.

Is there any other way to change file associations than using 'systemsettings' GUI?

KDE version: 4.3.5

sonichedgehog 04-04-2010 11:51 AM

Solution on

ekj 04-04-2010 05:32 PM

No, that didn't work, I tried it. I guess those steps are specific to Gnome, which wouldn't surprise me since Gnome is written out while KDE isn't mentioned at all.

(I assume that you're referring to this ubuntuforums howto/turorial that is linked from one of the posts.)

ekj 04-11-2010 03:38 PM

Noone else having any suggestions?

bobc4012 06-08-2010 02:30 AM

Use Ubuntu Tweak to change associations
There is a System Tool called "Ubuntu Tweak". I have used it under Gnome, but never tried it with KDE. Once installed, you can click on "System" (on the left side) and then click on "File Type Manager". You will see a list of categories. At the bottom, there is a check box, when checked, shows only those type which have an association (uncheck it to include those types without an association). Select the type (click on it) and you either click on the "Edit" button or double click (or more clicks) on the item selected. A box will pop up where you can see what is associated with the type (in some cases, more than one). By clicking on the "Add" button (one or more times), you will get a new list where you can select other apps that you may have installed to handle that type. There is also a "Use Custom Command" button, which will allow you to select (from the file system - usually in "usr/bin") an installed application that can handle that association - e.g., realplay for Real Player (I use it for MP3s).

BTW, this same action can also be achieved by "right-clicking" on the file and clicking on "Properties". Then click on "Open With" will bring up the same set of boxes as does "Ubuntu Tweak".

Unfortunately, Firefox seems to be worse. I did find an "Add-on" called "Force Content Type", which seems to work for those apps that don't show in the "Preferences -> Applications". I have found the new versions of Firefox to be a real pain in the tush - some MP3s aren't handled very well, some youtube videos won't play at all, etc. FireFox really needs to allow the user to add "new apps" For example, one version didn't have an entry for MP3 (missing in the mimetype.rdf file. I could not find a way to add it as Firefox kept replacing my changes (same with bookmarks I had from another bookmark file - I know, there is "sync" support, but it is also a PITA to use).

ekj 06-08-2010 01:28 PM

But the file associations are managed differently in Gnome and KDE. "Ubuntu Tweak" is a Gnome-only program according to Google.

bobc4012 06-09-2010 05:29 AM

There is a KDE Tweak.
There is a KDE Tweak, however, I have not tried it. It seemed to be available for earlier versions such as "Hardy" and maybe will still work for the newest versions. I did find it on Ubuntu (Synaptic PM - I include all/most repositories (except source)). It installed, but it did not make an "obvious entry" in either "System - Preferences/Admisitration" or "Applications - categories" (Ubuntu Tweak shows up under "Applications - System Tools"). Maybe some help can be obtained from " " or " " ("kcontrol" to invoke the KDE Control Center). I also tried "kcmshell tweak" but, again, under Ubuntu. Also check " ". Also check out " ". I did a google on "kde application association" to come up with some of this stuff. Good luck.

ekj 06-10-2010 05:34 AM


The solution was to change the "InitialPreference" line in the .desktop files in /usr/share/applications.

Setting InitialPreference to 9 in kate.desktop (when it was 8 in kwrite.desktop) made Kate (rather than KWrite) being default for all kinds of text files.

All times are GMT -5. The time now is 04:52 AM.