Hi Dan,
> The first X session being :0.0, (you can specify a hostname before the
> colon) the second will be :1.0, will it not?
No, not necessarily. When you start the X server you can tell it what
display number this particular X server has by specifying it as a
parameter.
X :1
The "switch user" mechanism in Gnome seems to leap straight from :0 to
:20, perhaps to allow the :0 user a few displays to use, e.g. for
Xnest(1).
The number determines the network port the X server listens on. 6000 is
the base,
$ grep -w 6000 /etc/services
x11 6000/tcp x11-0 # X Window System
x11 6000/udp x11-0
$
i.e. :0 listens on 6000 and :20 listens on 6020.
> I'm not sure about the .0, as you can also refer to it with just :0,
> :1, etc., and they get mapped on the local machine like :0 ->
> ctrl+alt+f7, :1 -> ctrl+alt+f8, etc., unless they're virtual (e.g.
> VNC)
It's "[network_host]:display[.screen]". The screen defaults to 0. It's
the logical X screen and may not relate to the physical screens you
have.
Here's I've two X server's running, :0 and :20. The Unix domain sockets under
/tmp/.X11-unix are how clients connect to them. lsof(8) shows :0 has quite a
few more clients than :20 but it's always showing Xorg as the command rather
than a client e.g. xclock(1).
$ sudo lsof /tmp/.X11-unix/*
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Xorg 6516 root 1u unix 0xee0cd700 16820 /tmp/.X11-unix/X0
Xorg 6516 root 9u unix 0xee0cdc40 17071 /tmp/.X11-unix/X0
Xorg 6516 root 10u unix 0xef308380 17282 /tmp/.X11-unix/X0
Xorg 6516 root 11u unix 0xeea5dc40 17338 /tmp/.X11-unix/X0
Xorg 6516 root 12u unix 0xef37d1c0 17456 /tmp/.X11-unix/X0
Xorg 6516 root 13u unix 0xeeedc540 19181 /tmp/.X11-unix/X0
Xorg 6516 root 14u unix 0xeefffa80 19345 /tmp/.X11-unix/X0
Xorg 6516 root 15u unix 0xee8f3a80 19478 /tmp/.X11-unix/X0
Xorg 6516 root 16u unix 0xeea60a80 19495 /tmp/.X11-unix/X0
Xorg 6516 root 17u unix 0xeeb7c1c0 20318 /tmp/.X11-unix/X0
Xorg 6516 root 18u unix 0xef311e00 19593 /tmp/.X11-unix/X0
Xorg 6516 root 19u unix 0xee579380 20089 /tmp/.X11-unix/X0
Xorg 6516 root 20u unix 0xee5791c0 19941 /tmp/.X11-unix/X0
Xorg 6516 root 21u unix 0xee582700 594142 /tmp/.X11-unix/X0
Xorg 6516 root 22u unix 0xee640380 20041 /tmp/.X11-unix/X0
Xorg 6516 root 23u unix 0xee640700 20046 /tmp/.X11-unix/X0
Xorg 6516 root 24u unix 0xeeb08e00 20179 /tmp/.X11-unix/X0
Xorg 6516 root 25u unix 0xeeb7ce00 20320 /tmp/.X11-unix/X0
Xorg 6516 root 26u unix 0xef8ee8c0 20541 /tmp/.X11-unix/X0
Xorg 6516 root 27u unix 0xef137c40 594383 /tmp/.X11-unix/X0
Xorg 6516 root 28u unix 0xef28dc40 575863 /tmp/.X11-unix/X0
Xorg 6516 root 29u unix 0xd10f58c0 614438 /tmp/.X11-unix/X0
Xorg 6516 root 30u unix 0xefbbb380 584330 /tmp/.X11-unix/X0
Xorg 6516 root 31u unix 0xefb82540 608470 /tmp/.X11-unix/X0
Xorg 6516 root 32u unix 0xd10f5700 614453 /tmp/.X11-unix/X0
Xorg 14916 root 1u unix 0xee60ee00 608993 /tmp/.X11-unix/X20
Xorg 14916 root 9u unix 0xee60e380 609146 /tmp/.X11-unix/X20
Xorg 14916 root 10u unix 0xef1371c0 609777 /tmp/.X11-unix/X20
Xorg 14916 root 11u unix 0xef8ee540 609836 /tmp/.X11-unix/X20
Xorg 14916 root 12u unix 0xee736380 609951 /tmp/.X11-unix/X20
Xorg 14916 root 13u unix 0xc0d0a380 611567 /tmp/.X11-unix/X20
Xorg 14916 root 14u unix 0xc0d0a540 611677 /tmp/.X11-unix/X20
Xorg 14916 root 15u unix 0xeecdb700 611822 /tmp/.X11-unix/X20
Xorg 14916 root 16u unix 0xee583380 611888 /tmp/.X11-unix/X20
Xorg 14916 root 17u unix 0xef8c2c40 611911 /tmp/.X11-unix/X20
Xorg 14916 root 19u unix 0xd12f9e00 612433 /tmp/.X11-unix/X20
Xorg 14916 root 20u unix 0xc4ff48c0 612259 /tmp/.X11-unix/X20
Xorg 14916 root 21u unix 0xd1313380 612672 /tmp/.X11-unix/X20
Xorg 14916 root 22u unix 0xee60ac40 612382 /tmp/.X11-unix/X20
Xorg 14916 root 23u unix 0xd1313e00 612686 /tmp/.X11-unix/X20
Xorg 14916 root 24u unix 0xd1239c40 612724 /tmp/.X11-unix/X20
$
Cheers,
Ralph.
--
Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00
Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/
How to Report Bugs Effectively: http://goo.gl/4Xue