"Linux Gazette...making Linux just a little more fun!"

The Answer Guy

By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/

(?)Remote X using xdm

From Andy Faulkner on 28 Sep 1998

Dear answerguy.

I have been trying for the last several hours that when I first started it sounded simple.

I am trying to launch a xdm session on my linux box from a another linux box on the same network.

I have tried to use "chooser" but it brings up no listed hosts. Also when I fire up chooser I see nothing going across the network. I hate to say this but with my Winblows box I can do it with reflectionX. I am running S.u.S.E. 5.2 and the other machine is running 5.3. We are both using KDE and also using kdm instead of xdm. We have tried both, and both had the same results. It looks as though I am not sending the request out to the host for a xdm session.

I can't seem to find any docs on "chooser" or on how to launch a session on a linux box.

What do you think? Andy Faulkner

(!)I think 'chooser' (/usr/X11R6/lib/X11/xdm/chooser) is normally run by 'xdm' --- probably with some special environment variables and parameters. --- I don't think it's feasible to run 'chooser' by itself. (That would be a good reason to put it in the "lib" directory rather than under a bin directory --- and would explain why it has no man page of its own.
(I'll grant that this seems like an odd way to do it --- since making 'chooser' a shared library would make more sense from a classical programming point of view. In any event I don't know how you'd use 'chooser' directly).
Remote execution of X sessions via xdm is a bit confusing. Under S.u.S.E. they have a script /sbin/init.d/rx which can be used with their /etc/rc.config variable settings to run the xdm and allow access via XDMCP (the X display manager control protocol).
To remotely access systems running these display managers you have to run your X server with a command such as:
X -broadcast
(connect to the "first" --- or only --- available xdm server).
Alternatively you can specify the server you want to connect to with a command like:
X -query $HOST
--- which will require the host name or IP address.
To use the chooser you have to run a command like:
X -indirect $HOST
... this will cause the xdm on the named host to provide a list of known xdm hosts (possibly including itself).
In any of these cases the 'xdm' process must already be running on the remote host. That host need not be running any X server! (I realize the terminology is confusing --- more on that later).
To quote the xdm man page:
When xdm receives an Indirect query via XDMCP, it can run a chooser process to perform an XDMCP BroadcastQuery (or an XDMCP Query to specified hosts) on behalf of the display and offer a menu of possible hosts that offer XDMCP display management. This feature is useful with X terminals that do not offer a host menu themselves.
(it's also possible to configure the list manually and to configure it so that some BroadcastQuery replies are ignored).
I have no 'kdm' incorporates all of these functions are not. You should look through their man page for details.
I'm also a bit unclear on how you'd run xdm such that it would not run a local display server. I know it's possible, but I'm not sure how. (In other words, if you want to run 'kdm' on your console and 'xdm' for the remote X servers).
I realize the terminology is a bit confusing here. We have "xdm servers" running on one machine, and X servers (the X Windows display server --- the think that actually controls your video card) running on other machines. Note that the X display server controls your video card and acts as a communications package between your display (keyboard, video, and mouse) and the programs that are running under X (the "clients" to your display server).
Thus 'xdm' is a "client" to your X display server regardless of whether that 'xdm' process is running on you localhost or on another machine on the network.
To complicate issues even further the 'xdm' "indirect" option first connects your X server to a one client --- then, based on the selection you make from the chooser, it restarts your X server with instructions on connecting to another 'xdm' host.
In the end, when you connect to a host via 'xdm', you log into and it is as though you were running an X session at that system's console. All of the windows you open will be processes running on the 'xdm' host. So you can think of 'xdm' as a combined 'getty' and 'telnetd' and 'login' for the X protocol.
There are a variety of shell scripts under /usr/X11R6/lib/X11/xdm that control how the console is "taken" (back from a user that logs out) "given" (to a user that logs in), "setup" (prior to xdm's display of the "xlogin" widget), "started" (as 'root' but after login) and how the "session" is started (under the user's UID).
You'll want to read the xdm man page and all of the scripts and resource files in the xdm directory to adjust these things. (It just amazes me how complicated all that vaunted "flexibility" and all those customization options can make something as seemingly simple as: provide me with a GUI login).
Anyway, I hope that helps.

Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 34 November 1998

[ Answer Guy Index ] apache current digi ether goodtimes intlX largedisk
maybe numlock quota recovery script serial session
sound tape testsuite w95ie w95ras w95virus xdm

[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]