Next Previous Contents

6. All about your desktop

"Grandma, what big eyes you have"
(Little Red Hood)

"The better to see you"
(The wolf)

The more you see, the more efficiently you can use your desktop. KDE gives you the opportunity to make the desktop look and work the way prefer, enabling you to work faster and more productively. It even gives you the opportunity to be warned if a wolf is trying to eat you, or (if you happen to be a granny) alert you when Little Red Hood is on her way to bring you the goodies. Now that's service.

6.1 The Autostart Folder

Before I discovered the Autostart folder, my daily startup routing with KDE consisted of the following: Start KDE, start KEdit, start kvt, start Netscape, and start kscd. This took time I could have spent better. As of the first BETA release, native KDE programs left open at the end of a session will save their state and reappear when you login again, but there are some programs (like Netscape) that will not. You can use the Autostart folder for these programs.

To launch programs when KDE is started, do the following:

  1. Open the Autostart folder. You can find it on the upper left corner of you desktop.
  2. Open a filemanager window containing the program you want to add. If you do not know how to do this, see the section describing kfm, the K Filemanager.
  3. Drag and Drop the desired program from its source folder into the Autostart folder. When asked, choose Link to create a symbolic link instead of a full copy. This saves a great deal of disk space.
  4. Repeat this step for every program you want started when KDE is launched. Of course, you may select applications not native to KDE, including Netscape, tin, pine and many others.
  5. Restart KDE.

Your programs should now launch automatically when KDE restarted. If you want to add something special (e.g., you want to see a certain web site when your system goes up), read Using templates. The procedures described there works for any folder, so you can also apply them to the Autostart folder, as well.

6.2 Adding programs and shortcut icons to your panel

The KDE panel is not limited to the setup you find right after installing KDE. The KDE panel is designed to be extended, and there are two ways of doing that: Adding new programs, and adding shortcut icons.

Programs

To add your favorite programs to the KDE panel, you must use the KDE Menu Editor. To start it, use the application starter and choose Utilities > Menu Editor. A window containing an empty button will appear. To change it, click on it using the right mouse button and choose Change. Next, you should see another window with various options you can set. The Type dropdown box contains some types of links you can create. Choose Application. Now choose the Name field and enter the description that will appear in the Application starter. For example, you can type Netscape Communicator. Next, click on the large and the small picture using the left mouse button and select an icon for the application. In the Comment field you can optionally enter a remark about the application. Be sure to choose a helpful comment, because it will appear as tool-tip in the Application starter. For Netscape, you might enter WWW-Browser with Mail and News software.

If not already selected, choose the Execute tab and enter the Execute field. Here, you must type the complete path to your application, for example /usr/local/netscape/netscape. Set the Working Directory to a value that makes sense, such as /usr/local/netscape. If your application runs in a terminal, you must select Run In Terminal and specify the Terminal Options. The terminal options are the command-line switches of kvt; you can see them by using

kvt --help     

in a terminal window. After you have made all the adjustments needed, choose the Ok button and select File > Save from the main menu. Next, restart your panel by choosing Panel > Restart from the application starter. You should now find a new entry Personal with the new menu entries.

Shortcut icons

Although KDE is much more comfortable than the average Unix window manager, everyone wants a solution for a one-click way to start a program. Later, you will learn how to create links and files on your desktop, but this also has some disadvantages: sometimes all your desktops are filled up with windows, and you cannot reach your icons without minimizing all the windows that cover them. For commonly used programs, you can minimize this problem and speed access by creating shortcut icons on the KDE panel.

To create a shortcut on the KDE panel, do the following:

  1. Click on the application starter and choose Panel > Add application.
  2. You will see the top level of the application starter again. Go through the menus to find the program for which you want to create the shortcut, such as "Home directory" or "kvt". Click on the program you want.

A new icon will appear on the KDE panel. Click on it, and the program will start . If you want to move the icon, click on it using the right mouse button and choose Move. Move the icon to the position you want and press the left mouse button. If you wish to remove the icon, click on it using the right mouse button and choose Remove.

6.3 Creating new Files on your desktop

Your desktop can be an efficient place to work. Every time you start KDE, you can see the complete files, folders and URLs which you often use.

There are two ways to create and edit files on your desktop. In any application, you can say that you want to save your work in the Desktop subfolder of your home directory. For example, my home directory is /home/stupiddog, so my Desktop directory is /home/stupiddog/Desktop. Everything you save there will be put on your desktop.

