• Home

Logo

Navigation
  • Home
  • Articles
    • Content Writing
    • Design
    • General
    • Internet Marketing
    • Social Media
    • Tools and Tips
    • Usability
    • Web Hosting Articles
  • Tutorials
    • AJAX Tutorials
    • ASP Tutorials
    • C# Tutorials
    • CGI and Perl Tutorials
    • CSS Tutorials
    • Flash Tutorials
    • HTML Tutorials
    • Illustrator Tutorials
    • Java Tutorials
    • JavaScript Tutorials
    • Linux Tutorials
    • Miscellaneous Tutorials
    • MySQL Tutorials
    • Photoshop Tutorials
    • PHP Tutorials
    • Python Tutorials
    • Wireless Tutorials
    • WordPress Tutorials
    • XML Tutorials
  • Scripts
    • AJAX Scripts
    • ASP Scripts
    • ASP.NET Scripts
    • CGI & Perl Scripts
    • Flash Scripts
    • Java Scripts
    • JavaScript Scripts
    • PHP Scripts
    • Python Scripts
    • Remotely Hosted
    • Tools and Utilities
    • XML Scripts
  • Answers
  • Online Services
  • Tools

Introduction to KDE

By Sam Lantinga | on May 12, 2004 | 0 Comment
Linux Tutorials
  • Tweet
  • Share
  • Tweet
  • Share

An Overview for Newbies

The K Desktop Environment, abbreviated KDE, is one of several alternatives for the modern Linux desktop. With the exception of some specialized applications, it contains everything you need to work on a daily basis in Linux. In this article I’ll show you I got up and running with KDE and some of the powerful features I found, including support for multimedia and games. I’ll be focusing on the latest stable version of KDE, version 2.1.

This article will introduce you to the new, stable version of KDE, version 2.1. I’ll look at many of the new features that this version offers, and give you an overview of the power of the K Desktop.

Installing KDE

Many Linux distributions come with some version of KDE as an install option. If you didn’t install it from CD or want the latest and greatest software, you can get source code and packages for several popular Linux distributions directly from the KDE Web site (see Resources later in this article). For this article, I got down and dirty and removed all desktop-related software from a RedHat 6.1 system and went directly to the KDE site for the latest RPM packages, where I downloaded the following RPM files:

• arts-2.1-0.6x.2.i386.rpm

• kdeadmin-2.1-0.6x.2.i386.rpm

• kdebase-2.1-0.6x.3.i386.rpm

• kdegames-2.1-0.6x.3.i386.rpm

• kdegraphics-2.1-0.6x.2.i386.rpm

• kdelibs-2.1-0.6x.2.i386.rpm

• kdelibs-sound-2.1-0.6x.2.i386.rpm

• kdemultimedia-2.1-0.6x.2.i386.rpm

• kdenetwork-2.1-0.6x.2.i386.rpm

• kdepim-2.1-0.6x.3.i386.rpm

• kdesupport-2.1-0.6x.2.i386.rpm

• kdetoys-2.1-0.6x.2.i386.rpm

• kdeutils-2.1-0.6x.2.i386.rpm

• libmng-0.9.2-1.i386.rpm

• openssl-0.9.5a-24.i386.rpm

• qt-2.2.4-0.6x.4.i386.rpm

• qt-Xt-2.2.4-0.6x.4.i386.rpm

When I tried to install these RPM files, I got a long list of unsatisfied dependencies — software that I needed to install before the KDE files would work correctly. I headed off to Rpmfind.Net (see Resources) to search for the necessary files, and ended up with a few more packages I needed to install. At last the moment arrived, all of the packages installed without complaint, and I was all set to watch my desktop become a pristine K Desktop Environment.

Bending RPM to your will

Occasionally RPM will prevent you from installing software because it thinks you do not have the required software. If you know for a fact that the required software is installed (perhaps from source), you can force RPM to install anyway:

rpm -ihv –nodeps XXX.rpm

Running KDE

The first problem I ran into was that the X Windows graphical login stopped working. After a little poking around, I found that RedHat 6.1 stores the system desktop preference in /etc/sysconfig/desktop. I changed that to “KDE” and the KDE login screen magically appeared. Excited, I typed my login and password, but instead of KDE starting, I got a terminal window on the plain X background. What was wrong? I finally gave in and read the documentation on the KDE Web site and found all I had to do was put the word “startkde” as the contents of the file .xsession in my home directory. Voila, I logged in again and was greeted with the elegant KDE logo and a beautiful pristine desktop. Then I headed off to try some of the toys…

