"Linux Gazette...making Linux just a little more fun!"


X Windows versus Windows 95/98/NT: No contest

By Paul Gregory Cooper


In the December Issue of the Linux Journal Sergio Martinez wrote in asking for a (quick) article about the differences between X and Windows 95/98/NT (w95) -- see below. This is my attempt to answer his questions - I remember asking similar things when I started using UNIX 4 years ago. [More answers can be found in the 2 Cent Tips Column. --Editor] I've tried to aim this article at the 'Linux newbie' and as I am not an X hacker, and never been a w95 hacker, there may well be inaccuracies, but I have tried to capture the ideas and spirit of X (and w95, such as it has any). I would be pleased to hear from Xperts and newbies alike.

Sergio has asked questions relating to GNOME and KDE and for the most part I treat them as equivalent (in the same way I'm treating all window managers as equivalent). I should state now that I prefer using GNOME over KDE, irrespective of the ongoing KDE / Open Source debate, hence I have more experience in GNOME than in KDE. This too may lead to inaccuracies.

Mail criticisms to pgc@maths.warwick.ac.uk.


This is Sergios mail;

I'm just writing in with an idea for a quick article. I've been using the GNOME desktop. I'm a relative Linux newbie though, and I think that many of your less experienced readers could probably benefit from a short article about window managers. These are some things I currently don't quite understand:

1.Terminology: The differences (if any) among a GUI, a window manager, a desktop, and an interface. How do they differ from X windows?

2.Do all window managers (like GNOME or KDE or FVWM95) run on top of X windows?

3.What exactly does it mean for an application to be GNOME or KDE aware? What happens if it's not? Can you still run it?

4.What exactly do the GTK+ (for GNOME) or Troll (for KDE) libraries do?

5.How does the history of Linux (or UNIX) window managers compare to that of say, the desktop given to Win98/95 users? How, specifically, does Microsoft limit consumer's choices by giving them just one kind of desktop, supposedly one designed for ease of use?

6.What's happening with Common Desktop Environment? Is it correct that it's not widely adopted among Linux users because it's a resource hog, or not open source?

These are some questions that might make an enlightening, short article. Thank you for your consideration.

-- Sergio E. Martinez


Before I try to answer each point I'll try to give a quick intro into X-windows.

Think of X as just another program. When you type startx what happens is that X starts (shock!), in the background, and runs the .xinitrc file. The .xinitrc tells X what programs to start once X itself has started - more on this later. (Some systems use the .Xclients file instead of .xinitrc - I'll just use .xinintrc).

So X is just another program but what does it do? Roughly speaking X takes control of the screen from the command line and provides the system with the ability to create windows and communicate with them. Basically that's ALL it does - decorating, moving, resizing, focus, etc, (i.e. managing the windows X provides) is left to the window manager.

What's clever about X is uses a client/server model and is network transparent. This is a bunch of jargon - what does it mean?

When you type startx you are starting the X-server, when you run an 'X-application', e.g. netscape, this is a client to which the X-server gives a window. Similarly xterm is an X-app which puts the command line in a window.

Network transparency doesn't mean much if you're not networked so let's suppose the computer you started X on is called fourier and is networked. Now a program on any computer on the network can ask the X-server on fourier to start a window for it (on fourier), for instance from fourier you could telnet to cauchy (another computer on your network) and run netscape and have the netscape window appear on your screen (connected to fourier).

In fact it works the other way round too - an X-server can have many screens (or, as it calls them, displays) connected to it at once - all different - and those screens can be at the other end of a network. This goes back to (one of) the original design purpose(s) of X which was for X-terminals, i.e. things that looked like a computer but were no more than a screen, some memory, a bios, and a network card connected to one (or many) UNIX mainframe(s). See this page for details of how to turn old 386/486's into xterminals.

1.Terminology: The differences (if any) among a GUI, a window manager, a desktop, and an interface. How do they differ from X windows?

Ok, so we have more jargon - I hope I get this right ;-). An interface is the way in which a piece of software interacts with the user. Unix commands use a command line interface (CLI) whereas X-applications use a graphical user interface (GUI). However different applications tend to use different approaches to the GUI, for instance when you select a menu does one click bring the menu up (e.g. netscape) or do you have to hold the mouse button down (e.g. ghostview). What GNOME, KDE, and w95 try to provide a consistent GUI amongst all applications, or at least amongst the common parts of applications, e.g. menus, file selection, window controls, scrollbars, etc. See the GUI hall of fame/shame for examples of good/bad GUI design (in windows environment).

As was mentioned above a window manager takes over where X leaves of - that is, controlling the windows X gives it. Window managers usually give you alot more that the just the ability to move, resize, or iconify windows. Many also provide virtual desktops, taskbars, themes, app managers, etc. See Window managers for X for a list of most, if not all, wm's.

Desktop has (as far as I can tell) two usages. We use 'the desktop' to refer to the background part of the screen. GNOME, KDE, W95, and MacOS all 'provide a desktop' meaning the background is more that just a canvas for a nice picture - it acts like any directory in the system. Technically all this means is that you can place files onto it. However these may be data (like a letter to gran) or programs, (e.g. netscape, emacs, etc). Usually this 'background as directory' philosophy is coupled with a graphical file manager, so that when you (double) click on a file either it runs (if it's a program) or a suitable program is started to read the data in the file. In this context 'desktop' can also include a GUI, so that when people say that all Linux/UNIX is missing is a 'desktop' what they mean is a consistent design of common parts of programs, a graphical file manager, and the ability to leave files littered on the desktop ;-)

2.Do all window managers (like GNOME or KDE or FVWM95) run on top of X windows?

I like to think of the window manager, fvwm95, window maker, etc, and the desktop, GNOME or KDE, as running in conjunction with X - but this is just semantics. The window manager and/or desktop is started (in the .xinitrc file) after X has started.

The traditional (i.e. pre KDE/GNOME) setup of .xinitrc (after some environment settings) is to have some xterms and a window manager, so the last lines of the .xinitrc might look like;

xterm &
xterm &
fvwm95
The window manager is the last thing started by .xinitrc and when the wm exits, .xinitrc finishes and then X terminates.

If you were using GNOME the last few lines of the .xinitrc would now be;

fvwm95 &
gnome-session
And for KDE it would be;
startkde
As before GNOME (KDE) are the last things started by .xinitrc and so when you logout of GNOME (KDE) the gnome-session (startkde) termintes, .xinitrc finishes, and then X terminates.

In both these examples the xterms are left out as GNOME and KDE provide sessions management, which means any application left running when the session ends get started when you startup the next time. Windows has some session management too.

See the next answer as to why the window manager is started for GNOME but not for KDE.

3.What exactly does it mean for an application to be GNOME or KDE aware? What happens if it's not? Can you still run it?

AFAIK an application is a GNOME (KDE) application of it conforms to the GNOME (KDE) GUI guidelines/specifications and uses the Gtk+ (qt) libraries. All this means is that GNOME apps use Gtk+ to build menu's, buttons, scroll bars, file selectors, etc and they do so in a consistent way (as defined by the GNOME team), e.g. all menus are left justified, all apps have a FILE menu as the left-most menu, etc. Same for KDE except they use the qt library by Troll Tech (and possibly a different set of design guidelines).

Any GNOME app will run provided you have Gtk+ (and the other GNOME libraries) installed and similarly any KDE app will run so long as you have qt (and other KDE libraries) installed - you do not have to be running GNOME/KDE to use a GNOME/KDE application. The only other additional thing GNOME/KDE apps may have is drag and drop awareness, e.g. in GNOME you can drag a JPG from a GMC (file manger) window into an ElectricEyes (graphics viewer) window and ElecticEyes will display this file. You can do similar things in KDE.

GNOME and KDE have different attitudes to window managers. KDE prefers to work with its own window manager Kvm, and GNOME is 'window manager agnostic' - well those are the 'party lines'. You can get other wm's to work with KDE (so I'm told) and GNOME should work with any wm but prefers to work with a window manager that is ICCCM compliant and 'GNOME aware'. I'm not sure what this means but I know the only totally compliant wm is Enlightenment DR0.15 (which is only available through CVS at the moment) followed by icewm, and with blackbox and windowmaker a little way behind. I think that the KDE team are working towards making KDE less dependent on Kvm and defining what a KDE wm should be.

4.What exactly do the GTK+ (for GNOME) or Troll (for KDE) libraries do?

Whoops - I think I answered this above. Gtk+ and qt are toolkits for building menu's, buttons, scrollbars, dialog boxes, and loads more.

5.How does the history of Linux (or UNIX) window managers compare to that of say, the desktop given to Win98/95 users? How, specifically, does Microsoft limit consumer's choices by giving them just one kind of desktop, supposedly one designed for ease of use?

I'm not sure I understand this question let alone know how to answer it, so instead I'll answer what I think you might be asking which is; What's the difference between UNIX + X and W95/98/NT.

The first thing to point out is the component nature of the UNIX approach to a GUI/Desktop. First we have the OS itself, in our case Linux, on top of that we have the window system, X, and in conjunction with that we have the window manager, fvwm (for example), and in conjunction with these two we have the desktop/gui, either GNOME or KDE. This follows the general philosophy of UNIX which is to build small tools that interact which each other in well defined ways. It may seem shambolic but it is a strength. It means that one or other of the pieces can be interchanged, which gives the user lots of choice (perhaps too much), and also allows for technological improvements. For instance X is just one windowing system and may not last forever (gasp!) There are others, e.g. the hungry programmers Y.

This also gives the user the choice of which window manager or desktop to use, or in fact whether to use windows and desktops at all - it may seem strange but some people prefer the command line, and others use X and a window manager but don't like GNOME or KDE.

Windows95/98/NT on the other hand is a different kettle of fish. Here the OS, GUI, WM, and desktop aren't clearly separated (as in UNIX) but are all rolled into one. Thus you have whatever choice Microsoft happen to give you, i.e. windows themes.

For Microsoft this is an advantage - it stops people butting in and rewriting parts of their OS which could potentially lose them money. For instance they realized that with the old windows 2/3.1 you could simply replace MS DOS with another compatible DOS such as DR DOS from Caldera. In an ongoing court case Caldera allege that MS added code to windows to make it seem like there was a bug in DR DOS. With 9*/NT being all rolled in one there is no need to resort to such tactics.

IMO the W95 desktop is inferior because the user is limited to one design whereas on a linux system there is a wm + desktop to suit just about everybody (including those that don't want either a wm or a desktop).

6.What's happening with Common Desktop Environment? Is it correct that it's not widely adopted among Linux users because it's a resource hog, or not open source?

It's not widely adopted because it is commercial, not open source, a resourse hog, has security problems (RedHat stopped selling it for this reason), and is IMHO outdated.


Copyright © 1999, Paul Gregory Cooper
Published in Issue 36 of Linux Gazette, January 1999


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next