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.
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:
clean the stuff you added in rc.sysinit (LOGNAME… HOME …)
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”
make sure the /etc/rc.d/rc.local is executable:
chmod a+x /etc/rc.d/rc.local
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