5

Is there a (semi-)automated way of forcing Krusader to use Ubuntu's (14.04) file associations?

I know I can do it manually, for each file extension. But, for example, yesterday I installed PlayOnLinux, and now Krusader opens PNG files in WINE Internet Explorer. While the Ubuntu's file manager (or the desktop) uses Image Viewer, as it should. Similar things happen when I install other programs (such as Okular), and it comes to the point where I have no idea which program will start when I open a file.

0

5 Answers 5

3

One workaround is to create an useraction (Useractions > Manage user action) that does:

xdg-open %aCurrent%;

and keymap it (Settings > Configure Shortcuts) to something like Ctrl + Enter. Mapping to just Enter does not seem possible.

Works because Ubuntu seems to follow freedesktop.org and use the same apps as xdg-open.

Dolphin specific question: How to change file association for files opened in Dolphin from command line in GNOME?

2

This looks to be an old question but I was struggling with the same issue and found a solution so I am adding the answer for the googlers.

In my case the problem was that the file owner ~/.local/share/applications/mimeapps.list was root, probably from running Krusader as root and changing some settings.

After sudo chown $USER:$USER ~/.local/share/applications/mimeapps.list I was able to change the file properties and set the associations for the file type.

1

right click on the file -> Properties then

Choose the Open with tab and either choose from a list or add one (by choosing from an extended program list or simply typing vlc as the command)

(OR)

Use Ubuntu Tweak - it has a file association manager and you can choose which programs open which file types.

Instructions are on this site http://www.omgubuntu.co.uk/2011/12/new-version-of-ubuntu-tweak-released/

Best way to install is:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak
2
  • 1
    I guess that problem is that Krusader, being a totally KDE application, does not pick up any Gnome settings. Oct 20, 2014 at 19:57
  • Thanks, but as @Barafu Albino said, Krusader ignores Gnome settings. Even the "file -> Properties" approach works until you install a program that changes associations for Krusader/KDE.
    – gcvt
    Oct 21, 2014 at 9:33
1

As explained in this reply, KDE apps do use the ~/.local/share/applications/mimeapps.list file, but they use the [Added Associations] section in that file.

In your case of .png files, you would need something like this:

[Added Associations]
image/png=eog.desktop;wine-extension-png.desktop;shotwell-viewer.desktop;

eog is the "Image Viewer".

You can find the default Ubuntu associations in /usr/share/applications/defaults.list under a [Default Applications] section. Just remember that KDE seems to use the [Added Associations] section instead.

Also, it may be looking for a different mime type than what you think. I had this problem with .html files which krusader wanted to open with "winebrowser", even though I had text/html pointing to firefox. It turned out that I had to add

application/x-extension-html=firefox.desktop;
1

In mine case it was deleting the file:

~/.local/share/applications/mimeapps.list

and after restarting, the Krusader creates a new file with correct content.

You must log in to answer this question.

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