Revision history for HowToAddMIMEType


Revision [31284]

Last edited on 2016-09-02 06:12:03 by Rattlehead
Additions:
==Add new MIME-Type - method two - append mime files==
Deletions:
==Add new MIME-Type - method two- append mime files==


Revision [31283]

Edited on 2016-09-02 06:11:40 by Rattlehead
Additions:
==Add new MIME-Type - method two- append mime files==
Deletions:
==Add new MIME-Type - method - append mime files==


Revision [30248]

Edited on 2014-07-20 06:16:30 by darkcity
Additions:
~The above code can be added to the ##pinstall.sh## file in a [[PETs PET]] package.
~To reverse the process on uninstall use code below, it removes the lines added. Put them in the ##puninstall.sh## file of a package (take care as mistakes can break MIME-Types):
Deletions:
~This code can be added to the ##pinstall.sh## file in a [[PETs PET]] package. The following code removes the lines added, which can be put in ##puninstall.sh## (take care as mistakes can break MIME-Types):


Revision [30245]

Edited on 2014-07-20 06:11:23 by darkcity
Additions:
~**MIME-types** define different file types 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 [[FreeDesktopOrg freedesktop.org's]] package [[SharedMimeInfo shared-mime-info]]. If a program only a generic filetype rather than a specific format there is no need to add a MIME-type - instead [[AssociateFiles associate]] existing MIME-type to that program.
Deletions:
~**MIME-types** define different file types 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 a generic filetype rather than a specific format there is no need to add a MIME-type - instead [[AssociateFiles associate]] existing MIME-type to that program.


Revision [30242]

Edited on 2014-07-20 06:04:44 by darkcity
Additions:
CategoryFilesystem


Revision [30239]

Edited on 2014-07-20 06:02:16 by darkcity
Additions:
~**MIME-types** define different file types 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 a generic filetype rather than a specific format there is no need to add a MIME-type - instead [[AssociateFiles associate]] existing MIME-type to that program.
Deletions:
~**MIME-types** define different file types 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 filetypes then there is no need to add a MIME-type - instead simply [[AssociateFiles associate]] current MIME-type to that program.


Revision [30238]

Edited on 2014-07-20 06:00:45 by darkcity
Additions:
~**MIME-types** define different file types 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 filetypes then there is no need to add a MIME-type - instead simply [[AssociateFiles associate]] current MIME-type to that program.
Deletions:
~**MIME-types** define different file types 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 - instead simply [[AssociateFiles associate]] current MIME-type to that program.


Revision [30237]

Edited on 2014-07-20 06:00:20 by darkcity
Additions:
~**MIME-types** define different file types 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 - instead simply [[AssociateFiles associate]] current MIME-type to that program.
==Add new MIME-Type - method one - update-mime-database==
~1. This method cannot be used in standard Puppy. It requires XML description files and command ##update-mime-database##. These are often provided by loading the appropriate [[devx devx sfs]].
---
~Caution: 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.
---
~2. Provide extra MIME-type information to add in an XML description file located at ##/usr/share/mime/packages/##
---
---
~3. This information is then added to various files in using the command ##update-mime-database /usr/share/mime## (files updated include globs, globs2, magic, subclasses, aliases, icons, generic-icons, XMLnamespaces and mime.cache).
---
~Note in standard Puppy as the XML descriptions in ##/usr/share/mime/...## and the command ##update-mime-database## have been removed - this saves about 2.5Mb of space.
==Add new MIME-Type - method - append mime files==
~This method works without loading the [[devx devx sfs]].
---
---
---
---
---
Deletions:
~**MIME-types** define different file types 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 that 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/##
~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==


Revision [22115]

Edited on 2012-07-09 09:31:41 by darkcity
Additions:
~This code can be added to the ##pinstall.sh## file in a [[PETs PET]] package. The following code removes the lines added, which can be put in ##puninstall.sh## (take care as mistakes can break MIME-Types):
Deletions:
~This lines can be added to the ##pinstall.sh## file in a [[PETs PET]] package. This code removes the lines added, which can be put in ##puninstall.sh## (take care as mistakes can break MIME-Types):


Revision [22114]

Edited on 2012-07-09 09:29:42 by darkcity
Additions:
~**MIME-types** define different file types 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 that program.
Deletions:
~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.


Revision [22113]

Edited on 2012-07-09 09:28:16 by darkcity
Additions:
~This lines can be added to the ##pinstall.sh## file in a [[PETs PET]] package. This code removes the lines added, which can be put in ##puninstall.sh## (take care as mistakes can break MIME-Types):
#remove mime-type on uninstall (without using update-mime-database)
sed -i '/application\/x-audacity-project:\*.aup$/ d' /usr/share/mime/globs
sed -i '/50:application\/x-audacity-project:\*.aup$/ d' /usr/share/mime/globs2
sed -i '/application\/x-audacity-project text\/xml$/ d' /usr/share/mime/subclasses
sed -i '/application\/x-audacity-project$/ d' /usr/share/mime/types


Revision [22110]

Edited on 2012-07-09 09:04:02 by darkcity
Additions:
~A program can provide extra MIME-type information by having an XML description file in ##/usr/share/mime/packages/##
Deletions:
~A program can provide extra MIME-type information by having an XML description in ##/usr/share/mime/packages/##


Revision [22109]

Edited on 2012-07-09 09:03:23 by darkcity
Additions:
==== 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 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
Deletions:
{{image url="http://fc04.deviantart.net/fs71/f/2011/239/8/3/puppy_like_by_koulaxizis-d48076t.jpg" title="text" alt="text" height="120"}}
==== File Types Index ====
~Information about different files used in Puppy Linux.
~**Puppy Specific File Types**
~~-[[SaveFile Save File]] - AKA 'Pup Save' stores updates, in a frugal installation.
~~-[[SaveFileMultiSession Save File - multisession]] - savefiles used on mutli-session optical media
~~-[[BaseSFS BaseSFS, PupSfs]] - [[SquashFS SFS]] file containing [[RootFs linux directory structure]], in a frugal installation.
~~-[[Devx]] - [[SquashFS SFS]] containing standard Puppy compiling tools
~**Package File Types**
~~-[[Pets PET]] - Puppy software packages, loaded into SaveFile
~~-[[SquashFS SFS]] - Puppy software package, read-only, loaded as file-system layer
~~-[[DEB]] - Debian/Ubuntu software packages, generally compatible with Puppy 5.2x Lucid
~**General File Types**
~~-[[BIN]] - executable program files
~~-[[SquashFS SFS]] - read only compressed file system
~~-[[TAR]] - compressed files
~~-[[TXZ]], [[TXZ tar.xz]] - files using [[xz]] compression
~~-[[TGZ]], [[GZ]], [[GZ tar.gz]] - files using [[gz]] compression
~**Document Files**
~~-[[PPD]] - printer configuration files
~~-[[PDF]] - portable document file
~~-[[DjVu]] - stores scanned documents
~**Linux Files**
~~[[AppsDesktop .desktop]] files are the standard way for Linux programs to provide information about themselves
~[[RootFs]] - linux directory structure
~[[SoftwarePackageNaming Software Package Naming Convention]]
~[[File]] - File identification software
~[[FileManagers]]
~[[HowToAvoidLoadingSaveFile How to avoid loading SaveFile]]
==Related Pages==
~[[WikiPedia:Linux_comparison#Package_management_and_installation Linux Package Management comparison]]
~[[http://puppylinux.com/development/howpuppyworks.html How Puppy Works page]]
CategorySoftware
CategoryIndex


Revision [22108]

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