View topic - About QNX6.2.1 Automatic log-in

About QNX6.2.1 Automatic log-in

Discussion about the QNX6 OS.

About QNX6.2.1 Automatic log-in

Postby wsqrong » Fri Dec 03, 2004 9:30 am

I have changed the /etc/rc.d/rc.sysini. In this file, I added like this:

LOGNAME=root HOME=/root PATH=/bin:/usr/bin……

Then when reboot my computer, the QNX can automatic log-in,
without any passwd. But about this user, I have set up the password.
The more important thing is, though has started to under root users, the system has not run .profile. So, have not set up success in a lot of
environmental variables.

In fact, I want to start QNX system automatically, and operate
the software that I designed automatically after starting.

Hope everybody gives directions , thanks a lot.
wsqrong
New Member
 
Posts: 2
Joined: Fri Dec 03, 2004 9:11 am

Postby noc » Fri Dec 03, 2004 6:05 pm

Is the software you designed a Photon application or a normal text based app?

Since you want your Photon to be automatically started as root, why do you need to create a different user?
noc
Senior Member
 
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am

Postby noc » Fri Dec 03, 2004 6:39 pm

Assuming you want Photon to be auto started as the new user, say, "myuser", and your own application is a Photon GUI application called "myapp" located in /usr/bin.

Here are the steps:
1) clean the stuff you added in rc.sysinit (LOGNAME... HOME ...)

2) create a file /etc/rc.d/rc.local if it is not already there, add the following lines at the end of rc.local

/bin/su - myuser -c "/usr/bin/ph"

3) make sure the /etc/rc.d/rc.local is executable:
chmod a+x /etc/rc.d/rc.local

4) In the new user's home directory:
mkdir -p .ph
cd .ph
vi phapps
and add your own application in there:
/usr/bin/myapp &
save the "phapps" file and make it executable
chmod a+x phapps

That's it.
noc
Senior Member
 
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am

Postby wsqrong » Mon Dec 06, 2004 2:15 am

The problem has been solved,
thank you for your answers very much.
wsqrong
New Member
 
Posts: 2
Joined: Fri Dec 03, 2004 9:11 am

Postby jinma » Thu Aug 24, 2006 11:06 pm

what if I want to log in as root in photon automatically? Do I do the below?

/bin/su -root -c "/usr/bin/ph"
jinma
Senior Member
 
Posts: 428
Joined: Thu Oct 28, 2004 10:13 pm

Postby noc » Fri Aug 25, 2006 12:07 am

Yours looks good, except that you need a space before root:

/bin/su - root -c "/usr/bin/ph"
noc
Senior Member
 
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 3 guests