View topic - Autologin

Autologin

Read-only archive of qnx.rtos (Writing resources managers, and general discussion around the QNX Neutrino RTOS) at inn.qnx.com

Autologin

Postby chgonzalo » Thu Jan 22, 2004 1:54 pm

Please, How to do autologin on QNX Neutrino 6.2?

Gonzalo.
chgonzalo
New Member
 
Posts: 1
Joined: Wed Oct 29, 2003 7:38 pm

Re: Autologin

Postby cdm » Thu Jan 22, 2004 4:19 pm

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/
cdm
QNX Master
 
Posts: 789
Joined: Fri Jul 05, 2002 9:38 am

Re: Autologin

Postby cdm » Fri Jan 23, 2004 7:28 pm

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/
cdm
QNX Master
 
Posts: 789
Joined: Fri Jul 05, 2002 9:38 am

Re: Autologin

Postby Wojtek Lerch » Thu Jan 29, 2004 10:09 pm

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.
Wojtek Lerch
 


Return to qnx.rtos

Who is online

Users browsing this forum: No registered users and 1 guest