~  CHAPTER 3:   GNOME and KDE  ~

 

                                      

 

GNOME and KDE are getting a lot of these days, because they offer a truly easy-to-use

 interface to UNIX-based operating systems, most notably Linux.

 

Before we get into the fun stuff, though, we need to step back and understand a little more

 

about the X Windows System and how it relates to GNOME and KDE.  This will give you

 

a better idea of the big picture of Linux and one of its fundamental architectural differences

with Windows NT.

 

 

NOTE:  This chapter assumes you are logged in as root.  However, all of the changes we

talk about here can apply to any user.

 

 

The History of X Windows

 

The designers of UNIX-based operating systems, like Linux, take a very different view of

the world when it comes to user environments than do those behind Microsoft Windows or

even Macintosh OS.

 

Under Linux, you can kill the GUI and restart it without affecting any other services being

offered by the system (such as network file services).

Also established was a well-defined set of functions programmers could call on to perform

basic window manipulation.

 

The simple definition of how windows are drawn and mouse clicks are handled did not

include any model of how the windows should look.  (In fact, X Windows in its natural

state has no real appearance.  It doesn’t even draw lines around windows!)  Control of

appearance was passed off to an external program called a windows manager.

 

Because the window manager was external to the X Windows subsystem, and the X

Windows application programmers interface (API) was open, any programmer who

wanted to develop a new window manager could, and many did.

 

The icing on the cake was the relationship between applications and X Windows.  Typical

applications were written to communicate directly with X Windows, thereby working with

any window manager the user opted to use.

 

 

 

=====================================================================

 

linux3.html                                                      PAGE 2                                                   2002/07/13

 

 

 

 

The Downside

 

A Windows programmer might equate programming for X Windows to programming for

the original MS Windows prior to the visual tools and MFC libraries.

 

 

Enter KDE and GNOME

 

With unfriendly programming environments and unfriendly user interfaces, X Windows had

the potential to one day turn into a legacy interface.  This would be extremely unfortunate,

because it offers a design that was (and still is) leaps and bounds better than other commercial

offerings.

 

In the latter 1990s, two groups came out of the woodwork with solutions to the problems

with X Windows:  GNOME and KDE.  KDE offers a new window manager and necessary

libraries to make writing applications for it much easier.  GNOME offers a general framework

for other window managers and applications to work with it.  Each has its own ideas for how

things should work, but because they both work on top of X Windows, they aren’t entirely

incompatible.

 

NOTE:  Despite what you might hear in newsgroups and on Web sites, the two groups are

not “at war” with each other.  Rather, they welcome the open competition.  Each group can

need off of each other’s ideas, and in turn, both groups can offer two excellent choices for us,

the users.

 

 

What This Means for Us

 

In order for KDE and GNOME to offer features such as drag and drop, they must offer a

uniform way for applications to communicate with each other and a set of developer libraries

to do so.  Unfortunately, because the two methods are different, they aren’t compatible.

The ksysv program was written with KDE in mind, but because the functionality it relies on is

100% available (such as Red Hat) will allow the applications to run without a problem.

 

About KDE

 

KDE is a desktop environment (the K Desktop Environment).  It is slightly different from

typical window managers that we have mentioned: Instead of just describing how the interface

should look, KDE also provides a set of libraries that, if used, allow an application to take

advantage of some of the special features the window manager has to offer.

 

 

 

 

=====================================================================

 

linux3.html                                                      PAGE 3                                                   2002/07/13

 

 

 

 

The flip side to this technique of window management is that once an application is designed

to run with KDE, it requires KDE in order to work.

From a programmer’s point of view, KDE offers a library that is much easier to work with

than working directly with the X interface.  KDE also offers a standardized object-oriented

framework that allows one set of tools to build on another, something that was not available

with X Windows alone.

 

NOTE:  For more details and information on KDE, visit their Web site at http://www.kde.org.

 

 

Licensing Issues

 

Until recently, there were some problems with the license restrictions imposed by the developers

of Qt library, which is what KDE is based on. 

Recently, Qt’s license was revised.  The revised license, known as the QPL, is now more open

and does allow for commercial usage; however, it is different from the GPL  Berkeley-style

licenses used by the majority of the packages that ship with Linux distributions.

 

 

Starting X Windows and KDE

 

When setting up X Windows, you may have had a choice of starting up the system straight

