Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!yale!engelson-sean From: engelson-sean@CS.YALE.EDU (Sean Philip Engelson) Newsgroups: comp.windows.x Subject: Xlock bug and fix Message-ID: <73158@yale-celray.yale.UUCP> Date: 20 Sep 89 18:12:34 GMT Sender: root@yale.UUCP Organization: Yale University, New Haven, CT Lines: 34 The new version of xlock has a bug in that it won't lock a screen if the display given isn't of the form unix:N.n or localhost:N.n, but if you're display is :N.n, it refuses, even though it should go ahead. A simple fix is to use gethostname, here's a diff for xlock.c: ---------------------------------------------------------------------- 592a593 > char hostname[30]; 593a595 > gethostname(hostname,30); 599c601,602 < && strncmp(display, "localhost", n)) --- > && strncmp(display, "localhost", n) > && strncmp(display, hostname, n)) ---------------------------------------------------------------------- Enjoy! ---------------------------------------------------------------------- Sean Philip Engelson, Poet Errant Make your learning a fixture; Yale Department of Computer Science Say little and do much; Box 2158 Yale Station And receive everyone with New Haven, CT 06520 a kindly attitude. ---------------------------------------------------------------------- Esperanto: la metodo por krei paca mondo. ---------------------------------------------------------------------- I see the eigenvalue in thine eye, I hear the tender tensor in thy sigh. Bernoulli would have been content to die Had he but known such a^2 cos 2(phi)! --Stanislaw Lem, "Cyberiad"