If you want to move existing files to your Desktop, the best way to achieve this is to use the K file manager (kfm). Open a file manager window and drag the files you need to your desktop. You can choose to copy them if you want to keep all your common stuff on the desktop now, or you can create symbolic links to the real files. Everything you change in the link files will be automatically updated in the originals. For more information on how to use drag & drop and the file manager, see the chapter Moving files with drag & drop.

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?

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. Open the Template folder on your desktop. Here, you can see all the templates you can use for creating new links and resources. Ftpurl is a template you can use for creating a link to an FTP site and even to a particular directory. For example, you could create a link straight to ftp://ftp.kde.org/pub/kde/stable to be informed when a new release is available. MimeType is a very powerful tool. Because of its complexity I have decided to explain it in Using MIME types. Program is a general template you can use to start a particular program with an argument. For example, you could use this to start /usr/src/linux/make xconfig to configure the kernel. URL is also something general: It is a link to a URL which does not start with http:// or ftp://. Make sure that your link makes sense; kfm cannot handle Quake servers (yet). WWWUrl is the template we will be using now. It creates a link to a specific web site.
  2. WARNING:If you started KDE as the system administrator (root), make sure you do not change the templates unless you know exactly what you are doing! If you destroy a template, only a new installation of KDE can recreate it!
  3. Drag the WWWUrl to your desktop (if you do not know about how to use Drag and Drop, see Drap & Drop for more information.) When asked, choose Copy to create your own copy of the template you can manipulate.
  4. Click on the template copy using the right mouse button and choose Properties.
  5. In the dialog box that appears, you will see three tabs: Program, Permission and URL.Change the filename and permissions as need ed, then click on the URL tab.
  6. In the URL field, you must enter the URL you want to be shown when you click on the icon. For our example, type http://www.kde.org.
  7. You can click on the Icon to change the icon for this new shortcut.
  8. If you are satisfied, click Ok to save your changes.

This will update the icon. When you click on it, you will be transferred to the KDE homepage. I suggest that you play around with templates a bit. They are extremely powerful and can be customized for almost any need.

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 that the application which you want to link to the file type has an entry in the KDE panel. If it is missing, see Adding Programs to your KDE panel for instructions on how to create an entry.
  2. Choose Edit > MIME types in the kfm file manager window.
  3. Think about the type of file for which you want to create an entry. By default, there are five top level types: Application is for files that are usually created or edited with one specific application, for example, tar, gzip, and pdfs. Audio is for everything that generates any kind of tones: waves, midis, mods, etc. Image is for any graphics files like gif, jpeg or tiff. Text is for everything that is text, for example, plain text, html, C and Pascal source code, tex documents and tcl scripts. Finally Video is for any type of video streaming like mpeg. Decide to which category your type belongs and change to the matching directory.
  4. Open the Template folder, which is accessible as an icon on your desktop.
  5. Drag & Drop the Mimetype icon into the other window and copy it.
  6. Right click the copied icon and select Properties. Edit the properties of your type.
  7. Click on Binding. You will now see a mask which requires five entries.
  8. The first field must be filled with the file suffix. For example, if you want to create a new type for SGML documents, you should type *.sgml; *.SGML; here. Any file ending with .sgml or .SGML will now be handled with the new type.
  9. Enter a description for the type in the Comment field. For the SGML example, it could be "SGML document"
  10. Enter the MIME type. It is built with the directory (text/ for the SGML example) and a name you choose. For the SGML example, you would enter text/sgml as the Mime-Type. KDE will inform you if there already is a convention on which prefix to use for your type. The kfm web browser will also depend on this setting when you download a document of this type from the web!
  11. Choose an application that is used to edit this file from the dropdown box. For the SGML example, we simply use the Editor.
  12. Click on the icon to choose an icon. Every file matching the suffix you entered will appear with this icon when shown in the file manager window.
  13. Click Ok to save the new type.

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. If something goes wrong or your system cannot even start anymore, use a text console (or kdm's emergency shell function) to delete the link. That should make everything fine.

Defining your own templates

By default, KDE provides you with five default templates which can build new links on your desktop. However, sometimes you will want to create a new template. Doing this is simple:

  1. Login with root privileges.
  2. Create the file as usual.
  3. Move or copy it into the Template folder.
  4. Whenever you want to reuse your new template, copy it from the template folder onto your desktop or into a directory, rename it, and use it. Since the Template folder is only writable for the you, nobody can accidentally destroy the template (that is, if he or she is not you. It might be a good idea to prevent even you from being able to write to this file, thus preventing you from accidentally damaging it).

6.5 Using the font manager

The KDE font manager takes care that you only work with the fonts you really need. You can decide whether or not to use the set of fonts in your X11 font directory. You can start the font manager using the Application Starter. The font manager can be found in the System folder. When you start it, you will see the list of X11 fonts available in the left window and the fonts used by kde in the right window. If you wish to add or remove the ability

to use these fonts in KDE, click on any of them and decide to add or to remove it.

The Font test tab can be used to preview how a font will look. Choose the font family, subtype, size and attributes and you will get a preview.

Understanding the raw-X11-list

There are many entries when you click on the Tab raw-X11 fonts. The KDE font manager already shows you the combinations which make sense, and lets you see which entries were useless to it. There is nothing you can do with this list except view it.

6.6 Using the trashcan

Under normal circumstances, deleting a file under UNIX is something which cannot be undone. However, with the KDE file manager, you can choose Move to Trashcan instead of Delete. This will move the file into the Trash Folder, which, by default, is accessible as an icon on your desktop. In the Trash Folder, you can always recover deleted files. Remember to empty the trashcan regularly by clicking on it using the right mouse button, then choosing Empty trashcan, otherwise you might run out of disk space because the files still need space. Note, however, that once you empty the Trash Folder, the files contained therein are lost forever.


Next Previous Contents