Navigating KDE

The Konqueror

The first thing I saw when I logged in was a handy file manager window. I had no idea I had so many files! I started deleting all the junk, easy to do in the file manager. I just dragged the mouse over a selection of files, and then added to that selection by holding down the control key and clicking on the other files I wanted to delete. Then a right-click brought up a context menu. In addition to the usual cut and copy commands were three more options: “Move to Trash”, “Delete”, and “Shred”. The first option moves the files to the trash can visible on the desktop; the second one actually removes the files from the disk; and the final option destroys all trace that the files ever existed. The file manager is well integrated with the rest of the desktop so that nearly every file you can find can be easily opened with a single click of the mouse. I had fun clicking on tar archives, browsing them, and clicking on MP3s and GIF files I had forgotten I had.

The file manager, also known as the “Konqueror”, has many more great features, all of which are explained in detail in the help, which you can access by pressing F1. I generally prefer working on the command line, but I’m really starting to enjoy the Konqueror.

The help system

The KDE help system is very easy to use. The help icon is a life preserver on the tool bar at the bottom of the screen, and not only does it show the normal KDE help files, but it also displays the more traditional UNIX help media of info files and man pages. It was a rare treat to browse the man pages, it’s how I got my start learning UNIX.

Managing windows

One of the things that always frustrated me about window managers on every platform is the way windows got lost, the way I have to carefully grab the edges of the windows to move, raise, lower, and resize them. I tend to have lots of windows all hidden or overlapping. KDE has several ways to get around these problems.

Holding down the Alt key and pressing Tab brings up a list of windows, and while holding down Alt, Tab and Shift-Tab allow you to quickly navigate the list to find your window. A nice thing about this feature is that most of the windows have informative names, so it’s easy to find the window I want.

If I want to move a window, all I have to do is hold down the Alt key and click the mouse anywhere in the window and drag it to where I want it. If I want to resize the window, I hold down the Alt key, right click the mouse, and drag the portion of the window I want to stretch.

I can easily “window-shade” a window by double-clicking on the title bar. If you’ve never seen this effect, it’s worth trying out just for kicks, especially if there’s a whoosh sound associated with the action. It’s great for opening up screen real-estate while keeping the window easily accessible.

If the control bar gets in the way, I can move it to a different part of the screen by holding down the mouse and just dragging it to a different edge. If I want to get it out of the way entirely, I can just click one of the edges and watch it slide away.

If there are just too many windows to cope with, I can always switch to another virtual desktop and put my windows there. Holding down the Ctrl key and pressing Tab or Shift-Tab allows me to cycle through the different virtual desktops. Clicking on the appropriate workspace icon in the control bar will take me directly to the desktop I want as well.

Standard key bindings

Most of the applications in the KDE environment respond to a standard set of key bindings. For example, I was happy to know that I can hold down the Ctrl key and press Q in any standard KDE program and have it quit.

Here are some other useful key bindings: Close Ctrl-W

Copy Ctrl-C

Cut Ctrl-X

Find Ctrl-F

Help F1

New Ctrl-N

Open Ctrl-O

Paste Ctrl-V

Print Ctrl-P

Quit Ctrl-Q

Redo Shift-Ctrl-Z

Save Ctrl-S

Undo Ctrl-Z

I need my command line

I’m an old-school UNIX geek; I can’t live without my command line. Fortunately, KDE provides two ways for me to get my fix. Most of the time I need a real shell window, and conveniently there is a large icon of a terminal and seashell on the control bar. Clicking on this brings up the “Konsole”, a classic UNIX terminal window. At the bottom of the terminal is a button to open a new shell, but instead of opening a new window, it adds a shell to the current console. I can easily switch shells by clicking on the appropriate shell button at the bottom of the terminal, or more often, by holding down Shift and pressing Left or Right. This is a great feature for me, since at work I typically have a single mail program open and then a dozen terminal windows cluttering up my desktop.

If I just want to run a single command, I can hold down Alt and press F2. This will bring up a little command line where I can type the command I want to run. There’s also an options button that I can click if I want to run the command in a terminal or as a different user. The neat thing about this command line is that I can enter a URL as well as a command. This makes it easy to bring up a Web page in a text file I’m reading or if somebody types it in IRC.

