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

Re: How to properly register a program in KDE/GNOME



Hi,

I now know why it's not working, it's because I'm testing under KDE 3.5 (Lenny) and it makes a difference for xdg-utils!

OK, here it is:

- under a sid chroot, i.e. without Desktop environment:
$ DISPLAY=:0 XDG_UTILS_DEBUG_LEVEL=100 xdg-mime query filetype New\ Mindmap.mm
Running /usr/bin/file -i "New Mindmap.mm"
application/x-freemind; charset=us-ascii

$ DISPLAY=:0 XDG_UTILS_DEBUG_LEVEL=100 xdg-mime query default application/x-freemind
Checking /home/ericl/.local/share//applications/defaults.list
Checking /usr/local/share//applications/defaults.list
Checking /usr/share//applications/defaults.list

- under Lenny/KDE 3.5.9 (same file):
$ XDG_UTILS_DEBUG_LEVEL=100 xdg-mime query filetype New\ Mindmap.mm
Running kfile "New Mindmap.mm"
text/plain

$ DISPLAY=:0 XDG_UTILS_DEBUG_LEVEL=100 xdg-mime query default application/x-freemind
Running ktradertest "application/x-freemind" Application

kfile and ktradertest belong to package kdelibs4c2a, and looking at the bugs assigned to this package, it doesn't seem to use the freedesktop standard for mime types, as many people are asking to get their mime type added to the central database. I guess that it's using /usr/share/mimelnk as provided by kdelibs-data.

So, basically, under Lenny/KDE, xdg-mime uses an application that doesn't use the XDG framework... Sounds like a bug, no?

Furthermore, regarding now under Sid/console, xdg-mime is using /usr/share/applications/defaults.list to find the right application; this file is supposed to be created by update-desktop-database (part of the desktop-file-utils package); this call is supposed to be added to packages through dh_desktop, but man dh_desktop under Sid tells me that it's obsolete and doesn't do anything.
Sounds like a big bunch of spaghettis!?

Do you agree that we have here 2 bugs lurking around?

Thanks, Eric

Nicolas Alvarez wrote:
Daniel Leidert wrote:
$ xdg-mime query filetype bla.mm
text/plain
$ xdg-mime query filetype New\ Mindmap.mm
text/html
(the 2nd file has some HTML embedded)
Ok, that's the problem. If it was XML it must have had the XML
declaration: <?xml version=...?>. But freemind files do not start with
it. So it cannot be of sub-type of application/xml or text/xml. My
fault.

The XML declaration is optional. A document can still be application/xml without the declaration.



Reply to: