[Portland] installing MIME-types

Harald Nikolisin harald.nikolisin at sofistik.de
Tue Feb 13 10:13:14 PST 2007


hi waldo,

thanks for your explanations. I changed installation files - one error
and one question remains.
- testsystem was openSuSE 10.2 with KDE 3.3.5 -

1) I installed the mime-types but the icons were not applied on these.

I created a file called "sofistik-mimes.xml" which contains several
mimetypes:

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/vnd.sofistik.cdb">
<comment>SOFiSTiK Database</comment>
<glob pattern="*.cdb"/>
</mime-type>
<mime-type type="text/vnd.sofistik.dat">
.....
.....
</mime-info>

later I installed the mime-types with:

xdg-mime install sofistik-mimes.xml

followed from_

xdg-icon-resource install --context mimetypes --size 16
mime-animator_16.png application-vnd-sofistik-cdb
xdg-icon-resource install --context mimetypes --size 32
mime-animator_32.png application-vnd-sofistik-cdb
....

the result is that there are icons installed in section "MIME-Types"
application-vnd-sofistik-cdb
gnome-mime-application-vnd-sofistik-cdb

and the mime-type is properly installed (checked in KDE control center)
- but without the icons

Did I make any mistake?

2) The desktop files do now have a key "MimeType" - no problem with
that. But how do I enforce a specific order when a MimeType could be
handled with different applications.
Is it determined through the install ordner of the desktop files via
xdg-desktop-menu?


cheers,
harald

mit freundlichen Grüßen / with kind regards

  Dipl.-Ing. Harald Nikolisin
  SOFiSTiK AG
  Entwicklung / Development
  www.sofistik.de / www.sofistik.com

  Vorstände: Dr. Casimir Katz, Dipl.-Ing. Thomas Fink
  Aufsichtsrat: Dr. Johannes Harl (Vorsitz)
  Sitz: Oberschleißheim, Registergericht: Amtsgericht München HRB 129 710



Bastian, Waldo schrieb:
> Hi Harald,
>
> Re 1) the process is to include the mimetype in the application's .desktop file. 
>
> Re 2) a mimetype without x- must be registered with IANA. Using a vnd. prefix is a good idea, yes.
>
> Re 3) Yes you need to use the xdg-icon-resource command to install an icon. The icon name is derived from the mimetype. No, SVG is not very well supported (I was under the impression it's mention had been removed from the manual)
>
> Cheers,
> Waldo
>  
> Intel Corporation - Platform Software Engineering, UMG - Hillsboro, Oregon
> ________________________________________
> From: portland-bounces at lists.freedesktop.org [mailto:portland-bounces at lists.freedesktop.org] On Behalf Of Harald Nikolisin
> Sent: Monday, February 12, 2007 1:52 AM
> To: portland at lists.freedesktop.org
> Subject: [Portland] installing MIME-types
>
> hi,
>
> I'm trying to expand our installation script to install GUI programs properly on a linux desktop.
> while xdg-desktop-menu is quite straightforward, I have some problems with xdg-mime and maybe someone can answer my questions.
>
> this is the manual example of xdg-mime
> ------
> shinythings-shiny.xml:
>
> <?xml version="1.0"?>
> <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
>   <mime-type type="text/x-shiny">
>     <comment>Shiny new file type</comment>
>     <glob pattern="*.shiny"/>
>     <glob pattern="*.shi"/>
>   </mime-type>
> </mime-info>
> -------
>
> 1) Is there no possibility to list applications in a specific order which are able to open "text/x-shiny" files?
> 2) What is the difference for mime-type "text/x-shiny" to "text/shiny"? Besides this, if Shiny is an ISV it should also prefix its mimetype with and "vnd.", or am I wrong?
> 3) The associated icons to that filetype are not declared in this xml file? Do I have to use the xdg-icon-resource script?
>
> last question not related to xdg-mime. "Icon resources can be XPM files, PNG files or SVG files." (from xdg-icron-resourc manual) - Is either KDE 3.3 or Gnome 2.x able to render SVG icons in its menu or filemanager?
>
> PS: I also would have searched the mailing lists for that topic to avoid duplicating entries but portland.freedesktop.org is currently down.
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/portland/attachments/20070213/e0dc2d31/attachment.html


More information about the Portland mailing list