Log into Photon
phlogin [options] phlogin2 [options]
| If you specify both a user name and password (or the name of a
user who doesn't have a password), the command phlogin
executes runs in parallel with the script that has just launched
Photon. You should make sure that this doesn't create dangerous
For example, the default command that phlogin executes is the ph script. It starts an input driver if one isn't running yet. It may happen that both scripts decide to run an input driver at the same time. Instead of allowing phlogin to run the default ph script, it's better to use a modified version that doesn't attempt to do things that the script that launched Photon takes care of already.
If the -L option is present, -O is the default; -R if not.
The phlogin and phlogin2 utilities are typically used for nodes that boot directly into Photon or for users who start Photon via a phindows or phditto session.
|You can't start these utilities from the command line -- Photon runs one of them automatically if it was started with the -l option. The ph script sets that option if the LOGNAME environment variable isn't set, in particular when tinit is executed with the -p option (which runs the ph script). To pass command line arguments to phlogin or phlogin2, use Photon's -l option. For more information on how to start Photon without using the ph script, see Photon in Embedded Systems in the Photon Programmer's Guide.|
The phlogin utility prompts you to enter a userid and optional password through the Photon Login dialog. The phlogin2 utility is a simplified alternative to the phlogin utility. In either utility, you can also click on an Exit or Shutdown button to return to the text-mode console (this runs phlogin or phlogin2 with the -S shutdown command). To prevent users from exiting to text mode, you can disable this button by setting the PHEXIT_DISABLE environment variable to 1.
You can create a configuration file that specifies command line arguments for your shell to run as a login shell. You might want to do this if you require your .profile script to run, for example. The configuration file must have the same name as the shell, and be located in these folders, searched in this order:
The configuration file can contain any number of blank lines and comments, followed by a single line of command-line arguments for your shell, including argv. Arguments must be separated by white space. Lines starting with # are comments. The path to ph is appended to the arguments. You can use a backslash to escape a white space character, a backslash, or the # character.
The default is:
This is equivalent to running your shell with:
There is no way to specify an empty argument.
The pathname of the ph script is always appended as a separate argument. There is no way to glue it to some other string to form a single argument.
You can pass command line options to phlogin or phlogin2 when you start Photon by using the -l option. For example:
Photon -l 'phlogin -S "myshutdown -v"'
will cause Photon to run phlogin -S "myshutdown -v".
These environment variables affect phlogin and phlogin2:
login, ph, tinit
Logging In, Logging Out, and Shutting Down and Managing User Accounts in the Neutrino User's Guide