(no subject)
nupul kukreja
nupul.kukreja at gmail.com
Thu Apr 13 19:01:20 EEST 2006
1. What is the use of the following commands, as proposed by freedesktop specs
update-mime-database
update-desktop-database
desktop-file-install
As it was metioned earlier, one can get the list of mime types and
associated file patterns from /usr/share/applications as well as the
appropriate .desktop files, then what specific purpose is served by
the above commands? i.e. My application can physically enter the
information in the specified XDG_BASE_DIR...then why the need of the
above?
2. Now the mime database is stored as XML files, which do not contain
the appropriate application to use for that mime type. How is this
association achieved?
On freedesktop there are several modules given for 'querying' the mime
database. I downloaded the perl module (along with the mime database)
and executed the following command(s).
$>pwd
/homes/nupul/Desktop
$> mimetype a_book_of_C++
mimetype: application/pdf (I had removed the extension!)
$> mimeopen a_book_of_C++ (Xpdf was launched displaying the
contents of the file!)
Now what I am not able to understand is this...How is the database
queried? (i.e. logic and not implementation...saw the source...very
little comments), keeping in mind that there are a myriad XML files to
be parsed. After getting the appropriate MIME type, how does it
(mimeopen) know which application to use for launching? How is this
information derived from the database?
As you can see I am not very clear with this and am quite
confused...even after reading the freedesktop specs, I am still not
able to piece things together. Maybe you can help ;)
Thanks a lot.
Nupul
More information about the xdg
mailing list