All About Your Desktop Little Red Riding Hood Grandma, what big eyes you have! The Wolf The better to see you! 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 you 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 Riding Hood is on her way to bring you the goodies. Now that's service. The Autostart Folder Before I discovered the Autostart folder, my daily startup routine with &kde; consisted of the following: Start &kde;, start &kedit;, start &konsole;, start &Netscape;, and start &kscd;. This took time I could have spent better. 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: Open the Autostart folder. By default this folder is at $HOME/.kde/share/autostart Open a &konqueror; window and browse to the program you want to add. If you don't know how to do this, it was covered in Drag and drop the desired program from the &konqueror; window on to the autostart folder. When asked, choose Link to create a symbolic link rather than a full copy, as this saves a great deal of disk space. Repeat the above steps for every program you want started when &kde; is launched. Remember, you don't need to add native &kde; applications, just leave them open when you log out, and they will open up again as if nothing had happened, the next time you log in to &kde;. Restart &kde; if you want to see the autostart function in action. Your programs should have launched 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 work for any folder, so you can also apply them to the Autostart folder, as well. Adding Programs and Shortcut Icons to Your <guimenu>K</guimenu> menu and Panel The &kde; K menu and &kicker; are not limited to the setup you find right after installing &kde;. The &kde; panel is designed to be extended, and there are two main ways of doing that: Adding new programs, and adding shortcut icons. Adding menu entries &kde; comes with a great many applications already in the menu. Depending on your operating system and distribution, this could include many non-&kde; applications. &kde; also includes an application that will search your hard drive for more applications, and add them to the menu for you. Try pressing AltF2 and entering kappfinder to see it in action — operation is very straightforward. &kappfinder; is clever enough, but it doesn't know about every application there is. Or perhaps you simply don't want to have all those applications in the menu, and just want to add a single extra program. To add your favorite programs to the &kde; menu, you can use the KDE Menu Editor. To start it, use the K menu and choose SystemMenu Editor. A window will open showing the existing K menu on the left, and an empty menu entry dialog on the right For this example, we will be adding an entry for the Gimp under the Graphics submenu. If you already have a Gimp entry there and don't want a new one, you can still follow through this example, but just don't click the Apply when you are done. Navigate down the left hand tree to the Graphics entry. Click on it once with the left mouse button to expand the entry. Click the icon labeled New Item in the toolbar, or choose FileNew Item in the menu bar. In the dialog box that pops up, enter the name you want your new menu entry to have. For this example, enter Gimp.Then press OK in the dialog. Click on the new Gimp menu entry that was created for you under the Graphics submenu. The menu entry dialog to the right will now change to be mostly empty, except for the name you already gave. Fill in an optional Comment. You might like to put An image editor for the example. Text entered here will be shown as a tool-tip in the K menu. Enter in the box labeled Command, the command you would type on the command line to open your application. For this example, this is gimp. You may also enter any optional command line parameters if you wish. You can use this to make a menu entry that always opens a particular document or image, for example. Check the application's documentation to find out more about command line parameters. If you want the application to operate from a particular directory (for example, for Gimp to begin it's Load Image dialog in a particular place) enter this path in the box labeled Work Path. This is optional. If you wish to change the icon from the default unknown, click on the icon to the right of the dialog, to open a standard &kde; icon chooser. Some applications must be run in a terminal window (for example Pine). If this is the case, check the appropriate check box. If you want to run your application as a different user, check the box labeled Run as a different user and enter the appropriate user name in the text box. If you're happy with your menu entry, press Apply. If you would like to start over, press Reset. And that's all. You now have a new menu entry. 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 &kicker; panel, you have some choices: Drag-and-drop, or via a menu. Adding a shortcut icon with the menu Click on the K icon and choose Panel MenuAddApplication . You will see the top level of the K menu again. Go through the menus to find the entry for which you want to create the shortcut, such as Home directory or &konqueror;. Click on the program you want. A new icon will appear on the panel. Click on it, and the program will start. Adding a shortcut icon with drag-and-drop is even simpler - just drag any icon from your desktop, or a &konqueror; window, to an empty space on the panel. What happens when you drag an item to your panel depends on what kind of item it is: If you drag a directory... A menu will pop up giving you a choice of Add as a File Manager URL or Add as a QuickBrowser. Choosing the first will create an icon that opens a &konqueror; window, starting at this directory, while choosing the latter will open that directory as a menu from the Panel. If you drag a shortcut from your desktop... It will be copied to the panel. If you drag a document... A link will be made on the panel, leaving the original in place. Clicking on the resulting icon will open that document in the default application. In any case, 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. You can also move the icon by clicking with the middle mouse button, and dragging it to it's new location. 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 &URL;s 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 &konqueror;. 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. 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. Right click on an empty space in the desktop. Choose Create newInternet Address (URL) from the context menu. A dialog box will open where you can type in the address you are making a shortcut to. A new icon will be created on your desktop. Your new Internet shortcut can be customized 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. 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 &noatun;, .html files could open a &konqueror; window showing the file, and a core file can be viewed with the &khexedit; by simply clicking on the core file. 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 it 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 $TDEDIR/share/mimelnk. To link a certain file type with a particular application: Make sure the application you want to start this file type has an entry in the K menu. In &konqueror; find or make a file with the extension you wish to link. Right click on the file, and choose Edit File Type from the context menu, or choose EditEdit File Type in the &konqueror; menu bar. 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 masks as you like in this way. Add a description if you like. This is optional. In the section labeled Application Preference Order, press the Add button. A miniature copy of the K menu will open, where you can choose the application you want files of this type to be opened with. Sometimes, you may want to use a different application to open this file type. For example, you might like to use &kate; 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. 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. &MIME; types are a way of describing the contents of files. You may be used to using file extensions for that purpose, and you may know that on &UNIX; systems the file extension often bear little or no relation to the contents of the file. On the other hand, it may be vital - for example, some implementations of gunzip won't operate on files that aren't named .gz. &MIME; types naturally make use of filename patterns, but not necessarily the extensions - you can set up any filename pattern you like. For example, if you always want to open any files relating to a particular client with &kate;, and you make a habit of naming the files with the client's name at the beginning so that they naturally group in the &konqueror; window, then you can set up a filename pattern that matches ^clientname*. Then any files that have clientname at the beginning (the ^ character means starts with...) and without any regard to the rest of the filename. Using the Trash Can Under normal circumstances, deleting a file under &UNIX; is something which cannot be undone. However, with &kde;, you can choose Move to Trash 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 now and then 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.