On Wed, 9 Mar 2005, Lindsay wrote:

Am I right then in assuming that it is another term for 'terminal?'

No.

Time for a wee chat on the subject of Shell/ X Windows / Window Managers.

Hint, you don't really need to know all this. I just find it fun.

Everything that comes with MS-Windows is Windows and is part a monolithic thing. Linux is far less monolithic and many parts that Windows users expect to be an integral part of Linux is just an unpluggable module for which other modules are available!

For example, the entire windowing system XWindows is entirely separate from Linux. X and Linux can and do work without each other. X itself is just a graphics card, keyboard and pointer minder. It provides a secure and network transparent way of scribbling on the screen. That's all!

Management, placement, routing of key presses and mouse clicks to apps, decoration of the windows is done by a Window Manager. There are many different Window Managers such as the KDE projects kwm, the Gnome projects Sawfish, Redhat's Metacity, Enlightenment, twm, fwvm, ...

In the Windows world the command line is ye olde MS-DOS command.com and that's it.

In the Linux world the command line is Just Another Program, with "sh" being the oldest, "bash" the most common and a huge variety of others with various characteristics.

Even the window in which the command line appears is Just Another Program. The most common being the KDE project's "konsole" or the Gnome projects "gnome-terminal".

It's a bit subtle that. The "terminal" is a program for display character data on the screen. The shell is a program for interpreting commands from the user.

Let's follow what happens when you type "ls" to list a directory.

So when you press a key, the kernel gets it first, hands it over to X, which hands it on to the Window manager, which hands it on to the terminal, which echos it onto the screen and writes it to the STDIN of
the shell.


The shell just buffers it until you have typed the 's' and hit the enter key.

The shell then interprets the command "ls" as meaning "list this directory" and asks the kernel for the information, and spits the answer to STDOUT.

The terminal is on the other side of the shells STDOUT, reads the answer and tells X where to put the characters in its window. The window manager tells X where the terminals window is.

Another major difference is since X is network transparent, (ie. any program, given permission, can scribble anything on any display), the command line display like konsole can display on any screen on the network!

Remember that Unix is designed from the ground up to be a multi-user system. ie. Everything about it expects that more than one person, will be using the same machine, and its the operating systems job to protect each user from the idiocy of the others. (Note Unix does nothing to protect you from your own idiocy, so spend as little time as possible as the "root" user!)



John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : [EMAIL PROTECTED]
New Zealand

Refactorers do it a little better every time.

Reply via email to