[comp.sys.3b1] a good mgr hack!!!!!!

dt@yenta.alb.nm.us (David B. Thomas) (03/29/91)

This is great!!  Kids, try this at home!

I now have my system set up so that mgr runs from init, and when you draw
yourself a window, you get a login prompt!  Not only that, I don't load
the window driver at all any more (yea!) and at login, the terminal
characteristics are set up automatically for the window you drew!

To do this, I made a shell script called start_mgr, which I call from
inittab:
 mgr:23:respawn:/usr/mgr/bin/start_mgr < /dev/console > /dev/console 2>&1

It contains roughly:
	SHELL=/bin/login
	export SHELL
	echo "press return to start mgr"
	read x
	exec mgr

The reason for the "press return" part is because the initial "star trek"
screen is a real CPU hog, and if the system starts up unattended, you don't
want that fancy thing flashing all day long.

Next I plan to hack mgr so that either the startrek screen times out or
better yet doesn't show up, or even get compiled in, and I'd also like
to hack in an automatic screen blanker.  Also, I'm gonna remove "lock"
(which I don't use or like), and "suspend" (which doesn't really make sense
in this new context) from the quit menu.

This makes daemons a lot nicer, too.  You write your daemons so that they
create a subwindow and fork off to live in it.  No separate login, and no
extra utmp entry that way.  The only catch is that if you destroy
your main login window, all your daemons go bye bye too, but that's sane
behavior, anyway.

I just barely got this thing to work a few minutes ago, but when I get it
all nice and figured out, I'll surely post all the goodies you need to
set up your system this way.  It's really nice!

Plus I plan to write a special "mgr getty" login program, that will make
a pretty
	login: (box here)
	password: (box here)
screen, just like some other fancy windowing packages do!

					little david
					will be up all night!
-- 
Bottom of stack = 0x40000
Stack pointer   = 0x3fffe
Don't push it!

ignatz@chinet.chi.il.us (Dave Ihnat) (03/31/91)

In article <1991Mar29.063707.309@yenta.alb.nm.us> dt@yenta.alb.nm.us (David B. Thomas) writes:
>This is great!!  Kids, try this at home!
>
	... misc. elided ...

>To do this, I made a shell script called start_mgr, which I call from
>inittab:
> mgr:23:respawn:/usr/mgr/bin/start_mgr < /dev/console > /dev/console 2>&1
>
>It contains roughly:
>	SHELL=/bin/login
>	export SHELL
>	echo "press return to start mgr"
>	read x
>	exec mgr
>
>The reason for the "press return" part is because the initial "star trek"
>screen is a real CPU hog, and if the system starts up unattended, you don't
>want that fancy thing flashing all day long.

Er...excuse me...but if it's unattended, then...like...who's going to press
return?

michael@maui.cs.ucla.edu (michael gersten) (04/06/91)

In article <1991Mar31.062005.12833@chinet.chi.il.us> ignatz@chinet.chi.il.us (Dave Ihnat) writes:
>In article <1991Mar29.063707.309@yenta.alb.nm.us> dt@yenta.alb.nm.us (David B. Thomas) writes:
>>The reason for the "press return" part is because the initial "star trek"
>>screen is a real CPU hog, and if the system starts up unattended, you don't
>>want that fancy thing flashing all day long.
>
>Er...excuse me...but if it's unattended, then...like...who's going to press
>return?

Probably no one. But you don't want a CPU hog runnig if you have external
modems and dial in users.

		Michael