Linux in a NutshellLinux in a NutshellSearch this book

Chapter 18. KDE

Contents:

Desktop Overview
The Panel
The KDE Control Center

The K Desktop Environment (KDE) is an open source software project that provides a consistent, user-friendly, contemporary desktop for Unix and Linux systems. KDE is not simply a window manager like fvwm, but a whole desktop environment including services to assist end users, application developers, and system administrators in standardizing the look and feel of their applications and configuring their systems. The KDE interface makes full use of drag-and-drop functionality so that, for instance, you can grab an icon for a text file in the file manager and drag it to a text editor window to open it. Full network integration of KDE applications allows you to transparently access files from other computers or FTP sites and manipulate them as if they were local.

KDE also implements a standard help system based on HTML. Applications that display a Help button offer a specific file of documentation for that application in the help viewer.

One goal of KDE is to provide the user with system information and configuration through easy-to-use graphical interfaces on the desktop. The KDE Control Center is a central utility for desktop and application configuration, as well as a source of information for important system components. The Information module of the Control Center can retrieve and display status information for your processor, memory, PCI bus, network devices, and many other hardware components on your system.

A wide variety of applications has been developed to take advantage of KDE's features and provide the user with a wealth of productive applications. The base package comes with programs such as a mail client, a calendar and organizer, a CD player, image viewers, chat programs, and more.

