SESSREG(1)

๐Ÿ’… SESSREG โ€” bestie's guide to utmpx/wtmpx wrangling

okay so real talk: this is the sessreg page from X Version 11, and honestly? she's lowkey a legend. let's get into it ๐Ÿ’–


โœจ NAME โœจ

sessreg โ€” manages utmpx/wtmpx entries for non-init clients ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

sessreg [-w wtmpx-file] [-u utmpx-file] [-L lastlog-file]
    [-l line-name] [-h host-name] [-s slot-number]
    [-x Xservers-file] [-t ttys-file] [-V] [-a] [-d] user-name

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Sessreg is a simple lil program for managing utmpx/wtmpx and lastlog entries for xdm sessions. she's not doing the most, she's just doing her job โœจ

This version of sessreg is built using the modern POSIX pututxline(3c) interfaces, which no longer require the slot-number, ttys-file, or Xservers-file mappings. so likeโ€ฆ the mapping era is over, we've moved on ๐Ÿ’… For compatibility with older versions and other operating systems, the -s, -t, and -x flags are accepted, but ignored. yes bestie, they're still in the group chat, they just don't say anything ๐Ÿ™ˆ


๐ŸŽ€ USAGE ๐ŸŽ€

In Xstartup, place a call like:

sessreg -a -l $DISPLAY -x /etc/X11/xdm/Xservers $USER

and in Xreset:

sessreg -d -l $DISPLAY -x /etc/X11/xdm/Xservers $USER

like, that's it. that's the whole ritual ๐Ÿ•ฏ๏ธโœจ


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -w wtmpx-file โ€” this specifies an alternate wtmpx file, instead of /var/log/wtmp. the special name "none" disables writing records to the wtmpx file. (yes, literally the word "none", no cap)
  • -u utmpx-file โ€” this specifies an alternate utmpx file, instead of /var/run/utmp. the special name "none" disables writing records to the utmpx file.
  • -L lastlog-file โ€” this specifies an alternate lastlog file, instead of /var/log/lastlog, if the platform supports lastlog files. the special name "none" disables writing records to the lastlog file. platform-dependent queen ๐Ÿซถ
  • -l line-name โ€” this describes the "line" name of the entry. for terminal sessions, this is the final pathname segment of the terminal device filename (e.g. ttyd0). for X sessions, it should probably be the local display name given to the users session (e.g. :0). if none is specified, the terminal name will be determined with ttyname(3) and stripped of leading components. she'll figure it out herself, she's resourceful ๐Ÿ’…
  • -h host-name โ€” this is set to indicate that the session was initiated from a remote host. in typical xdm usage, this options is not used. (remote vibes only when you actually need them ๐ŸŒˆ)
  • -s slot-number โ€” this option is accepted for compatibility, but does nothing in this version of sessreg. ghost flag ๐Ÿ’€
  • -x Xservers-file โ€” this option is accepted for compatibility, but does nothing in this version of sessreg. also a ghost ๐Ÿ‘ป
  • -t ttys-file โ€” this option is accepted for compatibility, but does nothing in this version of sessreg. ghost #3, she's still invited tho ๐ŸŽ€
  • -V, --version โ€” this option causes the command to print its version and exit. short and iconic โญ
  • -a โ€” this session should be added to utmpx/wtmpx. the "you're so back" flag โœจ
  • -d โ€” this session should be deleted from utmpx/wtmpx. the "it's so over" flag ๐Ÿ˜ญ**
โš ๏ธ real talk: one of -a/-d must be specified. you literally cannot run this without picking a side. main character decision energy ๐Ÿ”ฅ

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

xdm(1), utmpx(5), wtmpx(5) โ€” go read these, iykyk ๐Ÿ“š


๐Ÿ’œ AUTHOR ๐Ÿ’œ

Keith Packard, MIT X Consortium โ€” legend behavior, honestly ๐Ÿ‘‘


sessreg 1.1.4 ยท 2025-03-22 โ€” that's the version and the date bestie, screenshot it for the group chat ๐Ÿ“ธ mwah, go log your sessions responsibly ๐Ÿ’‹โœจ

๐Ÿ“ฆ where this page comes from