19 – KDE

December 5, 2009 – 10:17 pm

Please note… This information no longer exists at the referenced locations.  This is only a copy of what was available in 2003.

Basic Linux Training™

KDE

Kay Schenk

Table of Contents

What Is KDE?

KDE, the K Desktop Environment, is an Open Source project initiated by Matthias Ettrich in 1996 to “connect the power of the UNIX® operating systems with the comfort of a modern user interface.” (from the KDE FAQ). KDE requires an X server to function but is much more than a windowing manager for X. It is a complete environment utilizing its own display manager, kdm, as well as a window manager, KWin. KDE 3.1.3 is the current production version as of July 29, 2003.

Unlike the text configuration files needed by other window managers, KDE makes extensive use of GUI dialogs for configuration, much like a Windows or Mac environment. Its functions closely resemble, including drag-and-drop capabilities, these well-known windowing interfaces.

KDE provides a complete desktop/office environment including a web browser/file manager (Konqueror) capable of accessing not only your local Linux file system, but other network resources as well. Standard KDE applications also include an office suite (KOffice), an e-mail application (KMail), a personal organizer system (KPIM), a configuration system (KControlCenter), and many, many tools and applications for both the end user and system administrator.

A reasonably running KDE setup includes at least the following components:

  • kdebase — Required. Base programs, like the window manager, the terminal emulator, the control center, the file manager, and the panel.
  • kdelibs — Required. This package contains shared libraries that are needed by all KDE applications.
  • kdeutils — Optional. Highly recommended utilities like text editors, print managers, etc.
  • kdenetwork — Optional. A number of applications related to networking like the kppp management tool, a mail reader, and a news reader
  • kdeadmin — Optional. Tools for system management.
  • kdemultimedia — Optional. Tools related to multimedia including a CDROM player, a CDROM writer/ripper, a MIDI player.
  • kdegraphics — Optional. A number of graphics-related programs like PostScript viewer, an icon editor, and a dvi viewer.

Many other packaging options and individual programs exist. See the Useful Links area. A complete list of major KDE components can be found in the KDE install page. For timely information on KDE, you can subscribe to the KDE announcement list by subscribing through the KDE mailman page.

Requirements

The KDE site specs the following as requirements for installation (adopted from the KDE FAQ manual):

  • A running POSIX compatible UNIX system. UNIXes (unices ??) that are known to work with KDE include: Linux, FreeBSD, Solaris, HP-UX, and MkLinux.
    Well you’ve got that!
  • Some free hard disk space on the partition where KDE will be created. (See below for next section for installation location tips). A complete installation with nearly everything but games and toys will occupy about 250MB.
  • At least 64MB RAM. Much more RAM (256MB or better) is highly recommended.
  • A running X11 system with or without xdm. If you have not installed the X Window System yet, first check your UNIX installation media for an installable version. If you cannot find any version working, visit the XFree86 web site for more information on how to get and install the X Window System.
    Advice! If you do not have X installed, do that first and thoroughly test out with a default window manager, usually fvwm2, and possibly a default display manager, usually xdm, before doing the KDE installation.
  • The Qt libraries, version 3.1.0 or better. You can get this at Troll Tech’s (or possibly your distro’s) FTP Server in both rpm and tgz format.
    Use rpm to determine what version of qt you have by doing:

    rpm -qa | grep qt
  • libpng: The PNG reference library.

Additional optional and recommended requirements can be found on the KDE 3.1 requirements page.

Installation

Nearly all well-know Linux distros ship with KDE. The complete list can be found at KDE’s web site.

RPM packagings for some of the more popular distros can be found at the KDE download page. Latest versions for KDE from various Linux distributions can be found there. Using an rpm file for your distribution will ensure that KDE gets installed in your distro’s “preferred” directory for KDE. A good approach to installing new or updated rpms is to use the -U option as follows:

rpm -vv -U “kde_rpm_name”.rpm

If you use the -vv option, you’ll see a lot of messages telling you what dependencies are being resolved and where the installation is putting things. You might even need to make a mental note of some of this information, like where the documentation files are going, if things get a bit confusing later.

If the information is a bit too much to deal with, modify the above command by routing the output to a file you can look at later.

rpm -vv -U “kde_rpm_name”.rpm > myinstall.out

The installation chapter from the KDE FAQ contains fairly comprehensive information on how to perform installations for various distributions.

