Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc!garcon!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.next Subject: Re: csh & the NeXTs Message-ID: <451@garcon.cso.uiuc.edu> Date: 16 Feb 89 22:47:41 GMT References: <17953@vax5.CIT.CORNELL.EDU> <1889@csun.edu> Sender: news@garcon.cso.uiuc.edu Reply-To: dorner@pequod.cso.uiuc.edu (Steve Dorner) Distribution: na Organization: University of Illinois at Urbana-Champaign Lines: 31 Another interesting thing to do is write a program of the form: main() { if (!fork()) execl("/bootdisk/NeXT/Apps/Workspace","-LoginProgram","YES",0); else { wait(&junk); } } You then use dwrite to tell the login process you want to run this instead of Workspace when you log in to the console: dwrite loginwindow Workspace /usr/local/bin/foo Now, you get control BEFORE and AFTER the Workspace runs. I use a program of this type on our public access machines, to reset the files in the guest account to a friendly state (all the right things on the dock, etc.). There is also a "LoginHook" switch you can add to the console entry in /etc/ttys to give control before the Workspace is run; this one I haven't yet tried. -- Steve Dorner, U of Illinois Computing Services Office Internet: dorner@garcon.cso.uiuc.edu UUCP: {convex,uunet}!uiucuxc!dorner IfUMust: (217) 244-1765