LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices

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.
Rate this Entry

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:


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:
Code:
mimeopen -d /path/to/file
You will then be asked what application to use when opening /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...
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:
image/png=image-viewer.desktop
video/x-matroska=video-player.desktop
(...)
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.
Posted in Uncategorized
Views 483 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 11:59 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration