Path: utzoo!attcan!uunet!mcsun!hp4nl!eutrc3!eutws1!wsinpdb From: wsinpdb@eutws1.win.tue.nl (Paul de Bra) Newsgroups: comp.unix.i386 Subject: Re: Locking Virtual Terminals Keywords: Lock Message-ID: <1488@eutrc3.urc.tue.nl> Date: 13 Feb 90 09:27:25 GMT References: <7889@cbnewsh.ATT.COM> <8030@cbnewsh.ATT.COM> Sender: news@eutrc3.urc.tue.nl Organization: Eindhoven University of Technology, The Netherlands Lines: 24 In article <8030@cbnewsh.ATT.COM> gkm@cbnewsh.ATT.COM (gary.k.mc nees,ho,) writes: >I have a locking program which will lock any particular virtual terminal. >However, all one has to do to get in is to key to another vt which is not >locked. Its too much to lock all of them. Does anyone know how to securly >lock the PC when the vtlmgr is running? Is there a way to keep the ALT >key from being recognized? Any ideas? Has anyone written a program to lock >one terminal when one has several terminals running and prevent access to >other terminals? The key to the solution is in kd(7). One can set the vt-mode so the switching between vt's is disabled. Try something like: vtmode.mode = VT_PROCESS; vtmode.waitv = 1; vtmode.relsig = SIGUSR1; vtmode.acqsig = SIGUSR1; vtmode.frsig = SIGUSR2; if (ioctl(egafd, VT_SETMODE, &vtmode) < 0) fprintf(stderr,"Warning, cannot set VT mode\n"); signal(SIGUSR1, donothing); ... Paul. (debra@research.att.com)