On 7/12/06, Philip Ganchev <[EMAIL PROTECTED]> wrote: > Hey, I have a bit of trouble with mimedb. > > A file of type ODT: > > fish> file hello.odt > hello.odt: Zip archive data, at least v2.0 to extract > fish> > fish> mimedb hello.odt > application/vnd.oasis.opendocument.text > fish> > fish> open hello.odt > fopen: Bad address > mimedb: Default launcher '(null)' does not specify how to start > > Same with files of type ODP, ODS, etc; SXW, etc; Word, PPT, XLS, etc.
On my system, mimedb handles .odp files correctly. What is the output of 'mimedb -a hello.odt'? What does the file <SOME DIRECTORY>/defaults.list contain, specifically the line about the application/vnd.oasis.opendocument.text mimetype? <SOME DIRECTORY> might be something like /usr/share/applications. > Plus, am I right that mimedb does not let you change the default actions? You are right. Let me explain what the mimedb command does. It is actually very little. Modern Linux systems have various system databases. One of these is the mimetype database. This is simply a a database associating mimetypes like 'text/plain' with document extensions (like .txt or .html) and in a few cases associating a 'magic cookie' at the beginning of the file with a mimetype. The system also has support for simple inheritance, i.e. saying that one mimetype is the parent of another (think xml and xhtml, for example), though last I checked, this was not actually implemented. There is also another database of so called .desktop files. These are files ordered in a hierachy of mimetypes, so that the .desktop file for the image/jpeg mimetype is $SOME_DIRECTORY/image/jpeg.desktop. The desktop files contain descriptions of the mimetype in various languages. This is used by the completion system. There are also desktop files for every application, specifying how to start an application, e.g. if a file should be given as an url or as a file, if it can be a relative file, if more than one file can be specified, etc. There is also a file called defaults.list somewhere in most systems, that contains default applications for various mimetypes. All the mimedb command does is try to locate these three databases and use them together in order to launch files. It would be _very_ nice to have a way to actually customize what program gets run, but currently there is no standard way of doing so. All you'd need is a user specific list in the same format as the defaults.list in the users home directory. Unfortunatly there is no such standard. Or actually, there are many. KDE does this one way, Gnome another, etc. Various operating systems like Fedora and Debian have solved parts of the problem, like allowing the user to set their own browser, but they have done so in different ways. There is a desktop integration project called 'Portland' or something like that, which I belive will contain utilities for handling customizable default launchers for files, among other things. I don't know if this will actually lead to anything, but I am not going to add to this mess by adding my own customization system, nor am I going to jump on one of the existing systems if they may become deprecated soon. What I will do, is if any form of standard emerges, I will extend the mimedb command to support this, if possible this will include editing your preferred handler from the commandline. > > Thanks, > Philip -- Axel ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
