MGR and getting it going...

David B. Thomas dt at
Fri Mar 29 06:58:24 AEST 1991

Brent Burton seems to have run into the broken /dev/console problems I posted
a couple of times before.

n138ct at (Brent Burton) writes:

> con:2:respawn:/etc/getty console 9600

This looks absolutely correct, assuming you wish to stop using the
window driver.  I tried to do this, and had the same problem you had.
More on this later.

>The difference is that I've eliminated the getty processes from tty000
>and from ph0.

Right -- and from /dev/window, I assume.

>Nothing appears on the screen, but when you type something, rectangular boxes
>made up of asterisks move up the screen with text in hot pursuit -- the text
>a text-based UA running.  When I press the Exit key, it goes away and
>the next "echo" trace statement in my /etc/rc file is printed.

The programs wmgr, smgr, ph, and even "message", which is used extensively
in the stock /etc/rc, are all window applications and expect to use the window
driver.  "message" can with with any ua-able terminal, but probably not on
/dev/console.  The others certainly can't work right unless the window driver
has been loaded.

Are you still loading the window driver?  The beginning of /etc/rc normally
loads it, then execs itself with all i/o connected to /dev/window.

What I wanted to do is take that completely out, and just log on to
/dev/console and start mgr.

I think if you change the "message" commands to "echo" instead, and take out
smgr, wmgr, and ph (you can instead use cron & update .. see the sample /etc/rc
script provided with mgr), you should be able to get a normal bootup and a
login prompt, and then not be able to log in!!

>Next, after /etc/rc finishes, the normal welcome and login messages appear.
>However, the next trick is logging in.  At login: I enter 'root' but no
>matter which login I use, it immediately returns with "login incorrect."
>Is it not reading the passwd file or what?

Aha!  This is EXACTLY the problem I have had.  And I was positively unable to
get past this point.  By the way, there was probably no text cursor on the
console either, right?

My theory is that access to /dev/tty is broken for /dev/console.  In other
words, if you are on /dev/console, and you try to open "/dev/tty", it doesn't
work.  The login program calls getpass(3) to get your password.  Notice that
it isn't even prompting for a password!  I know that getpass() opens /dev/tty
first thing.  I think that open is failing, and getpass is returning a NULL,
but login can't do anything about it anyway, so it just says "login incorrect"
and tries again.  [Hmm!  It would be interesting to see what happens if you
try an account that has no password at all.]

My "solution" was to go back to loading the window driver.  I still don't use
smgr, or wmgr, or ph, and I patched the window driver using the patcher supplied
with mgr to get the "working" icon to quit flashing.  It's not so bad, but
that's valuable memory that the window driver is using, and valuable time
wasted during bootup, considering that I never use the window driver at all,
except to be allowed to log onto the console at all.  Isn't that *special*?

>I'd like to get this vidpal emulater cranking so I could try out mgr.
>However, I'd like first to be able to boot my machine and not have the
>window driver load up.

You might not be able to do that!  But if you do get anywhere with it, please!
let me know!

interestingly, in the sample /etc/rc script provided (signed by Lenny T.)
it doesn't load the window driver (humorously, it echoes "not loading the
window driver" during bootup!).  I wonder if something in 3.51m is broken
so the console quit working, or what.

More information: if I log onto another terminal (with the window driver not
loaded), I can cat to /dev/console fine, and I can cat from /dev/console
just fine.  If I boot floppy unix (which uses /dev/console) and type
"cat /dev/tty", the whole system hangs.  Acually, I think the system is
fine, but the keyboard gets stuck and it's impossible to get out.  The eof
and intr characters do not work, and furthermore, cat does not echo what
I type, as it is supposed to.

So, I am using MGR and loving it, but I'm forced to load the window driver
against my will!

					little david
Bottom of stack = 0x40000
Stack pointer   = 0x3fffe
Don't push it!

More information about the Comp.sys.3b1 mailing list