Nota bene! Install kdelibs first, followed by kdebase!

Do not install KDE while in a running X environment. Although this theoretically should not cause problems, it is highly advisable to switch to run level 3 before any updates. Additionally,because of potential problems that may occur after the installation, it is advisable to stay in run level 3 and start X and KDE manually until you are sure all potentially disastrous problems have been resolved.

Source for the various KDE components are also available from the the 3.1.3 source download page. The default directory for KDE installation is typically /usr/local/kde. Complete instructions and requirements for compiling from source can be found at the KDE developer site

Warning! Multiple KDE Directories?Yes, it’s true! You may indeed currently have multiple KDE directories, maybe named something like kde, kde2, etc. If you update KDE, can you get rid of them? Or maybe you didn’t have them but some sort of application magically caused one of them to appear…what gives?

The best course of action is to do nothing to be on the safe side. But, if you can’t get a newly installed KDE application to execute after its landed in “something”/kde2, for example, you may need to fix your PATH variable. Older KDE apps may run perfectly fine with the newer 3.1.x version, but they may want to go retro and install themselves in the older named directories –kde, kde2. If you decided to mess with nature and move them to your systems’s default kde directory, you may actually cause them to break.

Post Installation Steps

There are some other items that may need to be dealt with before you get your new KDE install up and running. The following instructions pertain to both global system and local user changes for making KDE the default display manager for your system. Depending on your setup, you may have to hunt around a bit to make all the necessary changes. The changes described below, which assume KDE is installed in /opt/kde3, will attempt to cover various config options and start-up options as well.

Warning! The instructions in the following section deal with investigating bash shell scripts. If you’re not familiar with shell scripts, you might want to take a look at the Bash Programming HOW-TO to get your feet wet (that would be your little webbed penguin feet of course! )

Change You Main System Configuration File

You may have a main system configuration file that will require you to change the setting for the default display and windows manager for your system. Historically, many distros incorporated main system options including the default display manager in the rc.config file. If you want to make KDE and its associated window manager the default on your system for all users, you’ll need to make changes to that file, or wherever your default window manager is defined, to reflect that you are now using kdm.

Change Your X Startup Routines

Runlevel 5 Start-Up Scripts

KDE is a replacement for your current X display and window manager. To take full advantage of KDE’s capabilities, you’ll need to set up KDE to be your main display/window manager when you start up at runlevel 5, the graphical interface boot level on your system.

Find out where the start up scripts for your system are. This was previously covered in the Booting & boot managers lesson. You should be able to get this information from your system’s documentation. You’ll need to find the location of the runlevel 5 scripts, and investigate how your current X system’s display manager is initialized–usually it’s with the xdm script located in the rest of the scripts for this level more than likely.

Make modifications as necessary to include KDE in its menu of display manager choices. This is where system administration becomes more of an art than a science!

Making Changes to ‘startkde’

The shell script startkde is used to start up KDE, effectively. It should be located in the bin sub-directory of the main KDE installation directory. But if it can’t be found there, you can locate it by find:

find / -name startkde

Depending on where you’ve initiated the download or install, this script may contain elements very tailored to your distro, like a desktop configuration especially for SuSE or RedHat, or maybe it’s fairly generic. The initial “look and feel” of your KDE desktop will depend on any templating information provided in this file.

One important thing to make note of in your startkde script is the inclusion of a change in your $PATH variable. You should find a statement in this script that looks something like:

export PATH=/opt/kde3/bin:$PATH

or maybe:

PATH=/opt/kde3/bin:$PATH
export PATH

If these statement don’t appear in this script, add them (one or the other of the approaches, not both).

Making Changes to startx

startx is the tradtional script packaged with X for starting X (and its correspsonding display and window manager) and is typically used from init level 3 for starting up your windows environment. If you normally use this program and can’t get KDE to come up as your “default” windowing environment, take a look and see what changes to startx might need to be made.

Make Needed Changes to .xinitrc (or its equivalent for your system)

.xinitrc is the actual startup configuration file used by the xinit process, (used by the default script for staring X, referenced in startx) and is typically found in the home directory for each user on your system. In this case your X session will be running (well that’s the goal anyway) KDE’s display and window manager. As a normal user, you should investigate what changes need to be made to your own .xinitrc file, if any.

For global changes, you’ll need to find the file that controls this setup for all users on your system, and make needed changes to .xinitrc files for currently existing users on your system.

