Folks, This is philosophical rather than practical, but I'm struggling with it and I would appreciate your view.
I normally use startx for logging in X, because that gives me enough flexibility (much more than XDM, 'cause I can open as much servers as needed *when* they are actually needed) not requiring, at the same time, the use of *kit stuff (on my primary laptop I use CDM - https://github.com/ghost1227/cdm - but it doesn't really matter). Of course, X sessions are not logged into the utmp/wtmp DBs like it happens using XDM. Even if I could live without that, I would prefer to avoid any inconsistencies and, of course, who/w/last commands could be useful for multi-user systems administration. So I'm trying to recover their functionality. XDM has its own mechanism in /etc/X11/xdm/{Xstartup,Xreset} to log the details using sessreg, but since startx is run as normal user, it isn't reusable within my scope. There are a very few info on the matter (see e.g. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466104, closed as WONTFIX) so it seems I'm alone... I tried a bunch of WAs in order to be able to use the sessreg command within ~/.xinitrc: 1) setuid /usr/bin/sessreg: possibly multiple security holes; 2) use sudo: I really don't understand why, but that doesn't work; I mean, the output from who/w is different w.r.t. the expected one (there is no line related to the active X session, even if the reported number of users seems ok); 3) adding users to utmp group (which is equivalent to open /var/run/utmp and /var/log/wtmp in writing to all); this is my "favorite hack" at the moment, but I feel it is still suboptimal. Any hints? Other strategies adopted? Suggestions related to point 2)? I'm looking forward to hearing from gurus! Thanks for your time -- Alessandro DE LAURENZIS [mailto:just22....@gmail.com] LinkedIn: http://it.linkedin.com/in/delaurenzis