bsy@PLAY.MACH.CS.CMU.EDU (Bennet Yee) (07/06/88)
This is a request for comment. First, some background: Here at CMU, we used X10 xterms which did not have the privilege to write to /etc/utmp. This meant that when you finger'd a person at his/her workstation, s/he would show up as idle from the time when they first fired up X. By (mis)using the .Xactive hack for the screensaver in X10, I threw together a simple program called ``thumb'' which examined people's .Xactive files via our RFS to tell the actual idle time. This is actually better than having privileged xterms and looking at /etc/utmp in that you didn't have to sort through 10 different entries for the same person and you won't be fooled if the user was using an X-only application (e.g. gnu-emacs, xconq :-). Perhaps tangentially, having the idle time available allowed me to automate (by a simple hack to the screensaver) the starting and stopping of a long-running cycle-mop that I used to find very large probabilistic primes -- I'd just kill -STOP or -CONT whenever the screen was restored/saved. [It was niced, but I decided to be heavy handed.] With X11, we have a similar problem with providing the idle time information. The screensaving action is built into the server. The two obvious choices are to (1) modify the server and provide via the extension mechanism a simple idle-time query, and (2) modify the server to also listen to an alternative port on which idle-time information is given out. In either case, the server can perhaps (also) be made to provide asynchronous indications whenever screensaving changes state (asynch indication instead of polling). The first approach is more elegant in that it would use the standard extension mechanisms, but has the problem that the idle time status information would be protected via the standard access control mechanism, which does not seem desirable: before X, people from across the country (if they're on the internet) can find out my idle time, why shouldn't they be able to now? Should we use the authentication hooks to enable idle-time-only connections? Providing screen_blanked and screen_exposed events would be a simple extension. The second seems to be easier to hack in, but is gross. It has the ``advantage'', though, in that it does not perturb the protocol and requires no modifications to Xlib. It is an orthogonal change. Why am I posting this? I feel that this is a general mechanism that others may want. After all, xterm's utmp is not really sufficient anyway -- pty times does not really give idle time: I may be using an X-only application. I would like this mechanism to become standardized so that you can ``thumb'' me and I can ``thumb'' you. Opinions? Other alternative approaches? -bsy -- Arpa: bsy@cs.cmu.edu Bitnet: bsy%cs.cmu.edu%smtp@interbit CSnet: bsy%cs.cmu.edu@relay.cs.net Uucp: ...!seismo!cs.cmu.edu!bsy USPS: Bennet Yee, CS Dept, CMU, Pittsburgh, PA 15213-3890 Voice: (412) 268-7571 -- Arpa: bsy@cs.cmu.edu Bitnet: bsy%cs.cmu.edu%smtp@interbit CSnet: bsy%cs.cmu.edu@relay.cs.net Uucp: ...!seismo!cs.cmu.edu!bsy USPS: Bennet Yee, CS Dept, CMU, Pittsburgh, PA 15213-3890 Voice: (412) 268-7571