To locate all .xinitrc files on your system, type the following command at a shell prompt (as root):

find / -name ‘\.xinitrc’

You’ll need to edit the .xinitrc file(s) and replace the call to the existing window manager, probably xdm from a generic X install, with the complete path to the startkde binary, which you should have found from the instructions in the previous section.

Starting KDE

Assuming you’re still in run level 3 after installation, and have taken care of any changes to your X init scripts, type startx at your system prompt, which should bring up your X server along with KDE as your graphical desktop environment.

If you normally boot to run level 5, you can either switch to run level 5 to verify that you’ll get the same results from starting manually from run level 3 as above, or reboot your system. If, for some reason, you have problems at run level 5, and not at run level 3 starting manually, you’ll need to investigate your run level 5 scripts again to see what’s being invoked and what might need to be corrected.

Dealing With Problems

If you boot to run level 5, the file, .xsession-errors will be written in your home directory detailing any additional problems with the KDE startup. These may not prevent KDE from starting but indicate other problems that might need attention.

When using the startx command from run level 3, errors will be written to .X.err, X’s default error file.

Using KDE

KDE is extremely easy to use. Initially your desktop will be composed of a bottom panel, the “kicker”, basically divided into several sections separated by vertical bars; and some preinstalled desktop applications like the Trash, for example.

Each standard panel will include at least the K button, used to access a standard Menu, and a section of numbered boxes, probably 1-4, which are desktop numbers. You can actually work in one of the 4 desktops at any given time. Each one is saved and accessed separately. At least one remaining section in the panel will contain non-removable items like the time and date elements, the Klipper clip board, and other icons which are fixed elements for your desktop.

Clicking once, not twice, on any icon will open it or start executing it depending on what the icon’s function is. Right clicking once on an icon generally speaking will give you additional information about it, or allow you to view and configure options for the application.

An important element on the bottom panel is the house which is your file system navigator. Opening this will get you into some of the main functionality of KDE. From here you can view all directories and files in your own and publically accessible areas. You can view text files and scripts, and run applications. Access the Help from this to learn a lot more about configuration options for your navigator. The file manager/navigator is based on Konqueror, which is a multi-purpose browser used internally on your system and to access the Web if you so desire.

The Mandrake folks have put together a very nice slide show on KDE to help you get started. Pictures are worth a thousand words. (Your desktop may be different depending on what distribution you’re using.)

A Few Quick Tips

There are basically three areas of your KDE environment in which applications can be added: on the Menu (accessed using the K button), in the kicker panel, or directly onto the desktop.

To add an application to the desktop:

Click your right mouse button anywhere on your desktop, then choose create New->Link to Application. You’ll be presented with a dialog box. Type in a name for the application in the General tab.
Click on the Execute tab and fill in Command area. That’s about it. Click “OK” and the icon for your newly created desktop application will magically appear.

To add/delete items from your Menu:

Click the K button. Choose Configure Panel->Menu Editor. You’ll see your current menu items layed out by category. You can create new application categories from here, add new items to existing categories, move things around, or delete items as you wish. These changes will only apply to your KDE configuration.

To add an application to your bottom panel:

Click the K button. Choose Congfigure Panel-> Add-> Button. This will allow you to add applications to your bottom panel that already exist in your K Menu. If you don’t like where they’re automatically placed in the panel, right click on the icon, choose Move and move it where you want it.

Each KDE application provides its own help file. This is very useful for learning about your KDE setup and all the applications contained in it.

It should be noted that any application using X can be run from your KDE desktop and added to your desktop, menu or panel. If you know the path to the application, the same process applies to these legacy applications as KDE specific applications.

Please consult the KDE User Guide for more information. Additionally, by default, KDE installs the KDE Help Center application–khelpcenter. You can add this application to your kicker panel for easy access. It contains access to all KDE application manuals as well as UNIX man pages on your system.

Useful KDE Applications

The KDE Control Center, accessed from the KDE menu, is used to configure many aspects of your KDE environment including desktop colors, fonts, etc. The KDE applications listed below are all part of one of the standard KDE 3.1.3 installation

Editors KEdit and KWrite and Kate are standard editors that are supplied as part of the KDE base. Take a look at each to see which one suits you best.

KOffice is a new integrated office suite provided a word processor, presentation application, spreadsheet and database application.

