I'm running an up-to-date version of LinuxMint (an Ubuntu-fork), and I've noticed that who, w and last have all stopped registering activity on terminal-emulators (like xterm) - eg. if you open a terminal under X. The only thing registered, is that the WindowManager/DesktopEnviroment is runnung on a VirtualTerminal (eg. /dev/tty7 or /dev/tty8).

If I log-in to one of the VirtualTerminals on F1-F6 (/dev/tty1-6), that is registered. Also if I log-in with ssh in a terminal-emulator under X. Multiple "terminals" made with screen are also registered (even when used in a terminal-emulator under X)

But just opening a terminal-emulator (and running programs in it) are no longer noticed.

AFAIK, users currently logged-in are registered in /var/run/utmp, while previous log-ins (and boots) are logged in /var/log/wtmp - and these files are used by who, w and last.

So for some reason, opening a terminal-emulator in X is no-longer registered in these logs. While there are some sense in this (I'm not actually logging-in), I would much preferred that it was logged... not at least since I then could use w to see what I'm doing in various shells.

So is there a way to turn back on the logging of terminal-emulators? Preferably so that also how long they stayed open was also registered...

  • 1
    You tagged the question with xterm. I don't know what happens under xterm and how to re-enable utmp logging. In case you use gnome-terminal or other vte-based emulator, utmp logging has been removed from them, see bugzilla.gnome.org/show_bug.cgi?id=747046.
    – egmont
    Jun 5, 2017 at 12:53
  • @egmont Thanks for the suggestion. I tagged it xterm mostly because it is the "standard" terminal-emulator. Jun 5, 2017 at 14:18

1 Answer 1


UPDATED: Did some research.

The terminal emulator needs to be told to write a log entry into /var/log/utmp. With xterm, this is done by starting xterm with -ut or by setting the Xterm*utmpInhibit resource to false (which is the default).

This is different for gnome-terminal, obviously. In fact, it seems as if gnome-terminal is dropping utmp support completely: https://bugzilla.gnome.org/show_bug.cgi?id=747046

Summary of that bug report: Developers want to remove utmp support completely, and as far as I understand, they did (in 2015).

  • Nope. Login shell and interactive shell are independent concepts. And they have no relation to utmp logging either, since bash cannot do such logging. It's usually the terminal emulator that does utmp logging.
    – egmont
    Jun 5, 2017 at 12:51
  • So what else could explain this behavior? I also am very curious about this.
    – Chev_603
    Jul 11, 2017 at 0:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .