Skip navigation.
Home
The QNX Community Portal

View topic - How do I automatically start a program

How do I automatically start a program

Read-only archive of qnx.public.sysadmin at inn.qnx.com

How do I automatically start a program

Postby glansberry » 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
glansberry
Active Member
 
Posts: 13
Joined: Wed Feb 04, 2004 1:41 pm

Re: How do I automatically start a program

Postby 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

Miguel Simon
 

inetd problem

Postby EdizonTN » 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.
EdizonTN
New Member
 
Posts: 4
Joined: Fri Oct 01, 2004 7:29 am

Re: inetd problem

Postby 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.
Xiaodan Tang
 


Return to qnx.public.sysadmin

Who is online

Users browsing this forum: No registered users and 1 guest