Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
mimeopen: a nice tool to setup default applications
Posted 10-05-2013 at 12:06 AM by the dsc
File association and default applications can be quite complicated, and hard to remember, specially if you have a hybrid environment, using stuff from Gnome, KDE, and whatever, while not being in none of the big ones, but on openbox or something.
One common source of problems are associations within web browsers, like firefox or chrome. They'll often have their own or use some secondary/wrong file association. I was having this problem with Google Chrome, "show in folder" for a download would open the folder with baobab, which is quite idiotic. Baobab wasn't set as a default "file manager" (which it even isn't) anywhere I could find, not in KDE's system settings and nor in gnome/gtk, as far as I could tell.
Then I found a useful post on Arch linux' forums:
Which I happened to have even though I don't remember having installed it. It's obviously available on Debian, then.
In order to set the default application for folders to Konqueror in the file-manager mode, I had to type "other", and give as input: konqueror --profile filemanagement.
One common source of problems are associations within web browsers, like firefox or chrome. They'll often have their own or use some secondary/wrong file association. I was having this problem with Google Chrome, "show in folder" for a download would open the folder with baobab, which is quite idiotic. Baobab wasn't set as a default "file manager" (which it even isn't) anywhere I could find, not in KDE's system settings and nor in gnome/gtk, as far as I could tell.
Then I found a useful post on Arch linux' forums:
Quote:
Originally Posted by Peanut
You can set the default applications (used by e.g. xdg-open) by installing the package perl-file-mimeinfo from the repositories, and invoke the mimeopen command like this:
You will then be asked what application to use when opening /path/to/file:
Your answer will be set as the default handler for that type of file. Works like a charm smile
If you really want to, you can also modify ~/.local/share/applications/defaults.list manually; the format is quite simple:
Code:
mimeopen -d /path/to/file
Code:
Please choose a default application for files of type text/plain 1) notepad (wine-extension-txt) 2) Leafpad (leafpad) 3) OpenOffice.org Writer (writer) 4) gVim (gvim) 5) Other...
If you really want to, you can also modify ~/.local/share/applications/defaults.list manually; the format is quite simple:
Code:
image/png=image-viewer.desktop video/x-matroska=video-player.desktop (...)
In order to set the default application for folders to Konqueror in the file-manager mode, I had to type "other", and give as input: konqueror --profile filemanagement.
Total Comments 4
Comments
-
mimetype and mimeopen work so much better than xdg-open, especially as i run a custom DE, xdg-* only really supports kde/gnome/xfce
Posted 11-12-2016 at 09:09 AM by Keith Hedger -
I think that fairly recently I've had problems with file associations, but unfortunately I had forgotten about this tool then, and sorted it out in a much more annoying and clumsy manner, whatever it turned out to be.
Posted 11-17-2016 at 03:55 PM by the dsc -
Thanks. I'll look into this, rather than xdg-open for my Openbox pipe menus. Maybe it will make sharing them easier. xdg-open works for me, never ran into any issue Keith has (I use Openbox, no DE) but then again I guess some application I have installed may have pulled in what makes it work.
Posted 11-20-2016 at 03:54 AM by goumba -
xdg-open will ise the native desktop tools to open files if the desktop is detectable, eg exo-open when using xfce.
Posted 11-20-2016 at 06:13 AM by Keith Hedger