[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: last, lastlog, and desktop sessions



Joel Rees wrote:
> Joel Rees wrote:
> > I've never been clear about the last command. My memory is that it
> > recorded logins to the desktop as well as to ttyn devices.

To be pedantic the "last" command isn't recording anything.  It is
only reporting what has already been recorded.

> > Today, I'm checking my logs, and I don't see any record of logins
> > to the desktop unless the user also started a shell in a virtual
> > terminal.

That would be due to your xdm, gdm, gdm3, lightdm, kdm or other
graphical login manager.  It is responsible for recording desktop
logins.  Some do.  Some do not.  If they don't then I think that is a
bug.  But people who know about last and logins are becoming fewer
every day and so this part of the system has atrophied.

> > Has this changed recently? I'm I imagining things? Is there some setting
> > that changes this, that might have changed when I upgraded from squeeze to
> > wheezy?

Try different graphical login managers and compare them.

> Okay, I finally decided to log out of my X11 session on my netbook (Fedora)
> and found that my memory was wrong.
>
> last does not report logins to X11 desktop sessions.

What graphical login manager are you using?  As I recall lightdm for
example does not record this information.  I am pretty sure I saw that
there was a bug report on it.  Ah...  Here it is:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648604

What terminal emulator are you using?  Xterm records this
information.  But I assume that like the desktop managers that some
terminal emulators have fallen out of recording it.  Plus many people
today log into a system and never start a terminal emulator, doing
everything they want to do through other graphical applications.  If a
user only starts a web browser, file manager, office applications,
then there won't be any terminal emulators started.

> Is there a command that does? I've been looking around the web, but so far
> google just tells me that X11 has an error log, which I know about.

What you are asking for is not possible.  If the login manager does
not record the information then that information is not recorded.

> auth.log has the information, but it's mixed with a bunch of other stuff.

Right.

> lightdm/lightdm.log seems to have the information, too, but the time shown
> looks to be time from boot. I could write a script to extract just the
> login lines from auth.log, but I want to think someone has already done it.
> I mean, sure, grep sort of does the job:

I assume you are running Stable?  If you want this functionality then
I suggest trying a different login manager until a fixed version of
lightdm appears.  I do like lightdm.  You could look to see if there
is a backport to Stable.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: