Tizen 2.0 Release
[framework/uifw/xorg/util/x11-xserver-utils.git] / sessreg / man / sessreg.man
1 .\" $Xorg: sessreg.man,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $
2 .\" Copyright 1994, 1998  The Open Group
3 .\"
4 .\" Permission to use, copy, modify, distribute, and sell this software and its
5 .\" documentation for any purpose is hereby granted without fee, provided that
6 .\" the above copyright notice appear in all copies and that both that
7 .\" copyright notice and this permission notice appear in supporting
8 .\" documentation.
9 .\"
10 .\" The above copyright notice and this permission notice shall be included
11 .\" in all copies or substantial portions of the Software.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 .\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19 .\" OTHER DEALINGS IN THE SOFTWARE.
20 .\"
21 .\" Except as contained in this notice, the name of The Open Group shall
22 .\" not be used in advertising or otherwise to promote the sale, use or
23 .\" other dealings in this Software without prior written authorization
24 .\" from The Open Group.
25 .\"
26 .\" $XFree86: xc/programs/xdm/sessreg.man,v 1.7 2001/04/23 20:31:09 dawes Exp $
27 .\"
28 .TH SESSREG __appmansuffix__ __xorgversion__
29 .SH NAME
30 sessreg \- manage utmp/wtmp entries for non-init clients
31 .SH SYNOPSIS
32 .B sessreg
33 [-w \fIwtmp-file\fP]
34 [-u \fIutmp-file\fP]
35 [-L \fIlastlog-file\fP]
36 [-l \fIline-name\fP]
37 [-h \fIhost-name\fP]
38 [-s \fIslot-number\fP]
39 [-x \fIXservers-file\fP]
40 [-t \fIttys-file\fP]
41 [-a]
42 [-d]
43 \fIuser-name\fP
44 .SH DESCRIPTION
45 .PP
46 \fISessreg\fP is a simple program for managing utmp/wtmp and lastlog
47 entries for xdm sessions.
48 .PP
49 System V has a better interface to utmp than BSD; it
50 dynamically allocates entries in the file, instead of writing them at fixed
51 positions indexed by position in
52 .BR __ttys_file__ .
53 .PP
54 To manage BSD-style utmp files, \fIsessreg\fP has two strategies.  In
55 conjunction with xdm, the -x option counts the number of lines in
56 .B __ttys_file__
57 and then adds to that the number of the line in the Xservers file which
58 specifies the display.  The display name must be specified as the
59 "line-name" using the -l option.  This sum is used as the "slot-number" in
60 the utmp file that this entry will be written at.  In the more general case,
61 the -s option specifies the slot-number directly.  If for some strange reason
62 your system uses a file other than
63 .B __ttys_file__
64 to manage init, the -t option can direct
65 \fIsessreg\fP to look elsewhere for a count of terminal sessions.
66 .PP
67 Conversely, System V managers will not ever need to use these options (-x,
68 -s and -t).  To make the program easier to document and explain,
69 \fIsessreg\fP accepts the BSD-specific flags in the System V
70 environment and ignores them.
71 .PP
72 BSD and Linux also have a host-name field in the utmp file which doesn't
73 exist in System V.  This option is also ignored by the System V version of
74 \fIsessreg\fP.
75 .SH USAGE
76 .PP
77 In Xstartup, place a call like:
78 .nf
79
80        sessreg -a -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
81
82 .fi
83 and in Xreset:
84 .nf
85
86        sessreg -d -l $DISPLAY -x /etc/X11/xdm/Xservers $USER
87 .fi
88 .SH OPTIONS
89 .IP "\fB-w\fP \fIwtmp-file\fP"
90 This specifies an alternate wtmp file, instead of
91 .BR __wtmp_file__ .
92 The special name "none" disables writing records to the wtmp file.
93 .IP "\fB-u\fP \fIutmp-file\fP"
94 This specifies an alternate utmp file, instead of
95 .BR __utmp_file__ .
96 The special name "none" disables writing records to the utmp file.
97 .IP "\fB-L\fP \fIlastlog-file\fP"
98 This specifies an alternate lastlog file, instead of
99 .BR __lastlog_file__ ,
100 if the platform supports lastlog files.
101 The special name "none" disables writing records to the lastlog file.
102 .IP "\fB-l\fP \fIline-name\fP"
103 This describes the "line" name of the entry.  For terminal sessions,
104 this is the final pathname segment of the terminal device filename
105 (e.g. ttyd0).  For X sessions, it should probably be the local display name
106 given to the users session (e.g. :0).  If none is specified, the
107 terminal name will be determined with ttyname(__libmansuffix__) and stripped of leading
108 components.
109 .IP "\fB-h\fP \fIhost-name\fP"
110 This is set for BSD hosts to indicate that the session was initiated from
111 a remote host.  In typical xdm usage, this options is not used.
112 .IP "\fB-s\fP \fIslot-number\fP"
113 Each potential session has a unique slot number in BSD systems, most are
114 identified by the position of the \fIline-name\fP in the
115 .BR __ttys_file__ file.
116 This option overrides the default position determined with ttyslot(__libmansuffix__).
117 This option is inappropriate for use with xdm, the -x option is more useful.
118 .IP "\fB-x\fP \fIXservers-file\fP"
119 As X sessions are one-per-display, and each display is entered in this file,
120 this options sets the \fIslot-number\fP to be the number of lines in
121 the \fIttys-file\fP plus the index into this file that the \fIline-name\fP
122 is found.
123 .IP "\fB-t\fP \fIttys-file\fP"
124 This specifies an alternate file which the \fI-x\fP option will use to count
125 the number of terminal sessions on a host.
126 .IP "\fB-a\fP"
127 This session should be added to utmp/wtmp.
128 .IP "\fB-d\fP"
129 This session should be deleted from utmp/wtmp.  One of -a/-d must
130 be specified.
131 .SH "SEE ALSO"
132 .BR xdm (__appmansuffix__),
133 .BR __utmp_manpage__ (__filemansuffix__)
134 .SH AUTHOR
135 Keith Packard, MIT X Consortium