The Konqueror Handbook
Prev | Chapter 7. Configuring Konqueror | Next

# 7.3. File Associations

What Konqueror does when you click on a file name or icon is determined by the file type and the list of actions that Konqueror keeps for the various file types and can be changed to suit your taste or to add a new file type.

Right click on a text file and select the Edit File Type item. This will bring up a dialog box.

Under the General tab, the Application Preference Order section defines what appears in the Open With menu for this type of file. You can change these applications and their order. You can also change the icon that Konqueror uses for this file type by left mouse button clicking on the icon, and you can add the extensions (Filename Patterns) for any other types of file that you want to be handled in the same way.

| Konqueror is clever enough to recognise most plain text files and treat them as such even though they don't have the `.txt` extension.

The Embedding (which actually refers to the Preview) tab page controls what happens when you left mouse button click on a filename.

| File types are divided into several groups; application, audio, image, inode, message, text and video.

Konqueror can be configured to associate any file type with an installed application.

For example, the Targa image type doesn't exist in Konqueror. If you have such a file on your disk, it will have a question mark as an icon. If you left mouse button click on it, Konqueror will ask you which application you want to use. You could just type in the name of a suitable application each time you select a Targa file, but the best approach is to tell Konqueror what to do with a Targa image.

Let's add the Targa mime type to Konqueror.

1. Open the Settings->Configure Konqueror...->File Associations dialog box.

2. Click on the Add... button at the lower left, this will bring up a little dialog box..

3. Select Image in the Group Drop Down Box, type `Targa` in the Type name Text Box, and press OK.

4. Now have a look at the upper right hand corner of the File Associations Dialog Box. Click on the icon and choose a nice one, here the best seems to be the image icon. In the Filename Patterns Text Box, add the patterns `*.tga` and `*.TGA` by clicking on the upper right Add... button. It means that every file with the `.tga` or `.TGA` (case is important) extension will now be considered as a Targa image.

5. Konqueror now knows what a Targa file is, but it doesn't know what to do with it. We need to tell Konqueror which application to launch to view a Targa file. At the lower right hand corner in the Application Preference Order area, click on the Add... button bring up the following Dialog Box.

6. You can choose an application from the Known Applications List Box, but as we want to use Gimp which is not listed, type `gimp` into the Add Application box.

7. Gimp is really nice but it is big and not designed for quick viewing. Click once more on the Add... button at the lower right hand corner of the File Associations Dialog Box to bring up the little Application Dialog Box, and in the Add Application Text Box, type `xv` or the name of any other suitable application you can have on your system.

8. Now you have two application in the list. The first one will be the default application, you can arrange them as you prefer with the Move Up and Move Down buttons. You should choose an application for quick viewing as the default application.

All Targa files will now be recognized.

Prev | Home | Next
File Manager | Up | Konqueror Browser