Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would Like to know what exactly each does and how they are layered/structured or interrelated to each other, their functions, their interdependence, their communication protocols and when and why they interact and all that stuff!

i would really appreciate a detailed answer, for 2 reasons -

m not very well at this part. the display servers and all, and, all users who encounter this question and the answer can know everything!

Thankyou! :)

share|improve this question

2 Answers 2

up vote 3 down vote accepted

An X Windows server provides a very basic graphical environment, usually connected to a monitor, a mouse and a keyboard.

A display manager (DM) is just the login screen, which runs in its own X windows server session. When you log in, the DM will usually start an entirely fresh X session and will also start the window manager (or desktop environment) that you have chosen.

There are many window managers (WM) available for X. These provide the basics of handling switching and focusing windows, positioning, resizing and decorations (or no decorations in the case of twm/ratpoison/awesome).

A desktop environment (DE) usually provides a window manager but a bunch of other stuff too: panels, start button, applets for volume, network etc. They provide an environment in which everything looks similar and easily recognisable, and provide GUI tools that allow you to do many admin tasks without having to type in a terminal. They often provide a display manager too, for a consistent end-to-end experience. And in the case of Gnome and KDE, a full suite of applications too!

So hackers can survive with just a window manager, but general computer users prefer a desktop environment where everything is integrated in a familiar style.

The fun thing is, thanks to Unix's philosophy of decoupling components, and since the only common required component is X windows, you can mix and match the rest if you want to. You could use Trinity KDE's display manager but ask it to run the Fluxbox window manager when you log in, and then startup LXDE's panel (lxpanel) to provide some icons, applets and a workspace pager. You could even run bbkeys to perform window management actions using your favourite keybindings, and keep using it if you switch to a different WM later! :)

(A setup like that can be achieved with configuration in .fluxbox/startup or in .xinitrc if you skip the DM and just run startx from the console.)

Finally, many window managers will let you switch to a different window manager via their menu (sometimes found by right-clicking the desktop), without restarting the X session or losing any of your windows! This is great when you want to try out some WMs to see which one you like most. Sadly modern Desktop Environments don't seem to bother with this cool feature.

Some distributions will offer you a failsafe login, which may provide an x-terminal with no window manager. From there you can boot a window manager, kill it, start a DE, kill that, start a new window manager etc. The X session itself will not close until that x-terminal does.

share|improve this answer
1  
Exceptionally thorough coverage of the subject in question, @joeytwiddle. You have the rare ability to structure lots of information in an accessible manner, and in easy-to-follow language --without throwing a bunch of links to external articles that serve as the body of the reply. This should definitely be accepted as the answer! –  AsianSquirrel Jan 2 at 20:44

You may find partial enlightenment at the following link: http://www.tuxfiles.org/linuxhelp/xwtf.html

Other great reading on the subject comes from WikiPedia: http://en.wikipedia.org/wiki/X_Window_System

Hopefully these resources will give you a good primmer.

share|improve this answer
    
okay that 1st article was a gr8 one...cleard out the basics! but still confused abt 1 thing, there, Display manager and Desktop Environment are said to be same... now, Unity uses LightDM, Gnome uses GDM, etc (and all these generally are login and lock screen stuff) ... so a desktop environment is using a display manager...what is this anology or connection? –  Nirmik Jul 2 '13 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.