Revision [30246]

Last edited on 2014-07-20 06:11:54 by darkcity
Additions:
====shared-mime-info====
~This package from [[FreeDesktopOrg freedesktop.org's]] includes the standard MIME-type XML description files and the ##update-mime-database## command. It is often provided in a Puppy's [[devx devx sfs]]. This provides a standard for MIME-types in Linux. [[HowToAddMIMEType How To Add MIME Type]] tells you how this works in Puppy.
~Install [[devx devx sfs]] or appropriate package:
~[[http://www.freedesktop.org/wiki/Software/shared-mime-info shared-mime-info source]]
~[[http://distro.ibiblio.org/quirky/pet_packages-noarch/ shared-mime-info PETs on ibiblio.org]]
Deletions:
==== shared-mime-info ====
~This package from [[http://www.freedesktop.org freedesktop.org's]] includes the standard MIME-type XML description files and the ##update-mime-database## command. It is often provided in a Puppy's [[devx devx sfs]]. This provides a standard for MIME-types in Linux. [[HowToAddMIMEType How To Add MIME Type]] tells you how this works in Puppy.
~Install [[devx devx sfs]] or appropriate package:-
~~[[http://www.freedesktop.org/wiki/Software/shared-mime-info shared-mime-info source]]
~~[[http://distro.ibiblio.org/quirky/pet_packages-noarch/ shared-mime-info PETs on ibiblio.org]]


Revision [22112]

Edited on 2012-07-09 09:22:26 by darkcity
Additions:
==== shared-mime-info ====
~This package from [[http://www.freedesktop.org freedesktop.org's]] includes the standard MIME-type XML description files and the ##update-mime-database## command. It is often provided in a Puppy's [[devx devx sfs]]. This provides a standard for MIME-types in Linux. [[HowToAddMIMEType How To Add MIME Type]] tells you how this works in Puppy.
==Installation==
~Install [[devx devx sfs]] or appropriate package:-
~~[[http://www.freedesktop.org/wiki/Software/shared-mime-info shared-mime-info source]]
~~[[http://distro.ibiblio.org/quirky/pet_packages-noarch/ shared-mime-info PETs on ibiblio.org]]
~[[HowToAddMIMEType How To Add MIME Type]]
Deletions:
==== How To Add MIME-Types ====
~MIME-types define different file type allowing the operating system to deal with them correctly. Many generic file types are already defined in Puppy such as Jpegs and ""Mp3s"". These are defined by [[XML]] description files in the [[http://www.freedesktop.org freedesktop.org's]] package [[SharedMimeInfo shared-mime-info]]. If a program only uses generic file-types then there is no need to add a MIME-type, but [[AssociateFiles associate]] a current MIME-type to the program.
==Add new MIME-Type - using update-mime-database==
~Note: this method cannot be used in standard Puppy, see below.
~A program can provide extra MIME-type information by having an XML description file in ##/usr/share/mime/packages/##
~For example this is [[Audacity Audacity's]], ##/usr/share/mime/packages/audacity.xml##
~%%(xml)
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-audacity-project">
<sub-class-of type="text/xml"/>
<comment>Audacity project</comment>
<glob pattern="*.aup"/>
</mime-type>
</mime-info>
%%
~This information is then added to various files in ##/usr/share/mime## using the command ##update-mime-database## (files updated include globs, globs2, magic, subclasses, aliases, icons, generic-icons, XMLnamespaces and mime.cache)
~This method can't be used in standard Puppy as the XML descriptions in ##/usr/share/mime/...##(various directories) and the ##update-mime-database## command have been removed (although they are in the [[devx devx sfs]]). This saves about 2.5Mb of space. Running ##update-mime-database## without the XML descriptions will remove most of your MIME-types stored in globs, globs2 etc. To add a MIME-type without needing add all descriptions see below.
==Add new MIME-Type - without using update-mime-database==
~All [[ROXFiler ROX]] needs is an extra line adding to various files in ##/usr/share/mime## (minimally just ##globs##). The ##echo## and ##"">>""## commands can do this. For example, observing ##update-mime-database## on audacity.xml the equilavent code is:
~%%(bash)
#add mime-type (without using update-mime-database)
echo application/x-audacity-project:*.aup >> /usr/share/mime/globs
echo 50:application/x-audacity-project:*.aup >> /usr/share/mime/globs2
echo application/x-audacity-project text/xml >> /usr/share/mime/subclasses
echo application/x-audacity-project >> /usr/share/mime/types
%%
~You should still include the XML MIME-type description, otherwise if ##update-mime-database## is used the added lines will be removed but new description written.
CategoryTutorial


Revision [22111]

The oldest known version of this page was created on 2012-07-09 09:06:53 by darkcity
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki