Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!snorkelwacker!bloom-beacon!ncd.COM!dimick From: dimick@ncd.COM (Kim Dimick) Newsgroups: comp.windows.x Subject: Re: locking X terminals Message-ID: <9009201527.AA03324@bryant.com> Date: 20 Sep 90 15:27:47 GMT References: <13077@june.cs.washington.edu> Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 94 >xlock doesn't work on my NCD 16 and 17c X terminals. Is this because > 1) I need to give some arguments to xlock. > 2) The server software from NCD doesn't support locking the screen. > 3) I need something other than xlock. > 4) It's infeasible with X11R4. > 5) You tell me. > I think you are running in to a difference between running xlock on a work station where a xhost list is save locally and running it on a X Display Station that obtains its xhost list from a remote host via a remote configuration file. The main problem is xlock does the equivalent to a xhost - and once the xhost - is performed the X Display Station that does not keep it xhost list locally will not be able to perform the xhost + when the user tries to return to their work. So the X Display Station will not accept any more connections and the user will get a error similar to this 'Client is not authorized to connect to Server'. I have made some changes to the X11R4 xlock source so it will work correctly on the NCDs and other X Display Station. I have attached the diffs'. ------------------Imakefile differences---------------------- 19c19 < CDEBUGFLAGS = -O -DNDS --- > CDEBUGFLAGS = -g ----------------------xlock.c differences--------------------- 179,180c179 < /* #define DEFAULT_FONTNAME "LucidaSans-24" */ < #define DEFAULT_FONTNAME "*-courier-bold-r-normal--14-*" --- > #define DEFAULT_FONTNAME "LucidaSans-24" 228c227 < /*void*/ --- > void 232d230 < #ifndef NDS 234,236c232,233 < /* XRemoveHosts(dsp, XHosts, HostAccessCount);*/ < /* XEnableAccessControl(dsp);*/ < #endif --- > XRemoveHosts(dsp, XHosts, HostAccessCount); > XEnableAccessControl(dsp); 239c236 < /*void*/ --- > void 243d239 < #ifndef NDS 248d243 < #endif 252c247 < /*void*/ --- > void 285d279 < XSetScreenSaver(dsp, timeout, interval, blanking, exposures); 613d606 < #ifndef NDS 622d614 < #endif 753c745 < /* XSetScreenSaver(dsp, 0, 0, 0, 0);*/ /* disable screen saver */ --- > XSetScreenSaver(dsp, 0, 0, 0, 0); /* disable screen saver */ 757c749 < /* XGrabHosts(dsp);*/ --- > XGrabHosts(dsp); --------------------life.c differences--------------------- 433d432 < /* 435,436d433 < */ < sleep(delay * 1000);