gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-dev] Simple mimetype editor


From: Magnus Stålnacke
Subject: Re: [gcmd-dev] Simple mimetype editor
Date: Thu, 23 Aug 2007 17:44:11 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4

Michael wrote:

I just wonder if it's a good idea to mention the source package of the gnomevfs-infog command, in case someone doesn't have it installed.

Yea, i am thinking about some README file.
Will add that later..

Well anyway. If you have suggestions, please feel free to
post them here or in a private mail.

Maybe like
"The list shows the applications that have an entry for the specified mimetype 
in their local desktop  configuration file, meaning they are capable to deal with 
that mimetype.
You can choose the default application by checking the radiobutton. The script will adjust your local mimetype settings, namely the defaults.list file, which is used by gnome to sort out which application to use and show as default."

Thanks.
I have just uploaded a new version, with a slightly
modified version of your text.
http://web.telia.com/~u97007522/linux/code/mimeedit/

There are some other small changes too. I dscovered
that it bailed out when i hit a mimetype that i did not
have any registerd apps for. With the latest change i
get at least the option to add it. Not very well tested
though.


What remains unclear to me:

- What exactly means FALSE in the "application" column ?

That is an error coming from a faulty generation of
the list, the "FALSE" word should not be seen and is
only telling zenity if an option should be checked.
FASLE means not checked. But if the list comes out
wrong, it ends up in the wrong column and is displayed.

- Screenshot: For text/html. There's a gedit.desktop file which apparently was not 
created by me (it contains some weird gnome specific stuff.) There are several 
<appname>.desktop files around here. I think they were created by nautilus. 
There are also *-usercreated.desktop and *-usercustom.desktop files.
I seem to remember usercustom files were created by nautilus, but it's some 
month ago when i tested it. For example, 3gp videos created e.g. by nokia 
mobiles: There was no default app shown, though i had video/3gp in a 
vlc-usercustom.desktop file, and in mimeinfo.cache and defaults.list too. After 
running mimeedit, a vlc-usercreated file was added, and now it works.
For the time being, i moved any "usercustom" to "usercreated".
But anyway. In case there are several: Which ones are used in what order ?

The files used by gcmd or nautilus or whatever gnomeish
is the cache-file and those .desktop files. The defaults
list is not used for anything other than the creation of
the cache file. The first .desktop file mentioned for
a specific mimetype is the default one. And if you do not
have anything in your own cache, the system will use the
global one.




- What about mimeinfo.cache ? Experimentally i removed defaults.list, and still mimeinfo.cache was not recognized. For example, gnome-vfs always shows mplayer for wav, which is not in mimeinfo and has no *.desktop file at all. It looks more like mimeinfo.cache is not used at all, instead and all *.desktop files are scanned (but mimeinfo is not updated) and they seem to be mixed with another database - probably the generic all-users /usr/share/applications.

mimeinfo.cache (see above) This file is the one in control.
Or at least should be..

The mimeinfo.cache just points at .desktop files for a
specific mimetype. And if you do not have any mime that
fits in your own cache, the global will be used.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]