Gnome Control Center Manual
<<< Previous |  | Next >>>

# File types and programs

This capplet allows you to configure how files of various types should be handled. File type (formally called MIME type) describes what kind of data and in what format the file contains. For each of the file types, you can set the icon to be used by the File Manager, the default application to be used to open files of this type, etc. For example, file type image/jpeg is used for image files in `JPEG` format; by default, it is opened using File Manager's built-in graphics viewer.

## Viewing available file types

The File types capplet shows you all file types currently known to Gnome. For each file type, it shows a short description (e.g., `PDF document`), the file type name (e.g., `application/pdf`), etc. Clicking on a file type in the list shows you more information about this gile type, namely:

- Brief description (e.g., `PDF document`)

- "Official" file type name, or the MIME type (e.g., application/pdf). These names should be of the form type/subtype, where type describes general type of data (image, text, audio, video, or application) and subtype gives complete specification.

- Icon to be used for files of this type by File Manager.

- Default action to be performed when you click on the file in the File Manager window. There are two possible types of default actions: view the file using one of File Manager built-in "viewers" or open the file using an external application. In fact, you can have a whole list of applications that can be used to open the file. One of these applications is used by default when you click on file; the other applications will be included in the pop-up menu for files of this type (to get the pop-up menu, click on the file with the right mouse button in the File Manager window and select Open With).

- Extensions: these are used by File Manager and other Gnome applications to determine file type of a given file. The most common and simplest way of doing this is by matching the filename extension: for example, extension `pdf` is used for files of type application/pdf.

| NOTE FOR ADVANCED USERS
| In fact, Gnome File Manager can also use more elaborate methods of determining file type than just matching the extensions. Advanced users who want to know more about this should take a look at the file `PREFIX/mime-info/gnome-vfs.mime`, where `PREFIX=/usr/share` or `/usr/local/share` depending on your system's configuration.

## Editing a file type

By far the most common type of editing a file type is changing the default action associated with a given file type. To do so:

1. Click on the file type in the list.

2. Select the type of default action (`Use Viewer` or `Open with Application`)

3. Select the application/viewer you want to be the default from the drop-down list. If you don't see an application you want in this list, click on the Edit List button. It will show you the list of all application which are currently included in the pop-up menu for this file type. Now click on Add application button and enter the application name (e.g., `Gnome PS viewer`) and command used to launch this application (e.g., ggv).

You can also change other properties of a file type:

- To change the icon used by a file type, click on the Change icon button.

- To change file type description, just click inside the text field containing description and edit it.

- To edit the list of extensions associated with a file type, click on the Change file extensions button. This will produce a window showing the list of file extensions currently associated with this file type. To remove an extension from the list, select it with the mouse and then click Remove button. To add a new extension, click on Add button and enter the new extension in the appearing dialog. Do not type the leading dot: if you want to add extension `pdf`, you should type in `pdf`, not `.pdf`.

- To edit the list of applications associated with the file type (these applications appear in the menu when you right-click on the file of this type in the File Manager and select Open with), click on the Edit List button. This will show the list of all applications associated with this file type. You can remove any of the applications from the list, edit an existing application (this allows you to cahnge the name under which this application appears in the menu and the command used to launch this application), or add a new application. Instead of removing of application from the list, you can also temporarily disable it by unchecking it in the list. Such a disabled application will not be shown in the menu for the files of this type.

## Adding and deleting file types

To delete a file type, select it in the file type list and press Delete this Mime type button. To add a new file type, press Add new Mime type button. You will be prompted to enter the file type name and description. It is strongly advised that you follow the MIME standard: file type name should be of the form type/subtype, where type is one of the following five standard types: text, audio,image, video, or application (the last one should be used if none of the first four are suitable).

After you have entered the file type name and description, the new file type is added to the list. Now you can select it in the list and choose an icon, file extensions and default action for this file type as described in the section called Editing a file type.

## Restoring system defaults

If you (or someone else) did something wrong in this capplet, you can discard all your changes and restore the system default values for all the settings controlled by this capplet (i.e., file types, default actions, icons, etc). To do so, click on Revert to system defaults button. Note that this will erase all your changes; you can not "undo" this action.

<<< Previous | Home | Next >>>
Document Handlers |  | Launch feedback