SUMMARY: Q: starting X sessions remotely via xdm?

From: Russell A. Fink <rfink_at_supernova.aerosys.loral.com>
Date: Fri, 24 May 1996 20:48:40 +0000

I wanted to have a DEC 3000/300X Alpha (running Digital UNIX 3.2 and
X11) be able to act like a remote X terminal and get other machines to
start X sessions on it, using a chooser box in place of the default
login box. In short, I wanted to convert my Alpha into a dumb X
terminal.

The procedure is really straightforward, unlike the manpage on xdm.
Here is what I did, and it was really easy to do once I got into it.

Note! This procedure is highly-specific for Digital UNIX OSF/1 version
3.2 running on an Alpha. As shipped, the OS provides several
configuration defaults that make this operation quite 'easy', so I'd
assume that other stuff would have to be done on other environments.

Do this from a remote telnet or login session when you're first trying
to set it up; as usual, you have to be root, so telnet in to your
machine (called, canonically, "mymachine.mydomain" in the following
instructions) as a user that can 'su' to root:

1. In /usr/var/X11/xdm/Xservers, comment out line that reads
      :0 local /usr/bin/X11/X -nice -2

Steps 2 and 3 do this operation interactively, without having to reboot
the machine. Skip these if you're planning on rebooting:

2. kill -HUP `cat /usr/lib/X11/xdm/xdm-pid`
   [ Login box will go away, display will go black ]

3. /usr/bin/X11/X -nice -2 -indirect \
      mymachine.mydomain >/dev/console 2>&1 &
   [ Chooser box will come up, with list of other alphas on your
     network ]

Step 4 makes this a permanent thing; e.g., by doing step 4, the stuff
you did in steps 2 and 3 will survive reboot:

4. add entry to /etc/inittab: (Put it all on one line, don't use '\'! )
      x11:34:respawn:/usr/bin/X11/X -nice -2 -indirect \
         mymachine.mydomain >/dev/console 2>&1

5. reboot (if you didn't do steps 2. or 3.)

Subtleties on the above procedure: you have to use the name of the
machine, "mymachine.mydomain"; you can't use IP numbers, nor can you
use "localhost" -- it just won't work, contrary to the man pages.

Beware of some odd behavior: from reading the man page on xdm, it
appears that once you choose your host from the chooser menu, you can
get back to the chooser by waiting at least 15 seconds, then clicking
"cancel" on the host's login box. Ditto if you can't log in based on
incorrect login/password -- after 15 seconds, the login box of your
selected machine won't come up anymore, it will return you to the
chooser.

This seems to work really well. On my Alpha, the chooser seems to only
display other Alpha's on the network; I suspect that Alpha's come
configured to automatically grant permission to XDMCP requests (such as
those generated by xdm), but that other machines come configured to
deny connections by default. This would seem like a security risk,
initially, and other companies seem more security-minded than DEC, so
this seems like a logical conclusion.

If I wanted to see other machines (like Suns, etc.) show up in the
chooser list, I would probably have to go to the other machines and add
permissions for my local machine in the /usr/var/X11/xdm/Xaccess file.

Thanks to all who responded, especially Serge Munhoven and Martyn
Johnson for good descriptions. In fact, I'm enclosing Serge's notes
below, with the usual disclaimers: none of us are responsible for your
ill fortunes in using these techniques. Back everything up before you
do anything. Save often.

Good luck, and thanks, 'Net! By the way, if you have access to the X
Advisor, check out the following article on configuring resources for
the chooser:

<a href="http://landru.unx.com/cgi-bin/getarticle?issue=apr96&article=/DD/advisor/docs/apr96/apr96.ONeal.shtml">
SAX -- Welcome to CLIENTHOST
</a>

-- Russ Fink
   Lockheed Martin Space Mission Systems

---------------------------------------

# To get a CHOOSER or FOREIGN LOGIN window on the console:
#
# In /usr/var/X11/xdm/Xservers : comment out using # the line
# 0: local /usr/bin/X11/X -nice -2
# to prevent the Display Manager from caring about the display.
#
# In /usr/var/X11/xdm/Xaccess : make sure there is a CHOOSER entry concerning
# this machine (not necessary for foreign login or broadcast).
#
# Find the pid of "/usr/bin/X11/xdm -config /usr/lib/X11/xdm/xdm-config"
# (e.g. using : ps -Ao pid,command | grep xdm ). Normally it should also be
# recorded in /usr/lib/X11/xdm/xdm-pid (use: cat /usr/lib/X11/xdm/pid ).
#
# Make xdm reread the configuration files using :
# kill -HUP thatpid
#
# Restart manually an X server (e.g. csh detached process) :
# with indirect query to this machine (replace 'local.host' by the IP-address) :
# /usr/bin/X11/X -nice -2 -indirect local.host >& /dev/console &
# or with broadcasted request :
# /usr/bin/X11/X -nice -2 -broadcast >& /dev/console &
# or with direct query (replace 'some.host' by the IP=address) :
# /usr/bin/X11/X -nice -2 -query some.host >& /dev/console &
#
# OR (to keep it running whatever happens, but be sure the Display Manager does
# NOT try to do the same thing !) :
#
# Add an entry to /etc/inittab (sh commands only !) :
# with indirect query to this machine (replace 'local.host' by the IP-address) :
# x11:34:respawn:/usr/bin/X11/X -nice -2 -indirect local.host > /dev/console 2>&1
# or with broadcasted request :
# x11:34:respawn:/usr/bin/X11/X -nice -2 -broadcast > /dev/console 2>&1
# or with direct query (replace 'some.host' by the IP-address) :
# x11:34:respawn:/usr/bin/X11/X -nice -2 -query some.host > /dev/console 2>&1
#
Received on Fri May 24 1996 - 23:04:57 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT