1RSTARTD(1)                  General Commands Manual                 RSTARTD(1)
2
3
4

NAME

6       rstartd - a sample implementation of a Remote Start rsh helper
7

SYNOPSIS

9       rstartd
10
11       rstartd.real [-c configfilename]
12

DESCRIPTION

14       Rstartd  is  an implementation of a Remote Start "helper" as defined in
15       "A Flexible Remote Execution Protocol Based on rsh".
16
17       This document describes the peculiarities of rstartd and how it is con‐
18       figured.
19

OPTIONS

21       -c configfilename
22               This  option  specifies  the  "global"  configuration file that
23               rstartd is to read.  Normally, rstartd is a shell  script  that
24               invokes rstartd.real with the -c switch, allowing local config‐
25               uration  of  the  location  of  the  configuration  file.    If
26               rstartd.real  is  started  without  the  -c  option,  it  reads
27               /usr/lib/X11/rstart/config.
28

INSTALLATION

30       It is critical to successful interoperation of the Remote Start  proto‐
31       col  that rstartd be installed in a directory which is in the "default"
32       search path, so that default rsh requests and the ilk will be  able  to
33       find it.
34

CONFIGURATION AND OPERATION

36       Rstartd  is  by design highly configurable.  One would like things like
37       configuration file locations to be fixed, so that users and administra‐
38       tors  can  find them without searching, but reality is that no two ven‐
39       dors will agree on where things should go, and nobody thinks the origi‐
40       nal  location  is "right".  Thus, rstartd allows one to relocate all of
41       its files and directories.
42
43       Rstartd has a hierarchy of configuration files which  are  executed  in
44       order when a request is made.  They are:
45       global config
46       per-user ("local") config
47       global per-context config
48       per-user ("local") per-context config
49       config from request
50       As  you  might guess from the presence of "config from request", all of
51       the config files are in the  format  of  an  rstart  request.   Rstartd
52       defines  a few additional keywords with the INTERNAL- prefix for speci‐
53       fying its configuration.
54
55       Rstartd starts by reading and executing the global config  file.   This
56       file  will  normally  specify  the locations of the other configuration
57       files and any systemwide defaults.
58
59       Rstartd will then read the  user's  local  config  file,  default  name
60       $HOME/.rstart.
61
62       Rstartd will then start interpreting the request.
63
64       Presumably  one  of  the  first  lines in the request will be a CONTEXT
65       line.  The context name is converted to lower case.
66
67       Rstartd will read the global config file for that context, default name
68       /usr/lib/X11/rstart/contexts/<name>, if any.
69
70       It will then read the user's config file for that context, default name
71       $HOME/.rstart.contexts/<name>, if any.
72
73       (If neither of these exists, rstartd aborts with a Failure message.)
74
75       Rstartd will finish interpreting the request, and execute  the  program
76       specified.
77
78       This  allows  the  system  administrator and the user a large degree of
79       control over the operation of rstartd.   The  administrator  has  final
80       say,  because the global config file doesn't need to specify a per-user
81       config file.  If it does, however, the user can override anything  from
82       the  global  file,  and  can even completely replace the global context
83       config files.
84
85       The config files have a somewhat more flexible format than requests do;
86       they  are  allowed  to contain blank lines and lines beginning with "#"
87       are comments and ignored.  (#s in the middle of  lines  are  data,  not
88       comment markers.)
89
90       Any  commands  run  are  provided a few useful pieces of information in
91       environment variables.  The exact names are configurable, but the  sup‐
92       plied defaults are:
93       $RSTART_CONTEXT          the name of the context
94       $RSTART_GLOBAL_CONTEXTS  the global contexts directory
95       $RSTART_LOCAL_CONTEXTS   the local contexts directory
96       $RSTART_GLOBAL_COMMANDS  the global generic commands directory
97       $RSTART_LOCAL_COMMANDS   the local generic commands directory
98       $RSTART_{GLOBAL,LOCAL}_CONTEXTS should contain one special file, @List,
99       which contains a list of the contexts in that directory in  the  format
100       specified  for ListContexts.  The supplied version of ListContexts will
101       cat both the global and local copies of @List.
102
103       Generic commands are searched for in several places: (defaults)
104       per-user per-context directory ($HOME/.rstart.commands/<context>)
105       global per-context directory (/usr/lib/X11/rstart/commands/<context>)
106       per-user all-contexts directory ($HOME/.rstart.commands)
107       global all-contexts directory (/usr/lib/X11/rstart/commands)
108       (Yes, this means you can't have an all-contexts  generic  command  with
109       the same name as a context.  It didn't seem like a big deal.)
110
111       Each  of  these  directories should have a file called @List that gives
112       the names and descriptions of the commands in  that  directory  in  the
113       format specified for ListGenericCommands.
114

CONFIGURATION KEYWORDS

116       There are several "special" rstart keywords defined for rstartd config‐
117       uration.  Unless otherwise specified, there are  no  defaults;  related
118       features are disabled in this case.
119
120       INTERNAL-REGISTRIES name ...
121               Gives  a  space-separated  list  of "MISC" registries that this
122               system understands.  (Registries other than this  are  accepted
123               but generate a Warning.)
124
125       INTERNAL-LOCAL-DEFAULT relative_filename
126               Gives the name ($HOME relative) of the per-user config file.
127
128       INTERNAL-GLOBAL-CONTEXTS absolute_directory_name
129               Gives the name of the system-wide contexts directory.
130
131       INTERNAL-LOCAL-CONTEXTS relative_directory_name
132               Gives the name ($HOME relative) of the per-user contexts direc‐
133               tory.
134
135       INTERNAL-GLOBAL-COMMANDS absolute_directory_name
136               Gives the name of the system-wide generic commands directory.
137
138       INTERNAL-LOCAL-COMMANDS relative_directory_name
139               Gives the name ($HOME relative) of the  per-user  generic  com‐
140               mands directory.
141
142       INTERNAL-VARIABLE-PREFIX prefix
143               Gives  the  prefix  for the configuration environment variables
144               rstartd passes to its kids.
145
146       INTERNAL-AUTH-PROGRAM authscheme program argv[0] argv[1] ...
147               Specifies the program to run to set up authentication  for  the
148               specified  authentication  scheme.  "program argv[0] ..." gives
149               the program to run and its arguments, in the same form  as  the
150               EXEC keyword.
151
152       INTERNAL-AUTH-INPUT authscheme
153               Specifies  the data to be given to the authorization program as
154               its standard input.  Each argument is passed as a single  line.
155               $n,  where  n  is a number, is replaced by the n'th argument to
156               the "AUTH authscheme arg1 arg2 ..." line.
157
158       INTERNAL-PRINT arbitrary text
159               Prints its arguments as a Debug message.   Mostly  for  rstartd
160               debugging, but could be used to debug config files.
161

NOTES

163       When  using  the  C shell, or any other shell which runs a script every
164       time the shell is started, the script may get run  several  times.   In
165       the worst case, the script may get run three times:
166       By rsh, to run rstartd
167       By rstartd, to run the specified command
168       By the command, eg xterm
169       rstartd currently limits lines, both from config files and requests, to
170       BUFSIZ bytes.
171
172       DETACH is implemented by redirecting file descriptors  0,1,  and  2  to
173       /dev/null and forking before executing the program.
174
175       CMD  is  implemented by invoking $SHELL (default /bin/sh) with "-c" and
176       the specified command as arguments.
177
178       POSIX-UMASK is implemented in the obvious way.
179
180       The authorization programs are run in the same context  as  the  target
181       program  - same environment variables, path, etc.  Long term this might
182       be a problem.
183
184       In the X context, GENERIC-CMD Terminal runs xterm.  In the  OpenWindows
185       context, GENERIC-CMD Terminal runs cmdtool.
186
187       In  the X context, GENERIC-CMD LoadMonitor runs xload.  In the OpenWin‐
188       dows context, GENERIC-CMD LoadMonitor runs perfmeter.
189
190       GENERIC-CMD ListContexts lists the contents of @List in both  the  sys‐
191       tem-wide  and  per-user  contexts  directories.  It is available in all
192       contexts.
193
194       GENERIC-CMD ListGenericCommands lists the contents of @List in the sys‐
195       tem-wide  and  per-user commands directories, including the per-context
196       subdirectories for the current context.  It is available  in  all  con‐
197       texts.
198
199       CONTEXT None is not implemented.
200
201       CONTEXT Default is really dull.
202
203       For  installation  ease,  the  "contexts" directory in the distribution
204       contains a file "@Aliases" which lists a context name and  aliases  for
205       that  context.   This file is used to make symlinks in the contexts and
206       commands directories.
207
208       All MISC values are passed unmodified as environment variables.
209
210       One can mistreat rstartd in any number of ways, resulting  in  anything
211       from  stupid  behavior to core dumps.  Other than by explicitly running
212       programs I don't think it can write or delete any files, but there's no
213       guarantee  of  that.  The important thing is that (a) it probably won't
214       do anything REALLY stupid and (b) it runs with the user's  permissions,
215       so it can't do anything catastrophic.
216
217       @List  files  need not be complete; contexts or commands which are dull
218       or which need not or should not be advertised need not be  listed.   In
219       particular,  per-user  @List  files should not list things which are in
220       the system-wide @List files.  In the future, perhaps  ListContexts  and
221       ListGenericCommands  will automatically suppress lines from the system-
222       wide files when there are per-user replacements for those lines.
223
224       Error handling is OK to weak.  In particular, no  attempt  is  made  to
225       properly  report  errors  on the exec itself.  (Perversely, exec errors
226       could be reliably reported when detaching, but  not  when  passing  the
227       stdin/out socket to the app.)
228
229       If compiled with -DODT1_DISPLAY_HACK, rstartd will work around a bug in
230       SCO ODT version 1.  (1.1?)  (The bug is that the X clients are all com‐
231       piled  with  a  bad library that doesn't know how to look host names up
232       using DNS.  The fix is to look up a host name in $DISPLAY  and  substi‐
233       tute  an  IP address.)  This is a trivial example of an incompatibility
234       that rstart can hide.
235

SEE ALSO

237       rstart(1), rsh(1), A Flexible Remote Execution Protocol Based on rsh
238

AUTHOR

240       Jordan Brown, Quarterdeck Office Systems
241
242
243
244X Version 11                     rstart 1.0.2                       RSTARTD(1)
Impressum