1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47RSTARTD(1)                  General Commands Manual                 RSTARTD(1)
48
49
50

NAME

52       rstartd - a sample implementation of a Remote Start rsh helper
53

SYNOPSIS

55       rstartd
56
57       rstartd.real [-c configfilename]
58

DESCRIPTION

60       Rstartd  is  an implementation of a Remote Start "helper" as defined in
61       "A Flexible Remote Execution Protocol Based on rsh".
62
63       This document describes the peculiarities of rstartd and how it is con‐
64       figured.
65

OPTIONS

67       -c configfilename
68               This  option  specifies  the  "global"  configuration file that
69               rstartd is to read.  Normally, rstartd is a shell  script  that
70               invokes rstartd.real with the -c switch, allowing local config‐
71               uration  of  the  location  of  the  configuration  file.    If
72               rstartd.real  is  started  without  the  -c  option,  it  reads
73               /usr/lib/X11/rstart/config.
74

INSTALLATION

76       It is critical to successful interoperation of the Remote Start  proto‐
77       col  that rstartd be installed in a directory which is in the "default"
78       search path, so that default rsh requests and the ilk will be  able  to
79       find it.
80

CONFIGURATION AND OPERATION

82       Rstartd  is  by design highly configurable.  One would like things like
83       configuration file locations to be fixed, so that users and administra‐
84       tors  can  find them without searching, but reality is that no two ven‐
85       dors will agree on where things should go, and nobody thinks the origi‐
86       nal  location  is "right".  Thus, rstartd allows one to relocate all of
87       its files and directories.
88
89       Rstartd has a hierarchy of configuration files which  are  executed  in
90       order when a request is made.  They are:
91       global config
92       per-user ("local") config
93       global per-context config
94       per-user ("local") per-context config
95       config from request
96       As  you  might guess from the presence of "config from request", all of
97       the config files are in the  format  of  an  rstart  request.   Rstartd
98       defines  a few additional keywords with the INTERNAL- prefix for speci‐
99       fying its configuration.
100
101       Rstartd starts by reading and executing the global config  file.   This
102       file  will  normally  specify  the locations of the other configuration
103       files and any systemwide defaults.
104
105       Rstartd will then read the  user's  local  config  file,  default  name
106       $HOME/.rstart.
107
108       Rstartd will then start interpreting the request.
109
110       Presumably  one  of  the  first  lines in the request will be a CONTEXT
111       line.  The context name is converted to lower case.
112
113       Rstartd will read the global config file for that context, default name
114       /usr/lib/X11/rstart/contexts/<name>, if any.
115
116       It will then read the user's config file for that context, default name
117       $HOME/.rstart.contexts/<name>, if any.
118
119       (If neither of these exists, rstartd aborts with a Failure message.)
120
121       Rstartd will finish interpreting the request, and execute  the  program
122       specified.
123
124       This  allows  the  system  administrator and the user a large degree of
125       control over the operation of rstartd.   The  administrator  has  final
126       say,  because the global config file doesn't need to specify a per-user
127       config file.  If it does, however, the user can override anything  from
128       the  global  file,  and  can even completely replace the global context
129       config files.
130
131       The config files have a somewhat more flexible format than requests do;
132       they  are  allowed  to contain blank lines and lines beginning with "#"
133       are comments and ignored.  (#s in the middle of  lines  are  data,  not
134       comment markers.)
135
136       Any  commands  run  are  provided a few useful pieces of information in
137       environment variables.  The exact names are configurable, but the  sup‐
138       plied defaults are:
139       $RSTART_CONTEXT          the name of the context
140       $RSTART_GLOBAL_CONTEXTS  the global contexts directory
141       $RSTART_LOCAL_CONTEXTS   the local contexts directory
142       $RSTART_GLOBAL_COMMANDS  the global generic commands directory
143       $RSTART_LOCAL_COMMANDS   the local generic commands directory
144       $RSTART_{GLOBAL,LOCAL}_CONTEXTS should contain one special file, @List,
145       which contains a list of the contexts in that directory in  the  format
146       specified  for ListContexts.  The supplied version of ListContexts will
147       cat both the global and local copies of @List.
148
149       Generic commands are searched for in several places: (defaults)
150       per-user per-context directory ($HOME/.rstart.commands/<context>)
151       global per-context directory (/usr/lib/X11/rstart/commands/<context>)
152       per-user all-contexts directory ($HOME/.rstart.commands)
153       global all-contexts directory (/usr/lib/X11/rstart/commands)
154       (Yes, this means you can't have an all-contexts  generic  command  with
155       the same name as a context.  It didn't seem like a big deal.)
156
157       Each  of  these  directories should have a file called @List that gives
158       the names and descriptions of the commands in  that  directory  in  the
159       format specified for ListGenericCommands.
160

CONFIGURATION KEYWORDS

162       There are several "special" rstart keywords defined for rstartd config‐
163       uration.  Unless otherwise specified, there are  no  defaults;  related
164       features are disabled in this case.
165
166       INTERNAL-REGISTRIES name ...
167               Gives  a  space-separated  list  of "MISC" registries that this
168               system understands.  (Registries other than this  are  accepted
169               but generate a Warning.)
170
171       INTERNAL-LOCAL-DEFAULT relative_filename
172               Gives the name ($HOME relative) of the per-user config file.
173
174       INTERNAL-GLOBAL-CONTEXTS absolute_directory_name
175               Gives the name of the system-wide contexts directory.
176
177       INTERNAL-LOCAL-CONTEXTS relative_directory_name
178               Gives the name ($HOME relative) of the per-user contexts direc‐
179               tory.
180
181       INTERNAL-GLOBAL-COMMANDS absolute_directory_name
182               Gives the name of the system-wide generic commands directory.
183
184       INTERNAL-LOCAL-COMMANDS relative_directory_name
185               Gives the name ($HOME relative) of the  per-user  generic  com‐
186               mands directory.
187
188       INTERNAL-VARIABLE-PREFIX prefix
189               Gives  the  prefix  for the configuration environment variables
190               rstartd passes to its kids.
191
192       INTERNAL-AUTH-PROGRAM authscheme program argv[0] argv[1] ...
193               Specifies the program to run to set up authentication  for  the
194               specified  authentication  scheme.  "program argv[0] ..." gives
195               the program to run and its arguments, in the same form  as  the
196               EXEC keyword.
197
198       INTERNAL-AUTH-INPUT authscheme
199               Specifies  the data to be given to the authorization program as
200               its standard input.  Each argument is passed as a single  line.
201               $n,  where  n  is a number, is replaced by the n'th argument to
202               the "AUTH authscheme arg1 arg2 ..." line.
203
204       INTERNAL-PRINT arbitrary text
205               Prints its arguments as a Debug message.   Mostly  for  rstartd
206               debugging, but could be used to debug config files.
207

NOTES

209       When  using  the  C shell, or any other shell which runs a script every
210       time the shell is started, the script may get run  several  times.   In
211       the worst case, the script may get run three times:
212       By rsh, to run rstartd
213       By rstartd, to run the specified command
214       By the command, eg xterm
215       rstartd currently limits lines, both from config files and requests, to
216       BUFSIZ bytes.
217
218       DETACH is implemented by redirecting file descriptors  0,1,  and  2  to
219       /dev/null and forking before executing the program.
220
221       CMD  is  implemented by invoking $SHELL (default /bin/sh) with "-c" and
222       the specified command as arguments.
223
224       POSIX-UMASK is implemented in the obvious way.
225
226       The authorization programs are run in the same context  as  the  target
227       program  - same environment variables, path, etc.  Long term this might
228       be a problem.
229
230       In the X context, GENERIC-CMD Terminal runs xterm.  In the  OpenWindows
231       context, GENERIC-CMD Terminal runs cmdtool.
232
233       In  the X context, GENERIC-CMD LoadMonitor runs xload.  In the OpenWin‐
234       dows context, GENERIC-CMD LoadMonitor runs perfmeter.
235
236       GENERIC-CMD ListContexts lists the contents of @List in both  the  sys‐
237       tem-wide  and  per-user  contexts  directories.  It is available in all
238       contexts.
239
240       GENERIC-CMD ListGenericCommands lists the contents of @List in the sys‐
241       tem-wide  and  per-user commands directories, including the per-context
242       subdirectories for the current context.  It is available  in  all  con‐
243       texts.
244
245       CONTEXT None is not implemented.
246
247       CONTEXT Default is really dull.
248
249       For  installation  ease,  the  "contexts" directory in the distribution
250       contains a file "@Aliases" which lists a context name and  aliases  for
251       that  context.   This file is used to make symlinks in the contexts and
252       commands directories.
253
254       All MISC values are passed unmodified as environment variables.
255
256       One can mistreat rstartd in any number of ways, resulting  in  anything
257       from  stupid  behavior to core dumps.  Other than by explicitly running
258       programs I don't think it can write or delete any files, but there's no
259       guarantee  of  that.  The important thing is that (a) it probably won't
260       do anything REALLY stupid and (b) it runs with the user's  permissions,
261       so it can't do anything catastrophic.
262
263       @List  files  need not be complete; contexts or commands which are dull
264       or which need not or should not be advertised need not be  listed.   In
265       particular,  per-user  @List  files should not list things which are in
266       the system-wide @List files.  In the future, perhaps  ListContexts  and
267       ListGenericCommands  will automatically suppress lines from the system-
268       wide files when there are per-user replacements for those lines.
269
270       Error handling is OK to weak.  In particular, no  attempt  is  made  to
271       properly  report  errors  on the exec itself.  (Perversely, exec errors
272       could be reliably reported when detaching, but  not  when  passing  the
273       stdin/out socket to the app.)
274
275       If compiled with -DODT1_DISPLAY_HACK, rstartd will work around a bug in
276       SCO ODT version 1.  (1.1?)  (The bug is that the X clients are all com‐
277       piled  with  a  bad library that doesn't know how to look host names up
278       using DNS.  The fix is to look up a host name in $DISPLAY  and  substi‐
279       tute  an  IP address.)  This is a trivial example of an incompatibility
280       that rstart can hide.
281

SEE ALSO

283       rstart(1), rsh(1), A Flexible Remote Execution Protocol Based on rsh
284

AUTHOR

286       Jordan Brown, Quarterdeck Office Systems
287
288
289
290X Version 11                     rstart 1.0.2                       RSTARTD(1)
Impressum