Customizing KDE

If you’re like me, you don’t want just to use a computer; you want the computer to reflect your personality and be comfortable to use. Well, it’s easy to customize the way your desktop looks and feels with KDE.

Desktop

I can customize the way the desktop looks by going to the KDE Preferences -> Look and Feel menu. The first thing I like to do is play with the background. My fiancee is an excellent amateur artist, and I like to have some of her artwork decorating my desktop. To do this, I just click on the Desktop menu item, select the wallpaper tab, and then click the “Browse” button to find her artwork on the disk. The file browser has a nice “Preview” button so I can make sure that I’m getting exactly the right file for my background. I then change the mode to “Centered Maxpect” so that the image is stretched to fill the background. When I’m done, I can click on the “desktop” button on the toolbar to hide all the windows and see how my desktop looks… Beautiful!

Window decoration

KDE also allows me to change the look of the interface and window decorations. While the defaults look nice, I like to spiff things up a little with desktop themes. These are available in the KDE Preferences -> Look and Feel menu, under “Theme Manager”. I wasn’t happy with the set of themes that came with KDE 2.1, so I modified the way things looked with the “Style” entry under the Look and Feel menu. I’m a bit partial to the KDE-SGI interface, so that’s what I chose. Once I have the widget style customized, I like to change the colors a bit. I chose “Blue slate” in the “Colors” entry in the Look and Feel menu.

A screenshot of the final effect

Screen saver

As you can see in the screenshot, the next thing I customized was the screen saver. I really enjoyed the movie “The Matrix”, so that was the screen saver that I chose. The customization panel shown in the screenshot is “Screensaver” from the Look and Feel menu.

Mouse control

The way the windows respond to the mouse can be customized in the “Window Behavior” entry in the Look and Feel menu. I always have a ton of windows around, so I have very specific settings I use for managing them. First, I set the focus policy to “Focus follows mouse”. This allows me to change the window that I’m typing into just by moving the mouse over it. Second, I turn on auto-raise with a 500 millisecond delay. That way when I move the mouse over a partially obscured window, it will pop to the front so I can see it. There are many other settings that can be customized in the Window Behavior panel, but those are the changes that I always use in any windowing environment.

Key bindings

All of the key bindings I described under “Navigating KDE”, along with a great deal more, can be customized with the “Key bindings” entry in the Look and Feel menu. I usually tend to leave the key bindings as the defaults. KDE will not pass the key combinations listed there to applications, so if you’re having trouble with some key combinations in action games, you might want to check to see if those combinations are bound to window manager actions.

The KDE panel

The tool bar at the bottom of the screen has a lot of buttons for common applications. I could spend a whole article covering the various features of this panel, but here I’ll mention some basic features.

Since I don’t use the KDE editor, I’ll just remove that from the panel by right clicking the icon and selecting “Remove” from the popup menu. I do like to sit on IRC quite a bit, so I’ll add that to the panel by right clicking on the panel itself and then navigating the menus: Add -> Button -> Internet -> Chat Client. Voila! There’s the button on the panel for IRC.

The Internet

Konqueror revisited

Nowadays the biggest thing that people use computers for is the Internet. KDE doesn’t neglect this very important part of computing. Not only is the Konqueror a great file browser, but it is also an integrated Web browser. All I have to do is type a Web site into the textfield in the location toolbar and hit return, and zoom, I’m on the Internet!

Netscape/Mozilla

Since the Konqueror doesn’t handle all the Web sites I may want to visit, I keep an alternate Web browser around. I’ve heard that the latest version of Netscape has some serious forms bugs, so I use Netscape 4.72. Netscape handles most of the active content formats found on the internet: Java, Javascript, Flash, RealPlayer, etc. The only active content not supported by Netscape on Linux is ActiveX controls, which run only on Windows. Another popular browser is the Mozilla browser. Mozilla is an offshoot of Netscape that is devoted to providing a free browser available on multiple platforms. Mozilla isn’t ready for end-user release yet, but you can find previews of it available at http://www.mozilla.org/.

KMail

An important part of using the Internet is being able to send e-mail to your friends and family. KDE provides an integrated mail client called “KMail”, which you can access from the Internet menu option in the K start menu. Since I share my home e-mail account with my fiancee, our mail is held on an IMAP server that also serves as our firewall. Unfortunately KMail does not support the IMAP protocol, so I use Netscape Mail at home.

