Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do all the components that make up an "X desktop session" fit together?

I've gone through http://en.wikipedia.org/wiki/X_Window_System , and I see that there are all sorts of components like X Servers, Login Managers, Session Managers, Window Managers, Desktop Environments, ...

But, I'm not clear on how they all fit together.

One reason I'm trying to figure this out so that I can insert my own logic into the boot process such that in certain cases, the system will directly boot to a particular user's desktop session, rather than a login greeter.

But, I'm also just trying to understand the architectural design, so that I can extend this to Xvnc style setups as well.

Thank you

share|improve this question

migrated from serverfault.com Oct 28 '11 at 15:53

This question came from our site for system and network administrators.

What is a Xvnc style setup? – Nils Oct 28 '11 at 21:38

Good question. The dependencies changed in time. It also depends on wether you use KDE or GNOME. While trying to answer your question I just used pstree while my GUI is running (in my case: KDE on CentOS).

There it seems that GDM starts the X-Server and KDE. After that KINIT kicks in.

So GDM is propably the place where you want to kick in.

share|improve this answer

First process is display manager (DM), which launches X server and shows login prompt to user. After successful authentication in launches DE's session manager, which launches all other parts (WM and so). Most DMs can be configured to launch specified user's session automatically.

share|improve this answer

Your Answer


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