I received a couple dozen responses and several me-too's. I was already
aware that I could run a program from rc.local, I did not know how to
bypass the login, start openwindows and then start the program. Responses
fell into these categories:
1)invoke the program from /etc/rc.local
(which would not work for reasons stated above)
2)invoke the program from /etc/rc.local using:
exec su - user -c openwin
and make sure that the user invokes this program in $HOME/.xinitrc or
$HOME/.openwin-init -- whichever is appropriate. If you use somethimg
else to start your window system server (eg xinit) then use that
3) invoke the program from /etc/rc.local using a shell script:
Create a non-interactive shell script, that startups up openwindows in the
background, sleeps for 5 minutes say, then startup up his program in the
background as well. Then execute the wait command.
Add the shell script to the /etc/rc.local file.
su - USER_NAME -c SHELL SCRIPT > LOG_FILE 2>&1 LOG_FILE
Make sure you set the following parameters
setenv OPENWINHOME /usr/openwin
setenv LD_LIBRARY_PATH /usr/openwin/lib
setenv DISPLAY `/usr/bin/hostname`:0.0
setenv PATH /usr/openwin/bin/xview:/usr/openwin/bin:/usr/ucb:/usr/bin:/usr/etc
To test the shell script have the user login to the console then use the
at command startup the shell script in say a few minutes. Then immediately
4) Get 'rc.user' from the net. It does just what you're asking.
5) Use a batch program like the one available from UofWaterloo.
6) Suggestions regarding xdm (which we do not run).
Many people sent specific examples. I am very grateful for everyone's
help. We are going for #4 and if that doesn't work out, we'll put together
a shell script to be run from rc.local. I can provide more detailed info
for anyone who needs it. Thanks to:
email@example.com and anyone else I missed...
|I have a user who needs to ensure that his program will start up
|again on boot up if there is a power loss that causes the computer
|to reboot. The program is running on a SS2 using Openlook window
|manager and lots of graphics routines. Is there a way to circum-
|vent the login and restart such programs directly at boot up?
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:40 CDT