1SESSREG(1)                  General Commands Manual                 SESSREG(1)
2
3
4

NAME

6       sessreg - manage utmp/wtmp entries for non-init clients
7

SYNOPSIS

9       sessreg  [-w wtmp-file] [-u utmp-file] [-L lastlog-file] [-l line-name]
10       [-h host-name] [-s slot-number] [-x Xservers-file] [-t ttys-file]  [-a]
11       [-d] user-name
12

DESCRIPTION

14       Sessreg  is a simple program for managing utmp/wtmp and lastlog entries
15       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

USAGE

42       In Xstartup, place a call like:
43
44              sessreg -a -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
45
46       and in Xreset:
47
48              sessreg -d -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
49

OPTIONS

51       -w wtmp-file
52              This specifies an alternate wtmp file, instead of /var/log/wtmp.
53              The  special  name  "none"  disables writing records to the wtmp
54              file.
55
56       -u utmp-file
57              This specifies an alternate utmp file, instead of /var/run/utmp.
58              The  special  name  "none"  disables writing records to the utmp
59              file.
60
61       -L lastlog-file
62              This  specifies  an   alternate   lastlog   file,   instead   of
63              /var/log/lastlog,  if  the platform supports lastlog files.  The
64              special name "none" disables  writing  records  to  the  lastlog
65              file.
66
67       -l line-name
68              This  describes the "line" name of the entry.  For terminal ses‐
69              sions, this is the final pathname segment of the terminal device
70              filename  (e.g.  ttyd0).   For X sessions, it should probably be
71              the local display name given to the users session (e.g. :0).  If
72              none  is  specified,  the  terminal name will be determined with
73              ttyname(3) and stripped of leading components.
74
75       -h host-name
76              This is set for BSD hosts to indicate that the session was  ini‐
77              tiated  from  a remote host.  In typical xdm usage, this options
78              is not used.
79
80       -s slot-number
81              Each potential session has a unique slot number in BSD  systems,
82              most  are  identified  by  the  position of the line-name in the
83              /etc/ttysfile.   This  option  overrides  the  default  position
84              determined  with  ttyslot(3).   This option is inappropriate for
85              use with xdm, the -x option is more useful.
86
87       -x Xservers-file
88              As X sessions are one-per-display, and each display  is  entered
89              in this file, this options sets the slot-number to be the number
90              of lines in the ttys-file plus the index into this file that the
91              line-name is found.
92
93       -t ttys-file
94              This specifies an alternate file which the -x option will use to
95              count the number of terminal sessions on a host.
96
97       -a     This session should be added to utmp/wtmp.
98
99       -d     This session should be deleted from  utmp/wtmp.   One  of  -a/-d
100              must be specified.
101

SEE ALSO

103       xdm(1), utmp(5)
104

AUTHOR

106       Keith Packard, MIT X Consortium
107
108
109
110X Version 11                     sessreg 1.0.5                      SESSREG(1)
Impressum