You are not logged in.
Sorry for the long post. If you have no time, just read the third paragraph, starting with "Of course..."
I am using KDE and I have a problem with the mime types for directories. As Gnome, too, KDE manages mime types itself to offer easy customizability by means of GUIs. Obviously, KDE programs natively adhere to these settings. When a non-KDE application wants to open a file of a certain mime type, it should call "xdg-open" which checks for the desktop environment and the calls the "kde-open" script to use KDE's own mime type hierarchy. However, when a program does not call "xdg-open", the (by now ancient) /usr/share/applications/mimeinfo.cache is read. This file is created by /usr/bin/update-desktop-database, which is executed in many PKGBUILDs (well, actually the .install files) to update mime information after installation.
The problem I am running into is that Zotero, a Firefox extension for bibliography management, does not open Dolphin, KDE's file manager, but EasyTag, a music file ID tag editor whenever a folder is supposed to be opened. A quick look at /usr/share/applications/mimeinfo.cache shows that Dolphin is registered as an application for the mime type "inode/directory", but not for "x-directory/normal", for which EasyTag is registered. Simply adding Dolphin as the first app in the array for "x-directory/normal" solves the problem, but only until the next update of a program calling /usr/bin/update-desktop-database. I thus wrote an alias command to call a selfmade script which uses sed to rectify this after each call of update-desktop-database.
Of course, this is not a nice solution. Thus my question (Google didn't help much): What is the standard mime type for directories? AFAICT, it should be "inode/directory", but what, then, does "x-directory/normal" do and why is it used? What should the solution be? Should Dolphin register the additional mime type?
I suspect an error on behalf of the KDE devs as I just realized that a few other KDE programs don't claim certain mime types, either: Okular does not claim "application/pdf". The GIMP, however, does, even though it cannot handle this mime type.
Thanks for your patience.
Offline
You can override the system level mimeinfo.cache with your own copy in ~/.local/share/applications. Only put in the stuff that you want; There's need to copy the whole file.
Slightly off topic, but GIMP can open PDF files.
Offline
You can override the system level mimeinfo.cache with your own copy in ~/.local/share/applications. Only put in the stuff that you want; There's need to copy the whole file.
An even better workaround. Nice!
Slightly off topic, but GIMP can open PDF files.
Not here: "Opening '/home/user/test.pdf' failed: Unknown file type"
Last edited by mutlu_inek (2009-08-08 21:49:37)
Offline
pacman -Qi gimp-devel | grep pdf
poppler-glib: for pdf support
Offline
pacman -Qi gimp-devel | grep pdf poppler-glib: for pdf support
How silly of me. I had a look at the PKGBUILD in ABS yesterday, but for some reason I did not see it... it shows again how grep is much better than a pair of eyes when facing even a rather small amount of characters. Thanks again!
Last edited by mutlu_inek (2009-08-09 10:28:47)
Offline