1SESSREG(1) General Commands Manual SESSREG(1)
2
3
4
6 sessreg - manage utmp (5)/wtmp (5) entries for non-init clients
7
9 sessreg [-w wtmp [4m(5)-file] [-u utmp [4m(5)-file] [-L lastlog-file] [-l
10 line-name] [-h host-name] [-s slot-number] [-x Xservers-file] [-t ttys-
11 file] [-V] [-a] [-d] user-name
12
14 Sessreg is a simple program for managing utmp (5)/wtmp (5) and lastlog
15 entries for xdm sessions.
16
17 System V has a better interface to utmp than BSD; it dynamically allo‐
18 cates entries in the file, instead of writing them at fixed positions
19 indexed by position in /etc/ttys.
20
21 To manage BSD-style utmp files, sessreg has two strategies. In con‐
22 junction with xdm, the -x option counts the number of lines in
23 /etc/ttys and then adds to that the number of the line in the Xservers
24 file which specifies the display. The display name must be specified
25 as the "line-name" using the -l option. This sum is used as the "slot-
26 number" in the utmp file that this entry will be written at. In the
27 more general case, the -s option specifies the slot-number directly.
28 If for some strange reason your system uses a file other than /etc/ttys
29 to manage init, the -t option can direct sessreg to look elsewhere for
30 a count of terminal sessions.
31
32 Conversely, System V managers will not ever need to use these options
33 (-x, -s and -t). To make the program easier to document and explain,
34 sessreg accepts the BSD-specific flags in the System V environment and
35 ignores them.
36
37 BSD and Linux also have a host-name field in the utmp file which
38 doesn't exist in System V. This option is also ignored by the System V
39 version of sessreg.
40
41 This version of sessreg is built using the modern POSIX pututxline(3c)
42 interfaces, which no longer require the slot-number, ttys-file, or
43 Xservers-file mappings. For compatibility with older versions and
44 other operating systems, the -s, -t, and -x flags are accepted, but
45 ignored.
46
48 In Xstartup, place a call like:
49
50 sessreg -a -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
51
52 and in Xreset:
53
54 sessreg -d -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
55
57 -w wtmp [4m(5)-file
58 This specifies an alternate wtmp (5) file, instead of
59 /var/log/wtmp. The special name "none" disables writing records
60 to the wtmp (5) file.
61
62 -u utmp [4m(5)-file
63 This specifies an alternate utmp (5) file, instead of
64 /var/run/utmp. The special name "none" disables writing records
65 to the utmp (5) file.
66
67 -L lastlog-file
68 This specifies an alternate lastlog file, instead of
69 /var/log/lastlog, if the platform supports lastlog files. The
70 special name "none" disables writing records to the lastlog
71 file.
72
73 -l line-name