Konqueror is at heart of the KDE desktop environment. In addition to providing access to your local file system with a nice GUI interface, it provides a multitude of “access mechanisms” through its KIO slaves technology. These provide a URL syntax approach for accessing a multitude of network resources, from a simple telnet, telnet://myhost.mysite.com, to more advanced file access protocols like smb, smb://mywinhost.mysite.com. The recent 3.1.x KDE even provides a new “fish” slave, fish://myhost.mysite.com, which allows access to virtually a multitude of net hosts through a lovely GUI environment. Owing to its open soruce nature, anyone can develop useful KIO slaves. A recent list can be found at www.kde.com. Additionally, if you’ve chosen to install the kdeaddons package, you’ll have access to a variety of konqueror plugins providing additional functionality.

KWebget is a graphical front end to webget. Incredibly handy for downloading smallish web sites for offline viewing.

KsCD, a nice graphical CD player.

KAudioCreator, included in the KDE Multimedia package, is a nice front-end for ripping and creating audio CDs. This is only included in the standard KDE packaging as of versions 3.1.x.

Ksysguard, a graphical way to analyze your system processes. Similar to output of ps but with a graphical representation of process dependencies, etc. Also provides tools for analyzing system load, memory, etc.

Kppp, a GUI front-end for ppp dialing, scripting, etc. Part of the kdenetwork package for most distributions except SuSE which includes kinternet instead.

KCrontab, a GUI front-end for viewing and scheduling cron jobs. This is a separate application not part of the KDE packages.

Quanta is a Web development editor which includes a complete reference to HTML as part of its internal documentation, a nice tree layout view of your whole document along with an internally coded PHP daemon for testing this scripting environment. This document was constructed with quanta‘s assistance. Also separate application which can be obtained from the KDE Applications site mentioned next.

Much more information on these and other KDE applications can be found at http://apps.kde.com/. This includes KDE applications written by the KDE team and many other contributors.

KDE Administration

As previously mentioned, users have complete control over their desktop environment and may add and delete items to the main menu as they desire. These changes get reflected in the individual user’s .kde3 directory entry. In general, as new KDE applications are added to your system, KDE “automagically” may make adjustments to the items in an application category or completely add a new category.

If, for some reason, you, as system administrator wish to make global changes to existing categorized entries or add new applications to any menu area, you need to first create a KDE “application link” to the application, then add it to the desired area of standard application links, normally found in /opt/kde3/share/applnk. However, you may need to search around your system a bit if your KDE installation did not use the “standard” KDE directory areas.

For example, you want to make Quanta part of your standard editing set after installation. First, either as root or a normal user login, create a “link” to Quanta somewhere– either on your desktop or as a new application to your normal applications.

If you create the link on your desktop, it’s link definition will be in your KDesktop directory. If you enter this directory, you’ll see your other desktop icon links defined there as well. If you create the link as a new application in an existing category, you’ll find the new link stored in ~/.kde3/share/applnk/appcategory
where appcategory is the application category in which you created the link.

KDE 2.x and 3.x links typically have the extension .desktop. KDE v 1.x links had the extension .kdelink. If the new link you just created doesn’t have the .desktop extension, you can rename it appending this.

Once you’ve created the new application link, copy it, as root, to the appropriate application category in your main /opt/kde3/share/applnk directory (or whatever is equivalent on your system). Next time you log in as a normal user, the new application should be visible in the category. Applications you don’t want available to users can also be deleted from the default application categories by simply removing them from the appropriate application directory as well.

Useful, Invaluable Links

Main KDE site http://www.kde.org/
KDE User Guide http://www.kde.org/documentation/userguide/
KDE Applications http://apps.kde.com/
Another KDE site http://www.kde.com/
The Kompany:
updated fully-supported commercial
versions of some KDE applications
http://www.thekompany.com/

Assignments

Terms and Concepts

  • Kicker
  • panel
  • desktop
  • Klipboard
  • Konqueror

Files and Directories

  • ~/.kde
  • ~/.kde2
  • ~/.kde3
  • ~/KDesktop
  • ~/.xinitrc
  • /opt/kde
  • /opt/kde2
  • /opt/kde3
  • /etc/kderc

Copyright © 1997-2003 Henry White. Copyright © 2002-2003 Kay Schenk . All Rights Reserved.
Reproduction or redistribution without prior written consent is strictly prohibited. Address comments and inquiries to info@basiclinux.net
.

Sorry, comments for this entry are closed at this time.