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
47
48
49
50RSTARTD(1)                  General Commands Manual                 RSTARTD(1)
51
52
53

NAME

55       rstartd - a sample implementation of a Remote Start rsh helper
56

SYNOPSIS

58       rstartd
59
60       rstartd.real [-c configfilename]
61

DESCRIPTION

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

OPTIONS

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

INSTALLATION

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

CONFIGURATION AND OPERATION

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

CONFIGURATION KEYWORDS

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

NOTES

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

SEE ALSO

286       rstart(1), rsh(1), A Flexible Remote Execution Protocol Based on rsh
287

AUTHOR

289       Jordan Brown, Quarterdeck Office Systems
290
291
292
293X Version 11                     rstart 1.0.2                       RSTARTD(1)
Impressum