annotate etc/gnuserv.1 @ 5640:e6b5c49f9e13

Add autoload cookie to custom-set-face-bold
author Vin Shelton <acs@xemacs.org>
date Sun, 08 Jan 2012 22:29:06 -0500
parents 863f16484873
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 .TH GNUSERV 1 "" "XEmacs Server"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 .UC 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 .SH NAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 gnuserv, gnuclient \- Server and Clients for XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 .SH SYNOPSIS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 .B gnuclient
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 [-nw] [-display display] [-q] [-v] [-l library] [-batch] [-f function] [-eval form]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 [-h hostname] [-p port] [-r remote-pathname] [[+line] file] ...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 .B gnudoit [-q]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 form
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 .B gnuserv
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 .B gnuattach
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 Removed as of gnuserv 3.x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 .SH DESCRIPTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 .PP
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
20 \fIgnuserv\fP is a server program run as a subprocess of XEmacs to handle
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
21 all incoming and outgoing requests from \fIgnuclient\fP. It is not usually
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
22 invoked directly, but is started from XEmacs by loading the \fIgnuserv\fP
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
23 package and evaluating the Lisp form (gnuserv-start).
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
24 .PP
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 \fIgnuclient\fP allows the user to request a running XEmacs process to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 edit the named files or directories and/or evaluate lisp forms.
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
27 Depending on your environment, TTY, X, GTK, or MS Windows frames, as well as
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
28 batch (frameless) execution of Lisp may be available.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 One typical use for this is with a dialup connection to a machine on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 which an XEmacs process is currently running.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 \fIgnudoit\fP is a shell script frontend to ``gnuclient -batch -eval form''.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
33 Its use is deprecated. Try to get used to calling gnuclient directly.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 \fIgnuattach\fP no longer exists. Its functionality has been replaced by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 \fIgnuclient -nw\fP.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 .SH OPTIONS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 .PP
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
39 \fIgnuclient\fP supports as many of the command line options of Emacs as
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
40 make sense in this context. In addition it adds a few of its own.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 .br
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
42 For backward compatibility, ``long'' options (\fi.e.\fP, with doubled hyphen)
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
43 may be specified using a single hyphen instead of a doubled one. Similarly,
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
44 the ``-nw'' option is a historical artifact: a multiletter option with no
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
45 double-hyphen version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 .BI \-nw
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 This option makes \fIgnuclient\fP act as a frontend such that XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 can attach to the current TTY. XEmacs will then open a new TTY frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 The effect is similar to having started a new XEmacs on this TTY with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 the ``-nw'' option. It currently only works if XEmacs is running on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 the same machine as gnuclient. This is the default if the `DISPLAY'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 environment variable is not set.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 .TP 8
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
55 .BI \--display " display, " \-display " display"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 If this option is given or the `DISPLAY' environment variable is set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 then gnuclient will tell XEmacs to edit files in a frame on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 specified X device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 .BI \-q
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 This option informs \fIgnuclient\fP to exit once connection has been
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 made with the XEmacs process. Normally \fIgnuclient\fP waits until
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 all of the files on the command line have been finished with (their
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 buffers killed) by the XEmacs process, and all the forms have been
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
65 evaluated. Note that this is \fIdifferent\fP from XEmacs itself, where
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
66 this option means to inhibit loading of the user init file.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 .BI \-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 When this option is specified \fIgnuclient\fP will request for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 specified files to be viewed instead of edited.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 .BI \-l " library"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 Tell Emacs to load the specified library.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 .BI \-batch
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 Tell Emacs not to open any frames. Just load libraries and evaluate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 lisp code. If no files to execute, functions to call or forms to eval
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 are given using the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 .BR \-l ,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 .BR \-f ,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 .B \-eval
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 options, then forms to eval are read from STDIN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 .BI \-f " function,"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 Make Emacs execute the lisp function.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 .TP 8
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
88 .BI \--eval " form, " \-eval " form"
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
89 Make Emacs execute the Lisp form.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 .BI \-h " hostname"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 Used only with Internet-domain sockets, this option specifies the host
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 machine which should be running \fIgnuserv\fP. If this option is not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 specified then the value of the environment variable GNU_HOST is used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 if set. If no hostname is specified, and the GNU_HOST variable is not
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
96 set, an Internet connection will not be attempted. N\.B.:
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
97 \fIgnuserv\fP does NOT allow Internet connections unless XAUTH
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 authentication is used or the GNU_SECURE variable has been specified
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 and points at a file listing all trusted hosts. (See SECURITY below.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 .br
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
102 An Internet address (``dotted-quad'') may be specified instead of a
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
103 hostname. IPv6 support is not robust.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 .br
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
106 A hostname of \fBunix\fP can be used to specify that
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 the connection to the server should use a Unix-domain socket (if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 supported) rather than an Internet-domain socket.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 .BI \-p " port"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 Used only with Internet-domain sockets, this option specifies the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 service port used to communicate between server and clients. If this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 option is not specified, then the value of the environment variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 GNU_PORT is used, if set, otherwise a service called ``gnuserv'' is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 looked up in the services database. Finally, if no other value can be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 found for the port, then a default port is used which is usually 21490
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 + uid.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 Note that since \fIgnuserv\fP doesn't allow command-line options, the port for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 it will have to be specified via one of the alternative methods.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 .BI \-r " pathname"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 Used only with Internet-domain sockets, the pathname argument may be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 needed to inform XEmacs how to reach the root directory of a remote
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 machine. \fIgnuclient\fP prepends this string to each path argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 given. For example, if you were trying to edit a file on a client
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 machine called otter, whose root directory was accessible from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 server machine via the path /net/otter, then this argument should be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 set to '/net/otter'. If this option is omitted, then the value is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 taken from the environment variable GNU_NODE, if set, or the empty
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 string otherwise.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 .BI "[+n] file"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 This is the path of the file to be edited. If the file is a directory, then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 the directory browsers dired or monkey are usually invoked instead.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 The cursor is put at line number 'n' if specified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 .SH SETUP
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
139 \fIgnuserv\fP is included with recent versions of XEmacs; no installation
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
140 is required. The server must be started before clients may attempt to
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
141 connect. Start the server by evaluating the Lisp form (gnuserv-start), or
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
142 interactively by typing `M-x gnuserv-start'.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 .SH CONFIGURATION
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
145 The behavior of this suite of programs can be customized to a large extent.
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
146 Type `M-x customize-group RET gnuserv RET'. More documentation can be found
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
147 in the file `gnuserv.el'
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 .SH EXAMPLE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 .RS 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 gnuclient -q -f mh-smail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 gnuclient -h cuckoo -r /ange@otter: /tmp/*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 gnuclient -nw ../src/listproc.c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 .RE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 More examples and sample wrapper scripts are provided in the
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
161 etc/gnuserv directory of the XEmacs installation.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 .SH SYSV IPC
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
165 SysV IPC is a build-time option, enabled by defining the symbol SYSV_IPC
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
166 at the top of gnuserv.h. It is used to communicate between \fIgnuclient\fP
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
167 and \fIgnuserv\fP. It is incompatible with both Unix-domain and
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 Internet-domain socket communication as described below. A file called
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 /tmp/gsrv??? is created as a key for the message queue, and if removed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 will cause the communication between server and client to fail until
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 the server is restarted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 .SH UNIX-DOMAIN SOCKETS
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
173 Unix-domain sockets are a build-time option, enabled by defining the symbol
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
174 UNIX_DOMAIN_SOCKETS at the top of gnuserv.h. A Unix-domain socket is used
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
175 to communicate between \fIgnuclient\fP
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
176 and \fIgnuserv\fP. A file called /tmp/gsrvdir????/gsrv is created for
464
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 442
diff changeset
177 communication. If the symbol USE_TMPDIR is set at the top of gnuserv.h,
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 442
diff changeset
178 $TMPDIR, when set, is used instead of /tmp. If that file is deleted,
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 442
diff changeset
179 or TMPDIR has different values for the server and the client, communication
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 442
diff changeset
180 between server and client will fail. Only the user running gnuserv will be
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 442
diff changeset
181 able to connect to the socket.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 .SH INTERNET-DOMAIN SOCKETS
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
183 Internet-domain sockets are a build-time option, enabled by defining the
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
184 symbol INTERNET_DOMAIN_SOCKETS at the top of gnuserv.h. Internet-domain
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
185 sockets are used to communicate between \fIgnuclient\fP and \fIgnuserv\fP.
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
186 Both Internet-domain and Unix-domain sockets can be used at the same
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
187 time. If a hostname is specified via -h or via the GNU_HOST
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 environment variable, \fIgnuclient\fP establish connections using an
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
189 Internet domain socket. If not, a local connection is attempted via
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
190 either a Unix-domain socket or SYSV IPC.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 .SH SECURITY
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 Using Internet-domain sockets, a more robust form of security is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 needed that wasn't necessary with either Unix-domain sockets or SysV
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 IPC. Currently, two authentication protocols are supported to provide
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 this: MIT-MAGIC-COOKIE-1 (based on the X11 xauth(1) program) and a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 simple host-based access control mechanism, hereafter called
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
197 GNUSERV-1. The GNUSERV-1 protocol is always available. Support
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
198 for MIT-MAGIC-COOKIE-1 is enabled (by defining AUTH_MAGIC_COOKIE
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
199 at the top of gnuserv.h.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 \fIgnuserv\fP, using GNUSERV-1, performs a limited form of access
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
202 control at the machine level. By default no Internet-domain socket is
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 opened. If the variable GNU_SECURE can be found in \fIgnuserv\fP's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 environment, and it names a readable filename, then this file is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 opened and assumed to be a list of hosts, one per line, from which the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 server will allow requests. Connections from any other host will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 rejected. Even the machine on which \fIgnuserv\fP is running is not
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
208 permitted to make connections via the Internet socket unless its
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 hostname is explicitly specified in this file. Note that a host may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 be either a numeric IP address or a hostname, and that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 .I any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 user on an approved host may connect to your gnuserv and execute arbitrary
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
213 Lisp (e.g., delete all your files).
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 If this file contains a lot of
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
215 hostnames then the server may take quite a long time to start up.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 .PP
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
217 When the MIT-MAGIC-COOKIE-1 protocol is enabled, an Internet socket
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 \fIis\fP opened by default. \fIgnuserv\fP will accept a connection from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 any host, and will wait for a "magic cookie" (essentially, a password)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 to be presented by the client. If the client doesn't present the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 cookie, or if the cookie is wrong, the authentication of the client is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 considered to have failed. At this point. \fIgnuserv\fP falls back to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 the GNUSERV-1 protocol; If the client is calling from a host listed in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 the GNU_SECURE file, the connection will be accepted, otherwise it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 will be rejected.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 .TP 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 .I Using MIT-MAGIC-COOKIE-1 authentication
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 When the \fIgnuserv\fP server is started, it looks for a cookie
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 defined for display 999 on the machine where it is running. If the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 cookie is found, it will be stored for use as the authentication
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 cookie. These cookies are defined in an authorization file (usually
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 ~/.Xauthority) that is manipulated by the X11 xauth(1) program. For
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 example, a machine "kali" which runs an emacs that invokes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 \fIgnuserv\fP should respond as follows (at the shell prompt) when set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 up correctly.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 .RS 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 kali% xauth list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 GS65.SP.CS.CMU.EDU:0 MIT-MAGIC-COOKIE-1 11223344
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 .br
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 KALI.FTM.CS.CMU.EDU:999 MIT-MAGIC-COOKIE-1 1234
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 .RE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 .RS 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 In the above case, the authorization file defines two cookies. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 second one, defined for screen 999 on the server machine, is used for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 gnuserv authentication.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 On the client machine's side, the authorization file must contain an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 identical line, specifying the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 .I server's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 cookie. In other words, on a machine "foobar" which wishes to connect
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 to "kali," the `xauth list' output should contain the line:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 .RS 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 KALI.FTM.CS.CMU.EDU:999 MIT-MAGIC-COOKIE-1 1234
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 .RE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 For more information on authorization files, take a look at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 xauth(1X11) man page, or invoke xauth interactively (without any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 arguments) and type "help" at the prompt. Remember that case in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 name of the authorization protocol (i.e.`MIT-MAGIC-COOKIE-1')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 .I is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 significant!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 .RE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 .SH ENVIRONMENT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 .B DISPLAY
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
273 Default X (or GTK) device for display of edit frame.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 .SH FILES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 .B /tmp/gsrv???
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 (SYSV_IPC only)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 .B /tmp/gsrvdir???/gsrv
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 (unix domain sockets only)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 .TP 8
2437
807b51903ed4 [xemacs-hg @ 2004-12-14 09:56:38 by stephent]
stephent
parents: 464
diff changeset
284 .B ~/.xemacs/init.el
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 XEmacs customization file, see xemacs(1).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 .SH SEE ALSO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 .TP 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 xauth(1X11), Xsecurity(1X11), gnuserv.el
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 .SH BUGS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 .PP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 NULs occurring in result strings don't get passed back to gnudoit properly.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 .SH AUTHOR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 Andy Norman (ange@hplb.hpl.hp.com), based heavily upon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 etc/emacsclient.c, etc/server.c and lisp/server.el from the GNU Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 18.52 distribution. Various modifications from Bob Weiner (weiner@mot.com),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 Darrell Kindred (dkindred@cmu.edu), Arup Mukherjee (arup@cmu.edu), Ben
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 Wing (ben@xemacs.org) and Hrvoje Niksic (hniksic@xemacs.org).
5428
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
300
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
301 .SH COPYING
5433
863f16484873 Added copyright notice with year 1998.
Mats Lidell <matsl@xemacs.org>
parents: 5428
diff changeset
302 Copyright
863f16484873 Added copyright notice with year 1998.
Mats Lidell <matsl@xemacs.org>
parents: 5428
diff changeset
303 .if t \(co
863f16484873 Added copyright notice with year 1998.
Mats Lidell <matsl@xemacs.org>
parents: 5428
diff changeset
304 .if n (C)
863f16484873 Added copyright notice with year 1998.
Mats Lidell <matsl@xemacs.org>
parents: 5428
diff changeset
305 1998 Andy Norman, Bob Weiner, Darrell Kindred, Arup Mukherjee, Ben
863f16484873 Added copyright notice with year 1998.
Mats Lidell <matsl@xemacs.org>
parents: 5428
diff changeset
306 Wing and Hrvoje Niksic.
5428
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
307
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
308 .PP
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
309 This file is part of XEmacs.
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
310 .PP
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
311 XEmacs is free software: you can redistribute it and/or modify it
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
312 under the terms of the GNU General Public License as published by the
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
313 Free Software Foundation, either version 3 of the License, or (at your
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
314 option) any later version.
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
315 .PP
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
316 XEmacs is distributed in the hope that it will be useful, but WITHOUT
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
317 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
318 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
319 for more details.
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
320 .PP
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
321 You should have received a copy of the GNU General Public License
73eef12660cd Converted gnuserv docs to GPLv3 or later.
Mats Lidell <matsl@xemacs.org>
parents: 2437
diff changeset
322 along with XEmacs. If not, see <http://www.gnu.org/licenses/>.