How do I automatically start a program

bridged with qnx.public.sysadmin
Post Reply
Geoff Lansberry

How do I automatically start a program

Post by Geoff Lansberry » Wed May 05, 2004 5:48 pm

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

Miguel Simon

Re: How do I automatically start a program

Post by Miguel Simon » Thu May 06, 2004 2:20 am

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

ed

inetd problem

Post by ed » Thu May 13, 2004 9:31 am

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.

Xiaodan Tang

Re: inetd problem

Post by Xiaodan Tang » Fri May 14, 2004 1:54 am

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.

Post Reply

Return to “qnx.public.sysadmin”