← Back to team overview

desktop-packages team mailing list archive

[Bug 870297] Re: Lightdm logins not being logged in wtmp

 

Ok, some pointers in case that's useful, gdm has code in gdm-session-
record.c

void
gdm_session_record_login (GPid                  session_pid,
...
        /* Handle wtmp */
        g_debug ("Writing wtmp session record to " GDM_NEW_SESSION_RECORDS_FILE);
#if defined(HAVE_UPDWTMPX)
        updwtmpx (GDM_NEW_SESSION_RECORDS_FILE, &session_record);
#elif defined(HAVE_UPDWTMP)
        updwtmp (GDM_NEW_SESSION_RECORDS_FILE, &session_record);
#elif defined(HAVE_LOGWTMP) && defined(HAVE_UT_UT_HOST)
#if defined(HAVE_UT_UT_USER)
        logwtmp (session_record.ut_line, session_record.ut_user, session_record.ut_host);
#elif defined(HAVE_UT_UT_NAME)
        logwtmp (session_record.ut_line, session_record.ut_name, session_record.ut_host);
#endif
#endif

        /*
         * Handle utmp
         * Update if entry already exists
         */
#if defined(HAVE_GETUTXENT)
        setutxent ();

        while ((u = getutxent ()) != NULL) {
                if (u->ut_type == USER_PROCESS &&
                    (session_record.ut_line != NULL &&
                     (strncmp (u->ut_line, session_record.ut_line,
                               sizeof (u->ut_line)) == 0 ||
                      u->ut_pid == session_record.ut_pid))) {
                        g_debug ("Updating existing utmp record");
                        pututxline (&session_record);
                        break;
                }
        }
        endutxent ();

        /* Add new entry if update did not work */
        if (u == NULL) {
                g_debug ("Adding new utmp record");
                pututxline (&session_record);
        }
#elif defined(HAVE_LOGIN)
	login (&session_record);
#endif
}
..."

So it seems it's somewhat that is not integrated with the system stack
but that lightdm should be doing by itself on login

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/870297

Title:
  Lightdm logins not being logged in wtmp

Status in Light Display Manager:
  Confirmed
Status in “lightdm” package in Ubuntu:
  Confirmed
Status in “lightdm” source package in Oneiric:
  Confirmed
Status in “lightdm” source package in Precise:
  Confirmed

Bug description:
  When logged into a graphical session, I get no acknowledgement from
  who, w or last that I am logged in:

  $ who
  $ w
  16:48:14 up 1 day,  1:08,  0 users,  load average: 0.68, 0.83, 0.84
  USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

  last only reports tty logins, not graphical logins.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: lightdm 1.0.1-0ubuntu6
  ProcVersionSignature: Ubuntu 3.0.0-12.19-generic-pae 3.0.4
  Uname: Linux 3.0.0-12-generic-pae i686
  NonfreeKernelModules: fglrx
  ApportVersion: 1.23-0ubuntu2
  Architecture: i386
  Date: Fri Oct  7 16:47:23 2011
  InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110921.3)
  ProcEnviron:
   LANGUAGE=en_CA:en
   PATH=(custom, user)
   LANG=en_CA.UTF-8
   SHELL=/bin/bash
  SourcePackage: lightdm
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/lightdm/+bug/870297/+subscriptions