SUMMARY: Remote console problem

From: Martin Lichtin (
Date: Fri Oct 30 1992 - 15:51:14 CST

I received several messages, but only one could offer me a solution.
Many thanks to Harald Nordgard-Hansen (!

The solution is to change the Xsun server, so it accepts raw serial
devices for the keyboard and the mouse. Because we are still running
R4, I couldn't simply apply the below mentioned patches. Also, note
that the solution only works for type 4 keyboards, there's still an
open question at the end of Harald's message.
Obviously, it's also a bad idea to run 'xterm -C' :-)


Return-Path: <>
From: Harald Nordgard-Hansen <>
Date: Wed, 28 Oct 92 16:13:03 +0100
To: (Martin Lichtin)
Subject: Re: Remote console problem

  You will probably be glad to know that this can be done. But it is
rather non-standard.. But it works, I have it running on some machines
here in Trondheim... The stuff is as follows:

>From: Daniel Berglund <>
Message-Id: <>
Received: from vivace by id AA24854; Tue, 3 Dec 91 19:22:43 +0100
Received: by vivace id AA00782; Tue, 3 Dec 91 19:22:46 +0100
Subject: SUMMARY: ttya as console (without breaking X)
Date: Tue, 3 Dec 91 19:22:45 MET
X-Mailer: ELM [version 2.3 PL8]
Status: OR

(I don't know if my question ever made it to the sun-manager's mailing list,
but here's a summary anyway)

Some time ago, I asked:
>Is it possible to use /dev/ttya as console on a Sparcstation 1 (4.1.1) without
>making the framebuffer, keyboard and mouse unusable?

>We changed "input-device" and "output-device" to "ttya" in the PROM monitor
>but after reboot, accesses to /dev/kbd, /dev/mouse, and /dev/fb resulted
>in "No such device or address".

I got a few responses, ranging from "yes" to "no". The correct answer turned
out to be YES, it can be done. The solution, however, is not a standard,
supported one, but that's life.

Thanks to Gijs Mos, Kevin N. Hayes, Malcolm Caldwell, David DiGiacomo, and
Peter Lamb!

Proceed as follows:
1) Make new special files corresponding to the "raw" keyboard and mouse:
   mknod /dev/zs2 c 12 2 # The keyboard
   mknod /dev/zs3 c 12 3 # The mouse

   These are just serial ports and will need some "special treatment"
   in order to behave as /dev/kbd and /dev/mouse.

2) Shutdown your machine and tell the monitor to
   setenv input-device ttya # Or perhaps ttyb
   setenv output-device ttya

   You can also use eeprom(8S).

3) Reset and reboot. /dev/fb, /dev/kbd and /dev/mouse are now useless.
   In my case, /dev/bwtwo0 works as a substitute for /dev/fb.
   Also /dev/ttya (ttyb) is useless - if you have an entry in ttytab
   for it, comment it out.

4) If you want to run

   Sunview: start with "-dev /dev/bwtwo0 -k /dev/zs2 -m /dev/zs3"

   MIT X: patch the server to accept flags for non-default mouse and keyboard
          devices. If you don't want to hack the R5 source yourself, you can
          get patches by anonymous ftp from
          ( in
          /pub/MITXservernonstandarddevicepatches.tar.Z. NOTE: these
          are somewhat Q&D and assume you have a TYPE-4 keyboard!
          Sorry for that - see below.

          Start your new server with
            "-dev /dev/bwtwo0 -mousedev /dev/zs3 -kbddev /dev/zs2"

   Openwindows: what? Ohh! :) You will have to
          setenv MOUSE /dev/zs3
          setenv KEYBOARD /dev/zs2
          and tweak /usr/openwin/etc/NeWS/ a little.
          If you have a type-4 keyboard, replace
            /Default {
            /Default {
                (NeWS/ LoadFile
          the file name depending on your hardware, nationality and personal
          No warranties!

And now for a new question: Tha man page kbd(4S) states that /dev/kbd
is, essentially, a serial port with the "kb" and "ttcompat" stream
modules pushed onto it. But if I open /dev/zs2 (mknode:d as above and
with {in|out}put-device directed to ttya), push ttcompat and kb onto
it, a KIOCTYPE ioctl will return -1 (type unknown) instead of the
expected KB_SUN4. Why? All other KIOCxxxs work perfectly well. - As
you might have guessed, that's why the abovementioned patches assume a
type-4 keyboard. Mildly irritating.

Daniel Berglund                           
Chalmers Univ. of Technology, G|teborg, Sweden

----- End Included Message -----

-Harald -- Harald Nordg{\aa}rd-Hansen, ## Phone: +47 759 4108 ## Fax: +47 759 4080 Laboratory of Chemical Engineering, ###### Email: N-7034 Trondheim-NTH, ## If there's anything good that happens in life; NORWAY ################# It's from Jesus. (Amy Grant: Hope Set High)

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:51 CDT