comparison etc/gnuserv.1 @ 2437:807b51903ed4

[xemacs-hg @ 2004-12-14 09:56:38 by stephent] update gnuserv docs <87ekhtnqzy.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Tue, 14 Dec 2004 09:56:48 +0000
parents 5aa1854ad537
children 73eef12660cd
comparison
equal deleted inserted replaced
2436:709ed9eb45a1 2437:807b51903ed4
15 .B gnuattach 15 .B gnuattach
16 Removed as of gnuserv 3.x 16 Removed as of gnuserv 3.x
17 .SH DESCRIPTION 17 .SH DESCRIPTION
18 18
19 .PP 19 .PP
20 \fIgnuserv\fP is a server program run as a subprocess of XEmacs to handle
21 all incoming and outgoing requests from \fIgnuclient\fP. It is not usually
22 invoked directly, but is started from XEmacs by loading the \fIgnuserv\fP
23 package and evaluating the Lisp form (gnuserv-start).
24 .PP
20 \fIgnuclient\fP allows the user to request a running XEmacs process to 25 \fIgnuclient\fP allows the user to request a running XEmacs process to
21 edit the named files or directories and/or evaluate lisp forms. 26 edit the named files or directories and/or evaluate lisp forms.
22 Depending on your environment, it can be an X frame or a TTY frame. 27 Depending on your environment, TTY, X, GTK, or MS Windows frames, as well as
28 batch (frameless) execution of Lisp may be available.
23 One typical use for this is with a dialup connection to a machine on 29 One typical use for this is with a dialup connection to a machine on
24 which an XEmacs process is currently running. 30 which an XEmacs process is currently running.
25 .PP 31 .PP
26 \fIgnudoit\fP is a shell script frontend to ``gnuclient -batch -eval form''. 32 \fIgnudoit\fP is a shell script frontend to ``gnuclient -batch -eval form''.
27 Its use is deprecated. Try to get used to calling gnuclient directly. 33 Its use is deprecated. Try to get used to calling gnuclient directly.
28 .PP
29 \fIgnuserv\fP is the server program that is set running by XEmacs to
30 handle all incoming and outgoing requests. It is not usually invoked
31 directly, but is started from XEmacs by loading the \fIgnuserv\fP
32 package and evaluating the Lisp form (gnuserv-start).
33 .PP 34 .PP
34 \fIgnuattach\fP no longer exists. Its functionality has been replaced by 35 \fIgnuattach\fP no longer exists. Its functionality has been replaced by
35 \fIgnuclient -nw\fP. 36 \fIgnuclient -nw\fP.
36 .SH OPTIONS 37 .SH OPTIONS
37 .PP 38 .PP
38 \fIgnuclient\fP supports as much of the command line options of Emacs as 39 \fIgnuclient\fP supports as many of the command line options of Emacs as
39 makes sense in this context. In addition it adds a few of its own. 40 make sense in this context. In addition it adds a few of its own.
40 .br 41 .br
41 Options with long names can also be specified using a double 42 For backward compatibility, ``long'' options (\fi.e.\fP, with doubled hyphen)
42 hyphen instead of a single one. 43 may be specified using a single hyphen instead of a doubled one. Similarly,
44 the ``-nw'' option is a historical artifact: a multiletter option with no
45 double-hyphen version.
43 .TP 8 46 .TP 8
44 .BI \-nw 47 .BI \-nw
45 This option makes \fIgnuclient\fP act as a frontend such that XEmacs 48 This option makes \fIgnuclient\fP act as a frontend such that XEmacs
46 can attach to the current TTY. XEmacs will then open a new TTY frame. 49 can attach to the current TTY. XEmacs will then open a new TTY frame.
47 The effect is similar to having started a new XEmacs on this TTY with 50 The effect is similar to having started a new XEmacs on this TTY with
48 the ``-nw'' option. It currently only works if XEmacs is running on 51 the ``-nw'' option. It currently only works if XEmacs is running on
49 the same machine as gnuclient. This is the default if the `DISPLAY' 52 the same machine as gnuclient. This is the default if the `DISPLAY'
50 environment variable is not set. 53 environment variable is not set.
51 .TP 8 54 .TP 8
52 .BI \-display " display, " \--display " display" 55 .BI \--display " display, " \-display " display"
53 If this option is given or the `DISPLAY' environment variable is set 56 If this option is given or the `DISPLAY' environment variable is set
54 then gnuclient will tell XEmacs to edit files in a frame on the 57 then gnuclient will tell XEmacs to edit files in a frame on the
55 specified X device. 58 specified X device.
56 .TP 8 59 .TP 8
57 .BI \-q 60 .BI \-q
58 This option informs \fIgnuclient\fP to exit once connection has been 61 This option informs \fIgnuclient\fP to exit once connection has been
59 made with the XEmacs process. Normally \fIgnuclient\fP waits until 62 made with the XEmacs process. Normally \fIgnuclient\fP waits until
60 all of the files on the command line have been finished with (their 63 all of the files on the command line have been finished with (their
61 buffers killed) by the XEmacs process, and all the forms have been 64 buffers killed) by the XEmacs process, and all the forms have been
62 evaluated. 65 evaluated. Note that this is \fIdifferent\fP from XEmacs itself, where
66 this option means to inhibit loading of the user init file.
63 .TP 8 67 .TP 8
64 .BI \-v 68 .BI \-v
65 When this option is specified \fIgnuclient\fP will request for the 69 When this option is specified \fIgnuclient\fP will request for the
66 specified files to be viewed instead of edited. 70 specified files to be viewed instead of edited.
67 .TP 8 71 .TP 8
79 options, then forms to eval are read from STDIN. 83 options, then forms to eval are read from STDIN.
80 .TP 8 84 .TP 8
81 .BI \-f " function," 85 .BI \-f " function,"
82 Make Emacs execute the lisp function. 86 Make Emacs execute the lisp function.
83 .TP 8 87 .TP 8
84 .BI \-eval " form" 88 .BI \--eval " form, " \-eval " form"
85 Make Emacs execute the lisp form. 89 Make Emacs execute the Lisp form.
86 .TP 8 90 .TP 8
87 .BI \-h " hostname" 91 .BI \-h " hostname"
88 Used only with Internet-domain sockets, this option specifies the host 92 Used only with Internet-domain sockets, this option specifies the host
89 machine which should be running \fIgnuserv\fP. If this option is not 93 machine which should be running \fIgnuserv\fP. If this option is not
90 specified then the value of the environment variable GNU_HOST is used 94 specified then the value of the environment variable GNU_HOST is used
91 if set. If no hostname is specified, and the GNU_HOST variable is not 95 if set. If no hostname is specified, and the GNU_HOST variable is not
92 set, an internet connection will not be attempted. N\.B.: 96 set, an Internet connection will not be attempted. N\.B.:
93 \fIgnuserv\fP does NOT allow internet connections unless XAUTH 97 \fIgnuserv\fP does NOT allow Internet connections unless XAUTH
94 authentication is used or the GNU_SECURE variable has been specified 98 authentication is used or the GNU_SECURE variable has been specified
95 and points at a file listing all trusted hosts. (See SECURITY below.) 99 and points at a file listing all trusted hosts. (See SECURITY below.)
96 100
97 .br 101 .br
98 Note that an internet address may be specified instead of a hostname 102 An Internet address (``dotted-quad'') may be specified instead of a
99 which can speed up connections to the server by quite a bit, 103 hostname. IPv6 support is not robust.
100 especially if the client machine is running YP. 104
101 105 .br
102 .br 106 A hostname of \fBunix\fP can be used to specify that
103 Note also that a hostname of \fBunix\fP can be used to specify that
104 the connection to the server should use a Unix-domain socket (if 107 the connection to the server should use a Unix-domain socket (if
105 supported) rather than an Internet-domain socket. 108 supported) rather than an Internet-domain socket.
106 .TP 8 109 .TP 8
107 .BI \-p " port" 110 .BI \-p " port"
108 Used only with Internet-domain sockets, this option specifies the 111 Used only with Internet-domain sockets, this option specifies the
131 This is the path of the file to be edited. If the file is a directory, then 134 This is the path of the file to be edited. If the file is a directory, then
132 the directory browsers dired or monkey are usually invoked instead. 135 the directory browsers dired or monkey are usually invoked instead.
133 The cursor is put at line number 'n' if specified. 136 The cursor is put at line number 'n' if specified.
134 137
135 .SH SETUP 138 .SH SETUP
136 \fIgnuserv\fP is packaged standardly with recent versions of XEmacs. 139 \fIgnuserv\fP is included with recent versions of XEmacs; no installation
137 Therefore, you should be able to start the server simply by evaluating 140 is required. The server must be started before clients may attempt to
138 the XEmacs Lisp form (gnuserv-start), or equivalently by typing 141 connect. Start the server by evaluating the Lisp form (gnuserv-start), or
139 `M-x gnuserv-start'. 142 interactively by typing `M-x gnuserv-start'.
140 143
141 .SH CONFIGURATION 144 .SH CONFIGURATION
142 The behavior of this suite of program is mostly controlled on the lisp 145 The behavior of this suite of programs can be customized to a large extent.
143 side in Emacs and its behavior can be customized to a large extent. 146 Type `M-x customize-group RET gnuserv RET'. More documentation can be found
144 Type `M-x customize-group RET gnuserv RET' for easy access. More 147 in the file `gnuserv.el'
145 documentation can be found in the file `gnuserv.el'
146 148
147 .SH EXAMPLE 149 .SH EXAMPLE
148 .RS 4 150 .RS 4
149 gnuclient -q -f mh-smail 151 gnuclient -q -f mh-smail
150 .br 152 .br
154 .RE 156 .RE
155 .br 157 .br
156 158
157 .br 159 .br
158 More examples and sample wrapper scripts are provided in the 160 More examples and sample wrapper scripts are provided in the
159 etc/gnuserv directory of the Emacs installation. 161 etc/gnuserv directory of the XEmacs installation.
160 162
161 163
162 .SH SYSV IPC 164 .SH SYSV IPC
163 SysV IPC is used to communicate between \fIgnuclient\fP and 165 SysV IPC is a build-time option, enabled by defining the symbol SYSV_IPC
164 \fIgnuserv\fP if the symbol SYSV_IPC is defined at the top of 166 at the top of gnuserv.h. It is used to communicate between \fIgnuclient\fP
165 gnuserv.h. This is incompatible with both Unix-domain and 167 and \fIgnuserv\fP. It is incompatible with both Unix-domain and
166 Internet-domain socket communication as described below. A file called 168 Internet-domain socket communication as described below. A file called
167 /tmp/gsrv??? is created as a key for the message queue, and if removed 169 /tmp/gsrv??? is created as a key for the message queue, and if removed
168 will cause the communication between server and client to fail until 170 will cause the communication between server and client to fail until
169 the server is restarted. 171 the server is restarted.
170 .SH UNIX-DOMAIN SOCKETS 172 .SH UNIX-DOMAIN SOCKETS
171 A Unix-domain socket is used to communicate between \fIgnuclient\fP 173 Unix-domain sockets are a build-time option, enabled by defining the symbol
172 and \fIgnuserv\fP if the symbol UNIX_DOMAIN_SOCKETS is defined at the 174 UNIX_DOMAIN_SOCKETS at the top of gnuserv.h. A Unix-domain socket is used
173 top of gnuserv.h. A file called /tmp/gsrvdir????/gsrv is created for 175 to communicate between \fIgnuclient\fP
176 and \fIgnuserv\fP. A file called /tmp/gsrvdir????/gsrv is created for
174 communication. If the symbol USE_TMPDIR is set at the top of gnuserv.h, 177 communication. If the symbol USE_TMPDIR is set at the top of gnuserv.h,
175 $TMPDIR, when set, is used instead of /tmp. If that file is deleted, 178 $TMPDIR, when set, is used instead of /tmp. If that file is deleted,
176 or TMPDIR has different values for the server and the client, communication 179 or TMPDIR has different values for the server and the client, communication
177 between server and client will fail. Only the user running gnuserv will be 180 between server and client will fail. Only the user running gnuserv will be
178 able to connect to the socket. 181 able to connect to the socket.
179 .SH INTERNET-DOMAIN SOCKETS 182 .SH INTERNET-DOMAIN SOCKETS
180 Internet-domain sockets are used to communicate between 183 Internet-domain sockets are a build-time option, enabled by defining the
181 \fIgnuclient\fP and \fIgnuserv\fP if the symbol 184 symbol INTERNET_DOMAIN_SOCKETS at the top of gnuserv.h. Internet-domain
182 INTERNET_DOMAIN_SOCKETS is defined at the top of gnuserv.h. Both 185 sockets are used to communicate between \fIgnuclient\fP and \fIgnuserv\fP.
183 Internet-domain and Unix-domain sockets can be used at the same 186 Both Internet-domain and Unix-domain sockets can be used at the same
184 time. If a hostname is specified via -h or via the GNU_HOST 187 time. If a hostname is specified via -h or via the GNU_HOST
185 environment variable, \fIgnuclient\fP establish connections using an 188 environment variable, \fIgnuclient\fP establish connections using an
186 internet domain socket. If not, a local connection is attempted via 189 Internet domain socket. If not, a local connection is attempted via
187 either a unix-domain socket or SYSV IPC. 190 either a Unix-domain socket or SYSV IPC.
188 .SH SECURITY 191 .SH SECURITY
189 Using Internet-domain sockets, a more robust form of security is 192 Using Internet-domain sockets, a more robust form of security is
190 needed that wasn't necessary with either Unix-domain sockets or SysV 193 needed that wasn't necessary with either Unix-domain sockets or SysV
191 IPC. Currently, two authentication protocols are supported to provide 194 IPC. Currently, two authentication protocols are supported to provide
192 this: MIT-MAGIC-COOKIE-1 (based on the X11 xauth(1) program) and a 195 this: MIT-MAGIC-COOKIE-1 (based on the X11 xauth(1) program) and a
193 simple host-based access control mechanism, hereafter called 196 simple host-based access control mechanism, hereafter called
194 GNUSERV-1. The GNUSERV-1 protocol is always available, whereas support 197 GNUSERV-1. The GNUSERV-1 protocol is always available. Support
195 for MIT-MAGIC-COOKIE-1 may or may not have been enabled (via a #define 198 for MIT-MAGIC-COOKIE-1 is enabled (by defining AUTH_MAGIC_COOKIE
196 at the top of gnuserv.h) at compile-time. 199 at the top of gnuserv.h.
197 .PP 200 .PP
198 \fIgnuserv\fP, using GNUSERV-1, performs a limited form of access 201 \fIgnuserv\fP, using GNUSERV-1, performs a limited form of access
199 control at the machine level. By default no internet-domain socket is 202 control at the machine level. By default no Internet-domain socket is
200 opened. If the variable GNU_SECURE can be found in \fIgnuserv\fP's 203 opened. If the variable GNU_SECURE can be found in \fIgnuserv\fP's
201 environment, and it names a readable filename, then this file is 204 environment, and it names a readable filename, then this file is
202 opened and assumed to be a list of hosts, one per line, from which the 205 opened and assumed to be a list of hosts, one per line, from which the
203 server will allow requests. Connections from any other host will be 206 server will allow requests. Connections from any other host will be
204 rejected. Even the machine on which \fIgnuserv\fP is running is not 207 rejected. Even the machine on which \fIgnuserv\fP is running is not
205 permitted to make connections via the internet socket unless its 208 permitted to make connections via the Internet socket unless its
206 hostname is explicitly specified in this file. Note that a host may 209 hostname is explicitly specified in this file. Note that a host may
207 be either a numeric IP address or a hostname, and that 210 be either a numeric IP address or a hostname, and that
208 .I any 211 .I any
209 user on an approved host may connect to your gnuserv and execute arbitrary 212 user on an approved host may connect to your gnuserv and execute arbitrary
210 elisp (e.g., delete all your files). 213 Lisp (e.g., delete all your files).
211 If this file contains a lot of 214 If this file contains a lot of
212 hostnames then the server may take quite a time to start up. 215 hostnames then the server may take quite a long time to start up.
213 .PP 216 .PP
214 When the MIT-MAGIC-COOKIE-1 protocol is enabled, an internet socket 217 When the MIT-MAGIC-COOKIE-1 protocol is enabled, an Internet socket
215 \fIis\fP opened by default. \fIgnuserv\fP will accept a connection from 218 \fIis\fP opened by default. \fIgnuserv\fP will accept a connection from
216 any host, and will wait for a "magic cookie" (essentially, a password) 219 any host, and will wait for a "magic cookie" (essentially, a password)
217 to be presented by the client. If the client doesn't present the 220 to be presented by the client. If the client doesn't present the
218 cookie, or if the cookie is wrong, the authentication of the client is 221 cookie, or if the cookie is wrong, the authentication of the client is
219 considered to have failed. At this point. \fIgnuserv\fP falls back to 222 considered to have failed. At this point. \fIgnuserv\fP falls back to
265 268
266 .SH ENVIRONMENT 269 .SH ENVIRONMENT
267 .PP 270 .PP
268 .TP 8 271 .TP 8
269 .B DISPLAY 272 .B DISPLAY
270 Default X device to put edit frame. 273 Default X (or GTK) device for display of edit frame.
271 274
272 .SH FILES 275 .SH FILES
273 .PP 276 .PP
274 .TP 8 277 .TP 8
275 .B /tmp/gsrv??? 278 .B /tmp/gsrv???
276 (SYSV_IPC only) 279 (SYSV_IPC only)
277 .TP 8 280 .TP 8
278 .B /tmp/gsrvdir???/gsrv 281 .B /tmp/gsrvdir???/gsrv
279 (unix domain sockets only) 282 (unix domain sockets only)
280 .TP 8 283 .TP 8
281 .B ~/.emacs 284 .B ~/.xemacs/init.el
282 XEmacs customization file, see xemacs(1). 285 XEmacs customization file, see xemacs(1).
283 .SH SEE ALSO 286 .SH SEE ALSO
284 .PP 287 .PP
285 .TP 8 288 .TP 8
286 xauth(1X11), Xsecurity(1X11), gnuserv.el 289 xauth(1X11), Xsecurity(1X11), gnuserv.el