2015-04-08 11:51 GMT+02:00 Russell Coker <russell@coker.com.au>:
On Wed, 8 Apr 2015 09:41:33 AM Michele Bert wrote:
> 2015-04-08 3:42 GMT+02:00 Trent W. Buck <trentbuck@gmail.com>:
> > At least xdm starts *before* the X server.
> > It's xdm that *starts* the X server.
>
> I've neve gone into details, but that's a question which sometimes comes up
> in my mind: how does a graphical DM render images on the screen? Does it
> interface with some drivers, or with an X-server?
> In the second case X starts before the DM (and it's then restarted by the
> DM).

ps axf is your friend:

Interesting. My Ubuntu 12.04 (without any graphical session - I just logged in through ssh) gives:
1064 ?        Ssl    0:00 gdm-binary
 1104 ?        Sl     0:00  \_ /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 1140 tty7     Ss+    0:08      \_ /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-hKBUNV/database -nolisten tcp vt7
 1724 ?        Ssl    0:00      \_ /usr/bin/gnome-session --session gdm --autostart=/usr/share/gdm/autostart/LoginWindow/
 1730 ?        Sl     0:25      |   \_ /usr/lib/gnome-settings-daemon/gnome-settings-daemon
 1838 ?        Sl     0:03      |   \_ metacity
 1859 ?        Sl     0:35      |   \_ /usr/lib/gdm/gdm-simple-greeter
 1866 ?        S      0:00      \_ /usr/lib/gdm/gdm-session-worker

And after logging into the graphical desktop:
1064 ?        Ssl    0:00 gdm-binary
 1104 ?        Sl     0:00  \_ /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 1140 tty7     Ss+    0:10      \_ /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-hKBUNV/database -nolisten tcp vt7
 1866 ?        Sl     0:00      \_ /usr/lib/gdm/gdm-session-worker
 4530 ?        Ssl    0:01          \_ gnome-session --session=ubuntu-2d
 4627 ?        Ss     0:00              \_ /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session gnome-session --session=ubuntu-2d
 4638 ?        Sl     0:01              \_ /usr/lib/gnome-settings-daemon/gnome-settings-daemon
 4657 ?        Sl     0:00              \_ metacity
 4668 ?        Sl     0:00              \_ unity-2d-panel
 4669 ?        Sl     0:01              \_ unity-2d-shell
 4677 ?        Sl     0:00              \_ bluetooth-applet
 4681 ?        Sl     0:00              \_ /usr/lib/gnome-settings-daemon/gnome-fallback-mount-helper
 4692 ?        Sl     0:01              \_ nautilus -n
 4693 ?        Sl     0:00              \_ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
 4694 ?        Sl     0:00              \_ nm-applet
 5294 ?        Sl     0:00              \_ /usr/lib/gnome-disk-utility/gdu-notification-daemon
 5535 ?        Sl     0:00              \_ telepathy-indicator
 5777 ?        Sl     0:00              \_ gnome-screensaver
 7632 ?        Sl     0:00              \_ update-notifier

I'd expect the PID of Xorg to be changed (if it was restarted), but it actually didn't. If I understand well, the DM starts the X server, than it reuses the same for the user logging in...

--
Mick