into X.  If so, all you need to do is log in and you’re there—using  KDE and X Windows. 

If that option was not selected, you will have a text-based login prompt.  To get into the X

Windows environment, simply log in and run startx, like so:

           

[root@ford^/root]#^startx                         (brings up the gnome)

 

 

 

 

=====================================================================

 

linux3.html                                                      PAGE 4                                                   2002/07/13

 

 

 

In a few moments, you will be in KDE.  Your screen will probably look something like,

age 50 top.

 

Ctrl + alt + +  (press this key combination twice in a row and you will get the proper

screen size.

 

If your screen doesn’t look like that, but rather it displays the GNOME banner window

on the startup, then you need to edit the file that decides which window manager you start. 

To do this, exit out of GNOME by clicking the bear claw in the lower-left corner of the

screen and selecting logout.  This will bring you back into text mode.  Edit the .xinitrc file

using your favorite editor.  If you don’t have a favorite, try pico, like so:

 

[root@ford^/root]#^pico^.xinitrc

 

NOTE:  If you aren’t familiar with pico, don’t worry.  All of the available commands are

always shown at the bottom of the screen.  Any command that starts with the caret symbol

(^) means you use the CTRL key along with other keys specified.  For example, ^X means

CTRL-X.

 

 

#!/bin/sh

startkde

 

            ^o    Saves the file, and press the enter key too.

            ^x    Exits pico

 

If the file is not empty, go to the very last line.  It will probably begin with the string exec,

which tells the system to execute a program.  Change that line so that it reads startkde

instead.

 

 

KDE Basics     [Startx brings up KDE GUI]

 

KDE shares many qualities with other graphical desktops, such as Windows or MacOS. 

It has a desktop on which files and folders can exist.  One key point to note is that because

Linux places all of the hard disks on the system into a unifies directory tree, you won’t find

What makes the kpanel different from the Windows Start menu is that it is also a shortcut to

commonly used applications.

 

You can configure the bar to have any shortcuts you like by clicking the K button and

selecting Panel.  Under this menu is a number of configuration options.

 

 

The KDE Control Center

 

 

The KDE Control Center is a lot like the Control Panel for Windows, except it is specifically

geared toward desktop configuration items.

The Control Center offers an impressive array of tools for configuring KDE to your heart’s

delight.

 

 

Using Multiple Desktops

 

  •   One of the most powerful tools you have at your disposal is the virtual desktop.  The only

dangerous thing is it is your aggravation when you work on systems that don’t have this feature.

 

 

 

 

=====================================================================

 

linux3.html                                                      PAGE 5                                                   2002/07/13

 

 

 

  •   The essence of virtual desktops is that they allow you to effectively have multiple screens

at the same time.  All you need to do is select which screen you want to use by clicking the

virtual desktop selector at the bottom of the screen.   

 

 

Most KDE installations default to four virtual screens.  If you want to adjust that, do the following:

 

  • Open the Control Panel
  • Select Applications/Panel/Desktops
  • Move the visible slider to the right to increase the number of desktops.
  • Click the Apply button.

 

 

TIP:  If you prefer keyboard shortcuts, you can set up a shortcut that allows you to move

from one desktop to another in the Control Center under the Keys|Global Keys menu. 

Simply click the action you want (switch desktop) and then select the key combination you

want to use to move around. 

 

 

Starting Other Applications

 

There are multiple ways to start a new application.  As a system administrator, you are likely

to have a command windows up (better known as an “xterm”), so you may find it convenient

o simply run the application from there.

Common directories to check are /usr/bin, /usr/sbin, and /usr/X11R6/bin.

 

Changing the Color Scheme

 

  •   Begin by bringing the Control Center up and then clicking the Desktop option in the left

window.  This will bring up the window that looks like page 55.  In these menus you can

select your background, screensavers etc.

  •   But the most fun feature is the corner activation.  Looking at the picture of the monitor

carefully, we see that the four corners of the screen have little gray boxes.  Clicking the boxes

reveals a menu that lets us pick Ignore, Save Screen, or Lock Screen.  The default value is

  •   Ignore.   However, by selecting either Save Screen or Lock Screen, you can then move the

cursor to that corner and immediately cause the action to happen.  For example, I have the

lover-right corner of my screen set to Save Screen.  When I want to immediately activate

my screensaver, I simply move my mouse into that corner and shazaam!—my screensaver

is active.  The lower-left corner is set to Lock Screen.  So if I know I’m going away from

my desk fro a long time, I can immediately lock my screen by moving my mouse into the

lower-left corner.

 

*** This is a really neat feature ***

 

 

 

 

=======================================================================

 

linux3.html                                                      PAGE 6                                                   2002/07/13

 

 

 

ABOUT GNOME

 

Like KDE, GNOME (GNU Network Object Model Environment) offers a complete

desktop environment and application framework to make development as well as usage

easier.

 

GNOME provides development libraries and session management – foundation features

that we as users don’t see.

 

From a developer’s point of view, GNOME is very interesting.  It defines its interfaces with

the rest of the world through the CORBA technology.  Thus, any development system that

can communicate using CORBA can be used to develop GNOME-compliant applications.

Another difference you’ll find between GNOME and KDE is that GNOME offers multiple

distributions.  The base distribution is quite nice and is what we examine in this section,

(the one that comes with Red Hat).

 

 

Starting X Windows and GNOME

 

If you are using Red Hat Linux and have opted for its default, you already have GNOME

installed as our default GUI.  Depending on how X Windows is configured, you may

already have a graphical login prompt.  In that case, logging in will automatically place you

in the Xwindows environment.  If you have a text-based login, simply run startx in order to

bring X up, like so:

 

[root@ford^/root]#^startx

 

The default GUI that starts is not GNOME, you can change your personal settings to use

GNOME by editing the .xinitrc file in your home directory.  Begin by trying to exit out of

the window manager.  If you are in KDE (represented by a big “K” in the lower-left-corner),

click the K to bring up a menu.  Edit the .initrc file using pico:     

 

#!/bin/sh

gnome-session

 

 

 

 

=====================================================================

 

linux3.html                                                      PAGE 7                                                   2002/07/13

 

 

 

 

GNOME Basics

 

If you are familiar with GUI interfaces, the GNOME desktop should make you feel right at

home.  There are two significant differences:  the first is that there is no My Computer icon

on the desktop.  This is because Linux does not have the concept of separate drive letters for

each partition.  Rather, all of the partitions are made available in a single directory tree,

thereby eliminating the need to select a drive.

 

This panel is like the MS Windows panel on steroids; it shows what applications are currently

running, as well as the date and time, and the bear claw button at the left side of the panel is

similar to the Start button.  The big difference is that this panel is completely configurable: 

You can move things around in it, dock dynamic applications, set up shortcuts to other

applications, and move around your virtual desktops.

 

By default, the buttons available on the panel are, from left to right the GNOME start menu,

screen locking tool, help system and terminal emulation program.

 

 

Changing the Background

 

To change your background settings, click the Desktop menu and then Background menu. 

This will bring up a panel that looks like page 63

 

Setting the Screen Saver

 

To set the screen saver under GNOME, click the Desktop menu and then the Screensaver

menu.  This will bring up a panel that looks like page 64.

 

 

Themes

 

Themes are the way GNOME allows you to configure the appearance of your window

manager.  These changes go beyond simply changing colors, they can change the appearance

of the desktop, windows, borders and fonts for all applications.

 

Windows Manager

 

GNOME does not specify the window manager that must be used with it.  All windows

managers perform the same basic tasks, but the little difference in interface, style and

appearance are what set them apart.  The default that ships with Red hat that works with

GNOME is Enlightenment.

 

 

 

=====================================================================

 

linux3.html                                                      PAGE 8                                                   2002/07/13

 

 

 

 

 

SUMMARY:

 

  •   The X Windows environment is not part of the core operating system.
  •   Windows managers run on top of X Windows, and we can pick whatever window

manager works best for us.

  •   The KDE environment is a combination of both a window manager and application

framework for developing GUI applications.

  •   KDE’s control panel is called the Control Center and can be found by clicking the K

icon in the lower-left corner of the window.

  •   GNOME defines an application framework for other window managers and libraries. 
  •   Therefore, you can use multiple window managers, such as Enlightenment and Windows

Maker.

  •   GNOME and KDE represent significant advancements in the quality of graphical user

interfaces for Linux and UNIX as a whole.  Hopefully, the comfort of working in these

two environments is enough to convince even more folks to turn their dual-boot

configurations into single-boot Linux configurations.