Exercises: X Server and KDE: pre SANOG VI Workshop

January 13, 2005

Steps to Installe KDE Lite

You will need to be root to start this exercise.

To install a graphical user interface on your server we need to choose a desktop environment to install and then either use the port or package system to install the software. We will do our install of KDE Lite version 3.3 using the package system.

KDE lite comes with an entire set of packaged software that runs under X Windows. By installing KDE you should, also, install the X.org X Windows environment package as a dependency if it is not already installed on your machine.

Here are the steps to install KDE. You need to be root to do this:

Place the FreeBSD install disc 1 in your cd-rom drive, then do:

$ mount /cdrom

$ cd /cdrom/packages/All/

$ ls kde*                      [see our "kde" options]

$ pkg_add kde-lite-3.3.0.tbz   ["master" package, pulls in dependencies]

$ rehash                       [reload your shell environment]
At this point KDE is installed, but you will still need to do some configuration to get things to work correctly for you.

The first step you need to do is to create a configuration file for the X server so that it can start X Windows on your machine. The file to be created will be in the directory /etc/X11/ when you are finished.

To do this type:

$ Xorg -configure
This should create the file /root/xorg.conf.new. You might want to test it first as suggested, or you can simply do:
$ cp /root/xorg.conf.new /etc/X11/xorg.conf
Now, you generally do not want to start your graphical interface as root. Rather, you should "su" to a user account and start X Windows from there. In addition, you can set your default windows environment for your userid by creating and editing a file called ".xinitrc". We'll do both now:
$ su - username     [become your username]

pc# cd                     [go to /usr/home/username]

pc# vi .xinitrc            [create and edit the file .xinitrc]

Note the leading "." on the filename. Be sure you include this.

Now add a single line at the start of the file that reads:

exec startkde
Save this file and now try starting X Windows on your machine as your username, not as root.
pc# startx
At this point, if everything worked, you will be taken to the initial KDE setup screens. Follow the on-screen requests to setup language preferences, display settings, etc. Note that it may take quite some time for KDE to start, or even to display an initial screen. This is particularly true the first time you start KDE. In the Eye-Candy-O-Meter screen I suggest not changing it's default setting.

By default Xorg will set your screen resolution to be the maximum resolution possible. You may not like this, particularly if the refresh rate is too low. Once KDE has started you can set your screen resolution like this:

This will start an applet that you can use to resize your screen. You will see the applet appear as a new icon near the lower right of your screen. Click on this applet and choose a screeen resolution that you want (I suggest 1024x768). If this looks good can choose the "Configure Display..." option.

In the Configure Display window that appears note the checkbox labeled, "Apply settings on KDE startup" - If you want KDE to start in the screen resolution you have just chosen each time you start, then you should check this box and click on OK.

That's it. X Windows using the Xorg X Windows server and the KDE Lite desktop are now installed and configured on your machine.

 

Hervey Allen
January 2005