I have Ubuntu 11.10 installed on a laptop shared by multiple members of our family. When I execute the 'w' or 'who' command from a command line, I only see my account even though there are three users logged in.

The funny thing is, I get different results when the command is executed from each of the different accounts on the machine. When I execute the same command from my kid's account, I see mine and the kids accounts listed. When I execute it from my wife's account, I see all three accounts: her account, my account, and the kids account.

All three accounts are actively logged in, and I'm just switching between accounts and executing the same command. Why the different results? Sorry if this is simple straightforward answer. I searched and couldn't find anything.

Not sure if it matters, but I'm the only administrator on the laptop.


Desktop users won't normally show up in who because LightDM doesn't record your desktop login in utmp (see https://bugs.launchpad.net/lightdm/+bug/871070).

I wonder if, while you're testing this, you're leaving your terminal windows open:

  1. You open an xterm and run who from your own account. You're the only user with a terminal, so it only lists you. The other accounts might be running sessions in the background, but they don't get listed because LightDM didn't record their login.
  2. You leave the xterm open on your own account, switch to the kid's account, open an xterm there, and run who. Your account is still listed because it's connected to the xterm that you left running.
  3. You leave that xterm open on your kid's account, switch to your wife's account, open another xterm and run who. Now all three accounts have terminals open, so who lists all of them.
  • cscarney, you are absolutely correct. That's exactly what I was doing. I started with my account, executed the "who" command from the terminal, left the session and terminal open as you described and switched to each subsequent user. As I went along, the users listed with the "who" command were the users with the terminal window still open in the session. That explains why I was getting different users with each test, it was dependent on which user still had the terminal window open. I didn't realize this was a bug already logged in lightdm. Thanks for the response. – BubbaJ Nov 5 '11 at 0:09
  • Is there any way to see desktop login history? – wisbucky Dec 4 '19 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.