Most Linux distributions ship with KDE and allow you to set it up as the default session environment when you install the operating system. If you are installing KDE separately, download and install the KDE packages (you can find them at ftp://ftp.kde.org, among other places). You can also use this link if you want to upgrade your version of KDE with the current official version.

TIP: Red Hat 8.0 has introduced a new look and feel called Bluecurve. For the most part, the applications and services offered on the KDE desktop under Bluecurve are the same as those described here, but they may appear in different places or have different names and icons. For instance, the startup menu at the bottom left corner of the screen, which displays a large K in vanilla KDE, displays a red hat in Bluecurve.

To set KDE as your desktop environment, look for the X initialization files in your home directory. Depending on your distribution and how you log in, look for .xinitrc, .xsession, or .Xclients in your home directory. If none of these files exist, create a new .xinitrc file. Edit the file to remove any window manager references that may exist and add startkde on a line at the end of the file. If you are logging in through the KDE or GNOME display manager, there may be a Session tab or icon that allows you to select KDE as your desktop environment. In that case, you do not need to update or add an initialization file.

18.1. Desktop Overview

Figure 18-1 shows a typical KDE desktop. The bar across the bottom of the screen is the panel. It contains buttons for the main menu (often referred to as the K menu), the window list, the desktop pager, and the taskbar, as well as other buttons used to launch applications. The taskbar is used to keep track of application windows running on the desktop.

Figure 18-1

Figure 18-1. The KDE desktop

The desktop displays several open application windows and contains icons that can be used to launch applications with a single click. Several icons are placed on the desktop by default. The Trash icon is a link to a special desktop folder to which you can drag files that you want to delete. There are also icons that link to a mounted CD-ROM and an unmounted floppy drive.

18.1.1. Application Windows

Each KDE window has a titlebar with common buttons on the right for minimize, maximize, and close. On the left side of the titlebar, there is a small icon (or a dash if an icon isn't specified by the application) and a button that looks like a pushpin. The icon opens the window menu that contains a number of different functions you can apply to the window, such as sending it to another desktop. The pushpin button is used to stick or unstick the window to the screen. If you click on the pushpin, the window becomes sticky and appears on all of the virtual desktops. The button appears pushed in when a window is sticky. Click the button again to unstick a window.

The window menu contains standard window commands: Maximize, Iconify, Move, Resize, Sticky, Always on Top, and Close. There is also a command that lets you send the window to another virtual desktop.

Double-click on a window's titlebar to "shade" the window. Shading a window causes it to roll up and disappear into the titlebar, making space on the desktop.

18.1.2. The Konqueror File Manager and Web Browser

One of the most important KDE applications is Konqueror. Konqueror is both a graphical file manager and an Internet browser. Any time you click a folder icon, such as the Home folder button on the panel, a Konqueror window opens, displaying the contents of the directory. Konqueror also provides the underlying engine for the Help Center and the Control Center. Figure 18-2 shows a Konqueror file manager window displaying a home directory. Files and directories are shown as icons by default, but you can use the View menu to view contents with more detail.

Figure 18-2

Figure 18-2. The Konqueror file manager

Like other web browsers, Konqueror has a toolbar that contains back and forward buttons for stepping through your selection history, a home button, reload, and stop. The Location bar uses URL addressing for both network addresses and local filesystems. These features are therefore available to the file manager aspect of Konqueror as well as to the web browser aspect. Depending on the URL you enter, Konqueror opens either in browser or file manager mode. You can also split the screen into multiple windows and have, for example, one window open to your home directory and another window open to a web site. If you want, you can even open a terminal window from Konqueror, making it an almost complete working environment.

18.1.3. The Konsole Terminal Emulator

If you are used to working in a terminal window, you can still do that in KDE. Konsole, KDE's terminal emulation program, can be started from the K menu or from a button on the panel. Once a Konsole window is running, you can open new terminal sessions in a single Konsole window, saving space on your desktop. To start a new session, go to the Session menu and pick the session type you want to open, or select a session type by clicking the New button at the bottom of an open Konsole window. The choices are:

New Shell
Opens a new Konsole terminal shell.

New Linux Console
Opens a session that emulates a text-only Linux terminal.

New Midnight Commander
Opens a session with the Midnight Commander file manager.

New Root Console
Opens a root console session.

New Root Midnight Commander
Opens a root Midnight Commander session.

New Screen Session
Opens a session that uses the screen screen manager, which permits multiple virtual terminals to share a single physical terminal.

If you pick an option that opens a root session, Konsole prompts for the root password before starting the session. Each session adds a button at the bottom of the Konsole window; use the buttons to switch between sessions.

18.1.4. Adding a Link to the Desktop

There are a couple of ways to add a desktop link. The simplest way is to right-click on the background and select New from the Desktop menu that appears. The New menu offers a number of choices for the type of link to create: Directory, Link to Application, Link to Location (URL), Floppy Device, Hard Disc, CD/DVD-ROM Device, Text File, or HTML File. If you have KOffice installed, you'll also see options to add Office documents. When you make a selection, the properties window for that link type appears.

The properties window varies slightly depending on the type of link, but for most links you need to specify a name for the link file, the label for the icon, and the executable command or file location. You can also set the permissions for the link file and select a new icon.

The following example shows how to create an application desktop link that opens the Kate text editor. First, right-click on the desktop and select New → Application. The properties window opens, showing four tabs: General, Permissions, Execute, and Application.

The General tab shows "Link to Application" in the text box. That text represents both the name of the link file being created and the text that appears under the icon on the desktop. Enter a filename that reflects the purpose of the link; in Figure 18-3, it is Kate.

The tab also displays an image of the icon that will appear on the desktop and additional information about the file. The default icon for an application is a picture of a gear. You can change the icon by clicking the button showing the current icon. This opens a window that displays a set of default KDE icons found on your system. Pick the one you like and click OK.

Figure 18-3

Figure 18-3. General tab of desktop link properties

Because you created the link file, the permissions allow you to use it. If you want to adjust the permissions, go to the Permissions tab. The next step is to supply the command used to open the application. On the Execute tab, type in the command, or click the Browse button to locate the file (Figure 18-4).

Figure 18-4

Figure 18-4. Execute tab of desktop link properties

The final step is to supply a tooltip comment. Fill in the Comment box on the Application tab with a description of the application (Figure 18-5). Click the OK button to finish the configuration. If you want to change a property of your link later, right-click on the icon and choose Properties.

Figure 18-5

Figure 18-5. Application tab of desktop link properties

When you create a link to a URL, a window appears with the text "New Link To Location (URL)" and an empty text box (Figure 18-6). Enter the URL in the text box and click the OK button.

Figure 18-6

Figure 18-6. Desktop window for URL link

Entering a new directory link is similar to entering a URL link, except the prompt above the text box reads "New Directory." Enter the path to the directory, and click the OK button.

For a new device link, select the appropriate device and set the link name and permissions if needed. On the Device tab, select the device from the drop-down list. That sets the device location, such as /dev/fd3, and displays the mount point as well.

You can also add a link to the desktop by dragging an item from a file manager window. You can do this with any file or directory. After you drag the item to the desktop, a small pop-up window asks whether you want to copy, move, or link the item. Copy simply makes a copy of the item in the Desktop directory; move removes the item from its original location and places it in the Desktop directory. If you choose link, the desktop icon contains a symbolic link that points to the item's current location.

18.1.5. The Desktop Folder

Everything that appears on the desktop exists in the ~/Desktop folder. If you open this folder in the file manager, you may see directories for Templates and Autostart, as well as files for the CD-ROM and floppy drive and any other links you have set. When KDE starts, it scans the contents of the Desktop directory and creates icons for each item.

Desktop links that launch applications, URLs, or files are configured in the background by .desktop files. These are simple text files that contain all the information that you set for a link in the link properties dialog boxes. Although all configuration of desktop links is handled thoroughly by the configuration pop-up windows, the contents of .desktop files may be of interest. The following example shows the .desktop file for a link to the Kate text editor:

    # KDE Config File
    [Desktop Entry]
    Comment[en-US]=The Kate text editor
    Encoding=UTF-8
    Exec=kate
    Icon=
    MimeType=
    Name[en-US]=Kate
    Path=
    ServiceTypes=
    SwallowExec=
    SwallowTitle=
    Terminal=false
    TerminalOptions=
    Type=Application
    X-KDE-SubstituteUID=false
    X-KDE-Username=
    ...

As you can see, the syntax is simple and straightforward. The items filled in on the properties windows are listed on each line of the file. The Type line identifies the kind of link file. In this example, Kate is an application; Type=URL would indicate an Internet address link file. The Name line lists the name of the application, Comment lists the comment you added to describe the application, Exec lists the command, Icon identifies the icon image file for an icon other than the default, and so on. Unspecified options have empty values. The Name and Comment lines include the language in square brackets.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.