Re: noob requesting a bit of explanation ...
From: Steve Kirkendall (skirkendall_at_dsl-only.net)
Date: 04/01/04
- Next message: Rick and Sue Deschene: "Running a command automatically on boot"
- Previous message: os2: "listen music on network..."
- In reply to: Martin Slaney: "noob requesting a bit of explanation ..."
- Next in thread: Jim the Bad: "Re: noob requesting a bit of explanation ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 01 Apr 2004 10:43:33 -0800
Martin Slaney wrote:
>
> Could someone - in a few sentences - very broadly describe how the
> (apparent) multiple "layers" of GUI work in Linux ? How do these layers
> work/relate to each other ?
Okay, I'll give it a shot....
The X server controls access to the screen, keyboard and mouse.
Applications are clients. They create windows and draw in them. They
access the X server via Xlib and (usually) a library containing set of
widgets.
The window manager is a client. It draws things outside the application
windows. This includes the decorations around the perimeter of windows.
It is responsible for things like resizing windows and controlling input
focus (i.e., which window receives keystroke events).
Widgets provide the look & feel of an individual application. The window
manager provides the look & feel of the rest of your desktop. KDE uses
the KDE widget set and the kwm window manager. Gnome uses the Gnome
widget set and either Sawfish or Metacity as the window manager. There
are many other widget sets and window managers, and you can use a mixture
if you want (e.g., run a Gnome program in a KDE desktop).
--------------------------------------------------------------------------
In more detail...
* The X server manages shared resources. For graphics programs, those
resources include the screen, keyboard, mouse, and some software objects
such as windows and colormaps. This means the server is the only part
of X that you see and feel; it is right in front of you, and *NOT* in
a back room somewhere like a file server, mail server, or print server
might be. Most Linux distros use the XFree86 version of the X server.
* Extensions, if any, reside in the server. The basic X is good enough
for most applications, but some a little extra code can go a long way
to help a few specific applications. Some of the most common extensions
are XVideo for displaying movie frames, GLX for 3D graphics, RENDER for
advanced 2D graphics including antialiased text, and MIT-SHM for using
shared memory to bypass the network when sending large images between
an application and the server.
* The X protocol is a network protocol. X clients use the X protocol to
communicate with the X server.
* Xlib is a client-side library. It serves mostly as a "wrapper" around
the network protocol.
* Extension libraries are used by clients to access the server's extensions.
Most extensions have their own little library -- -lXv for XVideo, -lgl
for GLX, and so on. These libraries all send their requests through Xlib
functions.
* Widgets are what Microsoft calls "controls" -- on-screen objects with
specific behavior, such as buttons and menus. Widget libraries are a
higher-level (more abstract) wrapper around Xlib. This is where the
"look and feel" starts to take shape. Athena, Motif, and Tk are three
widget sets. KDE and Gnome also include widget sets (and a lot more).
* A "window manager" is a client with special privileges. It is allowed
to intercept requests from other clients (applications) for things like
creating windows; when that happens, it creates a slightly larger window
and puts the application's window inside that window. The extra space
is then used to draw the border and title around the application window.
The window manager also responds to mouse events in the border, for
doing things like resizing windows. There are standards describing the
responsibilities of window managers; consequently, you can usually use
any application with any window manager. That's important, because
you can only run one window manager at a time. The window manager
provides the rest of the "look & feel" of your desktop.
* Applications are clients. They use Xlib and usually a widget set.
They can also use Linux to access files, or whatever.
---------------------------------------------------------------------
> I mean what really is Xfree86 ?
XFree86 is an organization which ported MIT's generic X server to the
IBM/Intel architecture, and optimized it for modern video cards. They
also coordinated some extensions such as the RENDER extension, and wrote
some setup tools (though most distros provide their own tools for
setting up X.)
The server, like the organization that produced it, is named XFree86.
But that's just the name of the server program; there are many other
files for things like device drivers, fonts, icons, libraries, etc.
> What are KDE, Gnome ? Window managers ?
A window manager is a program that draws decorations around application
windows, and makes those decorations do things like resize the windows,
iconify them, move between different "workspaces", and control input focus.
Some window managers also support a taskbar and/or a menus for starting
programs; others may communicate with another client which supports them.
KDE and Gnome are environments. These include a window manager, a widget
set (giving applications a common look & feel), and some extra services
for exchanging data or downloading files. Plus lots of applications,
including some configuration utilities.
> Which of them is a subset of "X-windows" ?
The X server and Xlib are probably the minimum that you could call "X".
Other folks may insist on including the extensions, widgets, and window
managers.
Gnome and KDE are implemented on top of X.
> Where do the h/w specific device drivers "plug in" to ?
The X server.
> How specific are these layers to the different Linux distro's ?
> Could you please use "brand name" examples ?
The layers aren't distro-specific at all. Different distros may provide
different applications and window managers, but that's about it.
- Next message: Rick and Sue Deschene: "Running a command automatically on boot"
- Previous message: os2: "listen music on network..."
- In reply to: Martin Slaney: "noob requesting a bit of explanation ..."
- Next in thread: Jim the Bad: "Re: noob requesting a bit of explanation ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]