MIME (Multipurpose Internet Mail Extensions) Types were originally used to associate file types sent between Internet E-mail clients, however it has since been extended to other applications including web browsers and file system browsers (such as Endeavour).
Endeavour has a built-in MIME Types engine, that supports objects of different types and uniquenesses to be associated with each other. Each MIME Type has the following properties:
System Object
, File Format
,
Application
, or Unique Object
.
Application
or Unique Object
.
.
character. This value exists only if the
class is set to File Format
.
Application
, File Format
or
Unique Object
.
Each one of those MIME Types may have one or more commands
(Application
class MIME Types usually only have one
command),
where the first command is considered the default. Each command
has a name and a command string. The command string may be a
reference to another MIME Type of class Application
.
From the Endeavour browser window, go to View->MIME Types... You should see the dialog shown below.
Suppose you want to define a MIME Type for a text file format
who's file name extension is .txt
and the default program to
be executed for it is /usr/bin/tknotepad
, then first select
an item from the list at where you wish to insert your new MIME Type
in and then click on Add...
A new MIME Type will be added and a dialog will appear prompting you for information about the new MIME Type. You should set each of the values as shown below:
To add a value to the Commands list, first make sure that Handle By
is set to Command
and then click on
to add a new command.
Now double click on the new command's cell and enter a new
value. You need to define both the new command's name and value.
You can also click on the cell and then click on
to define the command's name and value.
The new command's name can be any of the following:
Command Name | Triggered By |
default
| DOUBLECLICK or File->Open |
view |
DOUBLECLICK or File->Open |
edit |
SHIFT + DOUBLECLICK
|
For this example, please set the command name to default
and the command value to /usr/bin/tknotepad
. You can
create as many commands for this MIME Type as you wish, but currently
only the command names listed above are supported. All other command
names will be ignored.
You can also set an icon for this MIME Type by clicking on the
corresponding icon frame on the right column and selecting an
.xpm
file. Each icon has a Standard, Selected, and
Extended state. In most cases you only need to set the Standard icon.
Endeavour comes with a set of commonly used icons located in
/usr/share/endeavour2/icons/
. Large icons are typically
48 by 48 pixels, medium icons are typically 32 by 32 pixels, and
small icons are typically 20 by 20 pixels.
Click on OK when you are done.
So in the future (for this example) if you double click on an object
who has an extension of .txt
then the following command
will be executed:
/usr/bin/tknotepad /somewhere/somefile.txt
Where /somewhere/somefile.txt
is the full path to the
actual object.
Valid extensions include .txt .tar.gz .Z *rc Makefile*
.
Prefixes or suffixes (without the .
deliminator) require
a *
character after or before the word (respectivly).
When you define a command for your MIME Type, you can set that
command to either reffer to a specific program (as seen in the
above example) or you can reffer it to another MIME Type who's
class is set to Application
.
To reffer the command of one MIME Type to another MIME Type first create a new MIME Type by clicking on Add... and set its values to the following:
Application
application/text/editor
/usr/bin/tknotepad
default
/usr/bin/tknotepad
Note, for a MIME Type who's class is set to
Application
only the first defined command will be used,
subsequent commands are never used.
Click on OK when you are done.
Now go and edit the previous MIME Type that defined your
.txt
file format and change its command to
reffer to the type value of the new MIME Type, which is
application/text/editor
. Notice
that command value
does not start with an absolute path, this implies
that the command is to reffer to another MIME Type.
Now the default command for an object who's extension is
.txt
will be refered to the new
Application
class MIME Type who's type value is set to
application/text/editor
. This will allow you to change your
prefered application for a group of MIME Types that all require just one
common application by only changing that one Application
class MIME Type.
The items that appear in the "Open With" list (the list that you
see when you go to File->Open With...) are MIME Types
who's class is set to Application
.
To add an item to the "Open With" list, follow the steps in section
Defining a MIME Type. Make sure
that you set the MIME Type's class to Application
.
File formats that contain MIME Types which this application can import are listed as follows:
$HOME/.mailcap
)
$HOME/.media.types
)
$HOME/.endeavour2/mimetypes.ini
)
To import MIME Types:
File formats that contain MIME Types which this application can export are listed as follows:
$HOME/.mailcap
)
$HOME/.media.types
)
$HOME/.endeavour2/mimetypes.ini
)
To export MIME Types:
To define your own global MIME Types, you must have access
to the global MIME Types file
/usr/share/endeavour2/mimetypes.ini
.
Before you begin, you should back up the existing global MIME Types file (if any).
Defining global MIME Types is similar to the Export process, the steps are as follows.
Endeavour MIME Types files (.ini)
format.
If there were no errors encountered in the above steps and you
backed up your old global MIME Types file, move the
MIME Types file you just exported to
/usr/share/endeavour2/mimetypes.ini
and then restart
Endeavour.
Endeavour Mark II is Copyright © 1997-2003 WolfPack Entertainment