K Desktop Environment
Prev | Chapter 6. All About Your Desktop | Next

# 6.4. Placing Links on Your Desktop

Placing files on your desktop may shorten the paths you need to enter. However, sometimes it would be nice if you could start KEdit with a commonly edited file already opened in it. And how often do you find yourself frustrated after browsing through endless lists of bookmarks to find a site you visit often? Wouldn't it be nice if everything necessary to deliver you to that site was done automatically after clicking a single icon?

## 6.4.1. Using Templates

Templates provide a convenient mechanism for performing tasks such as those outlined above. Templates can also be used to associate particular file extensions with a specific application. When a file ending in a known extension is double-clicked, the application associated with that extension is automatically started. In short, templates help you get the most out of KDE.

Example: You want to put an icon for visiting the KDE web site on your desktop.

1. Right click on an empty space in the desktop.

2. Choose Create new->Internet Address (URL) from the context menu.

3. A dialog box will open where you can type in the address you are making a shortcut to.

4. A new icon will be created on your desktop.

Your new internet shortcut can be customised like any other shortcut icon. Right click on the icon and choose Properties, and you can change the icon, or the name of the shortcut as you wish.

## 6.4.2. Using MIME Types

MIME Types are very powerful. Employing them, you can easily customize your system such that clicking on a file of a specific type starts the application with which that file type has been associated. For example, all .mod files could be set to start kmodplayer, .html files could open a kfm window showing the file, and a core file can be viewed with the Hex Editor by simply clicking on the core file. Warning: Although MIME types are very powerful, they are not without dangers. Playing around with MIME types as the system administrator (root) can damage a KDE system so severely that cannot be restarted! In this example, you will create your personal MIME style, which is only relevant for you. It will only affect other users if you copy or move it to /opt/share/mimelnk.

To link a certain file type with a particular application:

1. Make sure the application you want to start this file type has an entry in the Application Starter menu.

2. In Konqueror find or make a file with the extension you wish to link.

3. Right click on the file, and choose Edit File Type from the context menu, or choose Edit->Edit File Type in Konqueror's menu bar.

4. Add file masks for the application by clicking the Add button, and entering the file pattern you want. Remember that Unix is case sensitive, so you may need to add variations - *.mp3 may need *.MP3 added as well, for example. Add as many extensions as you like in this way.

5. Add a description if you like. This is optional.

6. In the section labelled Application Preference Order, press the Add button. A miniature copy of the Application Starter menu will open, where you can choose the application you want files of this type to be opened with.

7. Sometimes, you may want to use a different application to open this file type. For example, you might like to use KWrite to open text files you wish to edit, and KEdit for text files that you just want to take a quick peek into. You can add more applications in the same way as you did in the last step, and you can change the preferred order using the Move Up and Move Down buttons.

8. If you're satisfied with your choices, you can click the Apply button to save your changes without closing the dialog box. This gives you the opportunity to test in the Konqueror window that your file association is correct. You can choose OK to save your changes and close the dialog box, or Cancel if you have changed your mind and just want to close the dialog box.

Be sure to try your new association by opening a directory containing a file of the type you just selected. Click on the file, and the program needed to edit it should start.

Prev | Home | Next
Creating New Files On Your Desktop | Up | Using the Trashcan