KNode

KDE also provides a Usenet news client called KNode, available from the Internet menu option in the K start menu. It’s a really nice news client, with article threading and handling of multiple news servers. In order to see anything useful, you need to configure the client when you first start, by going to the Settings -> Configure KNode … menu, and enter information about your Usenet server.

KSirc

I frequently join Internet Relay Chat sessions on the weekends to talk about the Simple DirectMedia Layer library. KDE provides a fairly nice IRC client called “ksirc”, available from the Internet menu option in the K start menu. Once you start it up, you can press F2 to bring up the Connect screen and then you can choose the IRC network you want to join. Once you start the client and join a server, there are many useful commands that you can type into the text entry field.

Here are some of the most common commands:

/nick   <nickname>          Change your public nickname

/join <channel> Join a new channel on the IRC server
/msg <person> <message> Send a private message to <person>

There are many other commands that you can enter; a full list is available by typing “/help” into the text entry field. You can even send colored and formatted text to the chat with special control key sequences. These are documented in the help menu.

Tip

: If the text of a Web site is small and unreadable in Konqueror, press the magnify “+” button on the toolbar.

Multimedia and Games

Various media players

KDE has great multimedia integration with the desktop and the Konqueror Web browser. Whenever I want to play a file, I just click on it and the appropriate player pops up. The “Multimedia” menu has several media players listed, covering a broad range of media types. If I want to see what program is being run for each one, I just run the menu editor (“KDE start” -> “Configure Panel” -> “Menu Editor”). Then I can run that media player directly on the command line.

I play lots of MP3 files when I work, so I have to say that the KDE Media Player is my favorite KDE application. I love its customizability. Like xmms, it has lots of plugins that can customize its behavior and look. I typically run it with the Kaiman skin, so it looks like some techno-mollusc on my desktop.

KDE multimedia player with Kaiman skin:

Games, a shameless plug

As lead programmer at Loki Software, Inc., I can’t resist the temptation to show off our games. They run great on KDE 2.1 — just download the demo launcher (see Resources) and try them out.

Screenshot of Loki Demo Launcher

KDE also comes with a large collection of free games available in the Games menu option in the K start menu. Most of them are just fun diversions, but they’re worth checking out.

Some toys to keep you busy…

I found a fun menu called “Toys” off the KDE start menu. Some of my favorite toys are “AMOR”, a smiley face that sits on your windows; “Kandalf’s tips”, a set of handy tips on using KDE; and “World Watch”, a program that shows the daylight distribution across the world.

Setting up the CD-ROM

One of the first things I did when I started up KDE was try to figure out how to play CDs, since I had just gotten a new album in the mail. Well, I ran the CD player application, but of course that didn’t work. It turned out that the file /dev/cdrom wasn’t set up correctly. It needs to be a symbolic link to the correct device for the CD-ROM. Once I got that set up, I could play the CD, but CDDB wasn’t configured. CDDB is an Internet service that allows CD players to show detailed information about music CDs. To configure this, I clicked on the tools button on the CD player, and it popped right up with the CDDB configuration panel. I selected “Enable Remote CDDB”, reinserted the CD-ROM, and voila, the player knew exactly what CD I was playing. If I insert a data CD while the CD player is running, it may not be able to find information about the CD and pops up a window asking about it. I just close the window and go on working.

A nice side effect of setting up the CD-ROM correctly was that now I can insert a data CD and click on the desktop icon to have the CD mounted and a Konqueror browser window pop up. Once the CD is mounted I need to unmount it by right clicking on the CD icon and selecting “Unmount”, before I can eject the CD.

Why some programs no longer have sound: Behind the scenes

KDE uses a sound manager called “aRts” to handle sound playback and manage multiple audio applications simultaneously. Many games and multimedia programs aren’t built with support for this sound management system, so they no longer have sound under KDE. There are several ways to work around this problem. If the application uses the Simple DirectMedia Layer library, you can just download the source to SDL and rebuild it. If you have the kdelibs-sound-devel package installed, SDL will automatically build with aRts support.

Another solution to the problem is to run the aRts control panel from the Multimedia menu option in the K start menu. From this control panel, if you select “View aRts Status” from the View menu, you will be shown a panel that you can use to suspend the sound manager so it will release the audio device. This will work only if there are no KDE applications playing sound, so be sure to close any media players before you try this.

