[NTLUG:Discuss] Simple X11 resources

Chris Cox cjcox at acm.org
Sat May 20 21:16:10 CDT 2006


Simply put, an X server (XFree86, Xorg, Xgl) manages a
display/mouse/keyboard.  By itself you get a default
display with a simple root-weave background and a X
for a cursor.  That's all.

An X client is what interacts with the display/keyboard/mouse...
and thus... ultimately with an end user.  An X client
an be local on the same platform as the X server, or it
can be a client started from a remote host.  All graphical
widgets/programs/etc. are simply X clients.  Including
apparently fundamental elements, such as the window manager
or desktop manager.

You direct an X client to a particular X server with
the DISPLAY environment variable.. or possibly with
a command like paramenter (e.g. -display ...).

The DISPLAY is of the form [server-host]:display-num[.screen-num]
(the brackets mean optional).  So the simplest form is:

DISPLAY=:0; export DISPLAY

Which says, the X server is on the same host and that
you want to send something to display :0 on the local
host.  To attempt to direct an X client to a remote
X server you would set the variable to something like:

DISPLAY=someotherhost:0

If an X server is managing multiple screens, you can
also supply a screen number (defaults to zero).

DISPLAY=someotherhost:0.1

Sometime in the 1980's, the default behavior of an
X server is to not allow external clients to connect
unless they are authorized.  Originally, the security
mechanism was very simple... you use xhost to add
hosts that are allowed to connect to the X server by
doing xhost +[someclienthost] (you can also explicitly
remote access with -).

Shortly after, xauth was added as a more secure
way of allowing X clients to access your X server, man xuth

SUSE today disables ALL listening of outside client
requests by supplying -nolisten tcp options on the starting
of the X server.  This is a fairly recent add/change.

SUSE recommends that you start X clients on remote hosts
through an X11 tunnel through SSH.  Thus to start
an X client running on someotherhost yet using my
own X server, I would do something like:

ssh -X someotherhost

The advantage is all traffic travels through port 22, so
it is encrypted AND it looks to the X server like a localhost
client connect.

There are some links from just googling... some of the stuff is ok.

http://en.wikipedia.org/wiki/X11

http://www.freesoftwaremagazine.com/articles/what_is_x/

(and a tribute to our friend and former treasurer)
http://cbbrowne.com/info/x.html



More information about the Discuss mailing list