Autologin

Please, How to do autologin on QNX Neutrino 6.2?

Gonzalo.

Gonzalo Chac?n <chgonzalo@tutopia.com> wrote:

Please, How to do autologin on QNX Neutrino 6.2?

Autologin into Photon I assume?

http://www.qnx.com/support/sd_bok/solution.qnx?10354

chris

\

Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Chris McKillop <cdm@qnx.com> wrote:

Gonzalo Chac?n <> chgonzalo@tutopia.com> > wrote:
Please, How to do autologin on QNX Neutrino 6.2?


Autologin into Photon I assume?

http://www.qnx.com/support/sd_bok/solution.qnx?10354

Turns out this doesn’t work 100%. And I don’t have a good answer to
make it work 100%. Wojtek?

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Chris McKillop wrote:

Chris McKillop <> cdm@qnx.com> > wrote:

Gonzalo Chac?n <> chgonzalo@tutopia.com> > wrote:

Please, How to do autologin on QNX Neutrino 6.2?


Autologin into Photon I assume?

http://www.qnx.com/support/sd_bok/solution.qnx?10354

Turns out this doesn’t work 100%. And I don’t have a good answer to
make it work 100%. Wojtek?

The above recommends to export LOGNAME and HOME and run the ph script
from rc.local. This may be good enough in some situations, but the
Photon environment that it creates is different from the environment
created by logging in.

Exporting LOGNAME and HOME just fools the ph script into thinking that
it was started from command line, and therefore there’s no need to log
you in, run your .profile, or do any of the normal things that login and
phlogin do. As a result, you end up running as root, with some pieces
of configuration (shelf, background, etc.) taken from the $HOME you
exported, but without any of the environment that /etc/profile and
root’s or $LOGNAME’s ~/.profile normally sets up. And your pterms will
run root’s shell, not yours. And any program that uses getlogin()
rather than getenv() to find out who you are or where your home direcory
is will know that you’re really root.

If you need a better approximation of the environment that logging in
gives you, there are other ways, but none of the is perfect:

1 Create a user whose .profile starts Photon. Run “login -f username”
to automatically log him in.

2 In your rc.local, start

Photon -l ‘/usr/photon/bin/phlogin -OUuser:password’

and then run the ph script. The ph script won’t launch another Photon
if one is already running.