How do I automatically start a program

So, we have written this great application. We can login to our qnx
target, copy the file over and run it. Now we want the machine to run the
application every time it powers up, without requiring someone to log in.
Where is the equivalent of MS-DOS’ autoexec.bat file? Do I create a file
called RC and put it in the etc directory?

Thanks

Hi Geoff

Go to /etc/rc.d and create a file called rc.local, in it (among other
things) you can start a program on startup if you write a line such as:

on -t con2 /usr/local/bin/rtw.2.d
on -t con3 /usr/local/bin/rtw.3.d
on -t con4 /usr/local/bin/rtw.4.d

This will start a program called ‘rtwd.2.d’ located in /usr/local/bin in
console # 2, ‘rtwd.3.d’ in console 3, etc. If you want the programs to
never die, look into the HAM framework. Also look at other options for
‘on’. Make sure that the rc.local file has executable permission.

Regards…

Miguel.



Geoff Lansberry wrote:

So, we have written this great application. We can login to our qnx
target, copy the file over and run it. Now we want the machine to run the
application every time it powers up, without requiring someone to log in.
Where is the equivalent of MS-DOS’ autoexec.bat file? Do I create a file
called RC and put it in the etc directory?

Thanks

Hallo

I have a problem with inetd.
I cannot start inetd.Where is .log file about inetd errors?
How I set to automaticaly starting inetd daemon?

-ed.

inetd will automaticlly go to daemon mode (background) after start.
You sure it is not running after you start it first time? Does pidin show
it exist? Does netstat -a show something ?

inetd send it’s errors to syslog, so start syslogd correctly first, would
give you some idea of what is inetd doing. You can also start inetd
with -d where it is in debug mode, and won’t go back ground.

To auto-start inetd, creat /etc/rc.d/rc.local, chmod a+x it, and start
inetd in that file.

-xtang



ed <edizon@softhome.net> wrote in message news:c7vf8p$ohp$1@inn.qnx.com

Hallo

I have a problem with inetd.
I cannot start inetd.Where is .log file about inetd errors?
How I set to automaticaly starting inetd daemon?

-ed.