Changing KDEs MIME Type Mappings

If you want to change the application that Konqueror or other KDE applications associate with particular types of files, you need to use KDE's File Associations tool. This tool can be accessed in several ways, including:

• From the main KDE desktop, launch the File Associations tool. In Mandrake 9.1, this option is under K Menu O Configuration O KDE O Components O File Associations. This direct-access method isn't present on all installations, though, or it may fall under another menu path.

• Launch the KDE Control Center (typically by selecting K Menu O Control Center, K Menu O Configuration O Control Center, or something similar) and then select the KDE Components O File Associations item in the list on the left of the window. (KDE Components may be just Components on some systems.)

• From Konqueror, select Settings O Configure Konqueror and click the File Associations item in the list on the left of the window.

Figure 6.3 shows the File Associations tool. Some methods of launching it will produce a window that includes additional elements. In any event, this tool enables you to edit MIME types, which have two elements separated by a slash (/). The first element is a general type descriptor, such as application or text. The second element narrows the field to a specific file type, such as pdf or html. You can browse existing MIME types in the left pane of the window; for instance, Figure 6.3 shows the text/html type selected.

Figure 6.3: KDE ships with an extensive set of MIME types predefined. Note Most of the application types actually describe files created by applications. Thus, you should always check the application area if you can't find a file type description in another area.

Once you've selected a MIME type, you can make several changes to KDE's handling of that type, including:

You can add or change the filename extensions associated with the MIME type. For instance, to make KDE treat files whose names end in .web as Hypertext Markup Language (HTML) files, you would click Add in the Filename Patterns area of the window shown in Figure 6.3 and then type *.web in the Add New Extension dialog box.

• You can change the description that appears in the Description field. This text appears in certain information dialog boxes.

• You can add an application that can support the file type by clicking Add in the Application Preference Order area of the window. The result is an expandable list of applications; select one and click OK, or type the complete path to the application in the provided field.

• You can change how KDE treats an existing application by selecting it and clicking Edit in the Application Preference Order area. The result is a dialog box in which you can specify where the application is located, what its icon is, what other MIME types it handles, and so on.

• You can change which application is the default for a particular MIME type by selecting applications and using the Move Up and Move Down buttons. The first application in the Application Preference Order list is the default one.

• You can change the icon associated with a file type by clicking the icon to the left of the Filename Patterns area. This action brings up an icon selector dialog box, which shows a number of icons from a standard location. Select one of these icons, or click Other Icons and browse to a new location to pick any icon you can find on the computer.

If you want to create a mapping for a file type that's not present in the standard list, you can do so; click Add at the bottom of the list. This action brings up a dialog box in which you specify a new MIME type. Enter your type, and the system creates it and enables you to enter information for it much as you can for an existing MIME type. Before you do this, though, try typing a filename pattern into the Find Filename Pattern field. For instance, type *.wp if you want to find a MIME type for WordPerfect files. This procedure may turn up a MIME type that you didn't find when searching for it manually.

Tip If you don't know what an appropriate MIME type is for an application, check This site lists official MIME type assignments. You might also try a web search for your file type and the keyword MIME, or check the application's documentation. If all of these resources fail, you'll have no choice but to make up a MIME type.

0 0

Post a comment