Bug 12767 - XDM does not write wtmp entries (patches for TakeConsole and GiveConsole)
Bug#: 12767 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: x11@gentoo.org Reported By: agenkin@gentoo.org
Component: Applications
URL: 
Summary: XDM does not write wtmp entries (patches for TakeConsole and GiveConsole)
Keywords:  
Status Whiteboard: 
Opened: 2002-12-27 00:25 0000
Description:   Opened: 2002-12-27 00:25 0000
Gentoo's XDM does not create wtmp or utmp entries for X console logins.  The
below patches to /etc/X11/xdm/GiveConsole and /etc/X11/xdm/TakeConsole fix this.

--- /tmp/GiveConsole	2002-12-27 00:39:32.000000000 -0500
+++ GiveConsole	2002-12-27 00:38:44.000000000 -0500
@@ -8,3 +8,5 @@
 # causing serious grief.
 #
 chown $USER /dev/console
+/usr/X11R6/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
+        -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER

--- /tmp/TakeConsole	2002-12-27 00:39:32.000000000 -0500
+++ TakeConsole	2002-12-27 00:37:47.000000000 -0500
@@ -5,3 +5,5 @@
 #
 chmod 622 /dev/console
 chown root /dev/console
+/usr/X11R6/bin/sessreg -d -w "/var/log/wtmp" -u "/var/run/utmp" \
+	-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER

------- Comment #1 From Martin Schlemmer (RETIRED) 2002-12-27 12:32:06 0000 -------
Supposidly this is done in /etc/X11/gdm/PreSession/Default
and /etc/X11/gdm/PostSession/Default.

------- Comment #2 From Arcady Genkin (RETIRED) 2002-12-27 12:58:17 0000 -------
I use the vanilla xdm here (not gdm), and the wtmp entries are definitely not
written.

------- Comment #3 From Martin Schlemmer (RETIRED) 2002-12-27 13:07:54 0000 -------
Err, yes, sorry .. long night :/  Ill have a look.  Seems that for 4.2.99 and
later at least they started adding support for utemper, so for that it should
be fine if/when we get utemper in portage (if not already).

------- Comment #4 From Martin Schlemmer (RETIRED) 2003-01-19 08:32:39 0000 -------
Ill add this post 1.4.

------- Comment #5 From Donnie Berkholz 2004-03-14 01:00:35 0000 -------
Az seems busy. =)

------- Comment #6 From Jakub Moc (RETIRED) 2005-08-11 04:24:57 0000 -------
Is this still even remotely relevant after 2 1/2 years?!

------- Comment #7 From Donnie Berkholz 2006-03-31 19:13:43 0000 -------
Yes, it remains relevant.

------- Comment #8 From Donnie Berkholz 2006-04-19 23:35:14 0000 -------
Fixed (finally) in xdm-1.0.3-r1, thanks!