Subject: Re: Can I set up a NetBSD-box to work as an X-terminal?
To: None <port-mac68k@netbsd.org>
From: Bernd Sieker <bsieker@freenet.de>
List: port-mac68k
Date: 11/23/2002 16:02:58
On 23.11.02, 08:22:45, Frederick Bruckman wrote:
> On Sat, 23 Nov 2002, Alexander Klein wrote:
> 
> > I've been using my good old P-475 for over two years now, but it's sooo
> > slow for C++ programming. :(
> >
> > However, it's sitting right beside a 6100/66 running MkLinux, and I wonder
> > if there is a way to make the 6100 display a login-screen on the 475. I
> > tried to RTFM, but I'm afraid X is too complicated - at least for me - to
> > understand all the detail in a reasonable amount of time.
> >
> > Has anyone else managed to make such a set-up work?
> 
> Sure. The simplest way, is to first uncomment the line in
> "/usr/X11R6/lib/X11/xdm/Xaccess", on the host running "xdm", that says
> "any host can get a chooser", and restart "xdm". Then start the

Actually there are two lines, both slightly different, that need to be
uncommented:

  *		# any host can get a login winodw

and:

  *	CHOOSER BROADCAST  # any indirect host can get a chooser


> Xserver manually on the designated X server, as ``X -indirect
> xdm_host_name &''. Then authorize the "xdm" host to connect, via
> ``xhost +xdm_host_name''. The chooser window should appear shortly.
  ^^^^^^^^^^^^^^^^^^^^^^^^

_NEVER_ do that! Allowing a complete host unrestricted access is
a gaping security hole. Anyone on that host could open a Window on
the X-Terminal's display, and try all sorts of login-spoofing, etc.
Never, ever use xhost. Besides, in this setup, it's unneccessary.

You also need to comment out the line in <XRoot>/lib/X11/xdm/xdm-config
that says "DisplayManager.requestPort:   0". Use a "!" for comments in
xdm config files.

I have almost all my systems configured to work as X-Terminals, so I can
cross-login from any to any other host.

I'm using a different, more flexible and more automated setup.

On some architectures (though not on all, notably not on hpcmips) you
can have init start the Xserver via /etc/ttys. Here's what I use:

  console "/usr/libexec/getty Pc"         vt100   off insecure
  ttyE0   "/usr/libexec/getty Pc"         vt220   on insecure
  ttyE1   "/usr/libexec/getty Pc"         vt220   on secure
  ttyE2   "/usr/libexec/getty Pc"         vt220   on secure
  ttyE3   "/usr/libexec/getty Pc"         vt220   on secure
  ttyE4   "/usr/X11R6/bin/X -terminate -indirect boa" unknown on secure

Where boa is the xdm server on which you wish to run the session.
It then sends an xdmcp broadcast and displays a chooser window on
the X-Terminal's Xserver showing all hosts that are willing to
manage a session.

Warning! Only do this if you're certain that either this really
works[tm], or you have a working network connection with sshd
running. Otherwise init will try to restart the server over and
over, and you won't be able to login at all. On a slow machine it
might not even think that it was "respawning too fast" and disable
it for a minute or so.

If you have only one server that you wish to login to, replace
"-indirect" with "-query": that will get you a login window directly
from that host, without the chooser.

the "-terminate" may not be neccessary, but keeps an Xserver that
leaks memory from becoming bloated over time, since the server will
be restarted after every session.

The queried host may also be the localhost (although it is often
better to still use its normal hostname instead of "localhost"),
if that is also running xdm. Said xdm needs to have the line in
its Xservers config file commented out, which would start the
Xserver. It then looks something like this:

  # :0 local /usr/X11R6/bin/X

Having init start the Xserver works fine at least on Amiga, Sparc, i386
and hp300; it should also work on mac68k. Only on hpcmips I haven't
found a way around having to start it manually from the console.

I hope I made some sense,
good luck

> 
> Frederick
> 

-- 
Bernd Sieker

NetBSD: When Linux ports to that platform, they will discover -
        WE HAVE ALWAYS BEEN HERE
		-- David Maxwell