[comp.sys.next] loginwindow LoginHook

kelley@kiwi (Kelley Wittmeyer) (05/10/91)

has anyone ever tried to run a script via

% dwrite loginwindow LoginHook scriptfile

?

has it worked???

kelley wittmeyer
dept of atmospheric science
colorado state university

abe@mace.cc.purdue.edu (Vic Abell) (05/10/91)

In article <14824@ccncsu.ColoState.EDU> kelley@kiwi (Kelley Wittmeyer) writes:
>has anyone ever tried to run a script via
>% dwrite loginwindow LoginHook scriptfile

Yes, scripts can be run via both the loginwindow LoginHook and the
LogoutHook.  What is slightly confusing is that the hook paths must
be written to root's defaults file and loginwindow must be restarted
after the defaults are updated.  You can do that by rebooting.  It
has also been reported that logging in as "console" and then logging
out will also cause loginwindow to see the new hooks, but I haven't
verified that.

I use loginwindow hooks to completely darken my screen when I log out
and rebrighten it when I log in.

izumi@mindseye.berkeley.edu (Izumi Ohzawa) (05/10/91)

In article <7431@mace.cc.purdue.edu> abe@mace.cc.purdue.edu (Vic Abell) writes:
>In article <14824@ccncsu.ColoState.EDU> kelley@kiwi (Kelley Wittmeyer) writes:
>>has anyone ever tried to run a script via
>>% dwrite loginwindow LoginHook scriptfile
>
>Yes, scripts can be run via both the loginwindow LoginHook and the
>LogoutHook.  What is slightly confusing is that the hook paths must
>be written to root's defaults file and loginwindow must be restarted
>after the defaults are updated.  You can do that by rebooting.  It
>has also been reported that logging in as "console" and then logging
>out will also cause loginwindow to see the new hooks, but I haven't
>verified that.

Or you can type "exit" to username, and no password.

By the way, LoginHook is broken on 2.0.  It is fixed in 2.1.


Izumi Ohzawa             [ $@Bg_78^=;(J ]
USMail: University of California, 360 Minor Hall, Berkeley, CA 94720
Telephone: (415) 642-6440             Fax:  (415) 642-3323
Internet: izumi@violet.berkeley.edu   NeXTmail: izumi@pinoko.berkeley.edu 

abe@mace.cc.purdue.edu (Vic Abell) (05/10/91)

In article <1991May10.143527.27890@agate.berkeley.edu> izumi@mindseye.berkeley.edu (Izumi Ohzawa) writes:
>By the way, LoginHook is broken on 2.0.  It is fixed in 2.1.

Please be more explicit.  I am currently using a script via LoginHook
under 2.0 and it works correctly for me.  Exactly what is broken?

izumi@mindseye.berkeley.edu (Izumi Ohzawa) (05/11/91)

In article <7432@mace.cc.purdue.edu> abe@mace.cc.purdue.edu (Vic Abell) writes:
>In article <1991May10.143527.27890@agate.berkeley.edu> izumi@mindseye.berkeley.edu (Izumi Ohzawa) writes:
>>By the way, LoginHook is broken on 2.0.  It is fixed in 2.1.
>
>Please be more explicit.  I am currently using a script via LoginHook
>under 2.0 and it works correctly for me.  Exactly what is broken?

Hmm... If it works for you, that's great.
The problem I had was that specifying LoginHook broke something
in lowinwindow or Windowserver so that the next user who tries
to login get kicked out of login process and put immediately
back to loginwindow.
I had this problem using MOTD as LoginHook program.

This situation required restarting windowserver by typing
"exit" every time you login.

As I said, this is now fixed in 2.1.

NeXT's announcement for Software Release 2.1 also mentions
of fix to LoginHook, although it doesn't say specifically
what the broken behavior was.


Izumi Ohzawa             [ $@Bg_78^=;(J ]
USMail: University of California, 360 Minor Hall, Berkeley, CA 94720
Telephone: (415) 642-6440             Fax:  (415) 642-3323
Internet: izumi@violet.berkeley.edu   NeXTmail: izumi@pinoko.berkeley.edu 

faught@berserk.ssc.gov (Ed Faught) (05/11/91)

In article <14824@ccncsu.ColoState.EDU> kelley@kiwi (Kelley Wittmeyer) writes:
> has anyone ever tried to run a script via
> 
> % dwrite loginwindow LoginHook scriptfile
> 
> ?
> 
> has it worked???
> 
> kelley wittmeyer
> dept of atmospheric science
> colorado state university

Yes, it works fine. The root user must do the dwrite since loginwindow is run
by root. The default shell is sh.