If all else fails, you can run your multimedia program from the command line using a wrapper which will redirect sound activity to the KDE sound manager.

Here is the syntax of using the aRts wrapper:

artsdsp <programgt>

Solving a crash

With nowhere else to look, I went to the KDE Web site and searched the bug reports for the error messages to see if it was a known problem. It turned out it was, but I couldn’t find any solution in the bug reports.

The MP3 player that comes with KDE crashed when I tried to use it. To try to find out what was causing the crash, I used the menu editor to find the name of the program that was being used, and ran it “noatun” from the command line. It printed out several cryptic error messages and crashed.

Next I contacted the author of the program, and within an hour I received a nice message from the author. The problem was known; I just had to apply a fix to the noatun data files and then rebuild the aRts subsystem with OSS driver support. I have to say, even though it was a shame the program crashed, it was some of the best tech support I have seen.

The Final Word

KDE is a rich and full-featured desktop environment. In general I found it slightly slower than running a standalone window manager, but I found myself enjoying the features and applications, without finding too many bugs. I was pleasantly surprised at every turn at the small details that made the desktop an integrated whole, with touches that made even a UNIX hacker like me feel comfortable. KDE has a little way to go before I would consider it a solid desktop environment, but it’s definitely worth playing with and deserves its place among the leading Linux desktop environments.


Resources

• Visit the KDE Web site, the home of everything KDE

• Find any RPM fast at Rpmfind.Net

• Preview Mozilla (it’s not ready for end-user release yet)

• Check out Loki Software, Inc., games for Linux; they run great on KDE 2.1. Just download the demo launcher and try them out.

Share this story:
  • tweet

Author Description

Sam Lantinga is the author of the Simple DirectMedia Layer (SDL) library, and is the lead programmer at Loki Software, Inc., a company dedicated to bringing best-selling games to Linux. His involvement with Linux and games began in 1995 with various DOOM! tool ports and the port of the Macintosh game Maelstrom to Linux. You can contact Sam at slouken@libsdl.org.

No Responses to “Introduction to KDE”

You must be logged in to post a comment.

Connect With Us

RSSSubscribe 1,241Followers 494Likes
  • Popular
  • Recent
  • Comments
  • Creating Energy Spheres in Photoshop

    Apr 15, 2008 - 96 Comments
  • Easy Screen Scraping in PHP with the Simple HTML DOM Library

    Aug 6, 2008 - 20 Comments
  • Calculating date difference more precisely in PHP

    Mar 7, 2008 - 13 Comments
  • When Does Hosting Your Website in the Cloud Make Sense?

    Oct 8, 2010 - 2 Comments
  • Fun with the Microsoft Managed Extensibility Framework Part 2

    Oct 6, 2010 - 0 Comment
  • Fun with the Microsoft Managed Extensibility Framework Part 1

    Sep 22, 2010 - 0 Comment
  • Website Management on the go with the iPad

    I appreciated your post, but I was looking for something I didn't...
    November 24, 2012 - drmoderator
  • Creating Energy Spheres in Photoshop

    I'm a little stuck down here especially at the step of creating the...
    November 23, 2012 - sarah
  • Running background processes in PHP

    Can you give an example? As see it, you can use this only when you...
    November 16, 2012 - Shaked Klein Orbach
Developer Resources
  • Tutorial Directory
  • Learn HTML
  • Learn PHP
  • Learn CSS
  • Learn AJAX
  • Learn JavaScript
  • Learn Pear
  • White Papers
  • Resources
    • NetVisits Web Directory
    • Realtor Pixels
    • Answers On The Run
    • Ask A Geek
  • Recent Posts

    • When Does Hosting Your Website in the Cloud Make Sense?
    • Fun with the Microsoft Managed Extensibility Framework Part 2
    • Fun with the Microsoft Managed Extensibility Framework Part 1
    • Website Management on the go with the iPad
    • Code Contracts in C# 4.0 – Part 1

    Calendar

    May 2013
    M T W T F S S
    « Oct    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  

    Recent Comments

    • drmoderator on Website Management on the go with the iPad
    • sarah on Creating Energy Spheres in Photoshop
    • Shaked Klein Orbach on Running background processes in PHP
    • Thomas Cuvillier on How To Upload Files Using PHP
    • rizal aditya on Extracting text from Word Documents via PHP and COM
    • Home
    © 2003 - 2013 DeveloperTutorials.com. All Rights Reserved. Privacy Policy.