6

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.

gcvt
  • 161
  • 1
  • 3

5 Answers5

4

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?

3

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.

mivk
  • 5,811
lknop
  • 56
  • 2
2

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.

zx485
  • 2,865
maroun2
  • 29
2

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
BDRSuite
  • 3,196
  • 1
  • 13
  • 11
2

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;
mivk
  • 5,811