[Previous] [Contents] [Index] [Next]

phlogin, phlogin2

Log into Photon

Syntax:

phlogin [options]

phlogin2 [options]

Options:

-B
phlogin only.
Use slow machine screensaver mode. Forces phlogin to use a different screensaver mode (see option -T). Normally, when phlogin enters the screensaver mode, it moves the login dialog smoothly around the screen. If the graphics driver doesn't support hardware blitting, "Slow machine" mode is used, meaning the login dialog is moved to random locations on the screen.
-g file
phlogin only.
Use the given file for the welcome image.
-i
phlogin only.
Don't wait for an input driver.
-L command
Command to run (defaults to ph).
-n
phlogin2 only.
Disable the user selector icons.
-O
Once: on close, terminate Photon even if $PHINSTANCE is greater than 1. This mode is used when you run Photon remotely from Phindows or phditto.
-P command
Initialization command. For example: phlogin -P "show_splashscreen /etc/config/splash.jpg" - p configure_display. These commands are run in order before the login dialog is displayed.
-p command
One-time initialization command. This option is the same as -P, except the command is run only if $PHINSTANCE is 1.
-R
Repeat: don't terminate Photon if $PHINSTANCE is greater than 1.
-S command
Shutdown command.
-T time
phlogin only.
Enter the "screensaver" mode after this number of seconds.
-U user[:password]
phlogin only.
The user to log in as, and optionally the password to use.
-X
Don't display the dialog's Exit button.

If the -L option is present, -O is the default; -R if not.

Description:

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.


Note: You can't start these utilities from the command line -- the server runs it automatically when starting Photon without the LOGNAME environment variable set, or when tinit is executed with the -p option. To pass command line arguments to phlogin or phlogin2, use Photon's -l option.

The phlogin utility prompts the user 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, the user 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:

  1. ~/.ph/login/shells/
  2. /etc/photon/login/shells/

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[0]. 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:

- -c

This is equivalent to running your shell with:


Note:

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".

Environment variables:

These environment variables affect phlogin and phlogin2:

LOGNAME
If this environment variable isn't set (such as when ph is run in the sysinit file), ph runs the phlogin utility.
PHLOGIN_NO_FACES
If this environment variable is set, phlogin2 does not display the the user selector icons.
PHEXIT_DISABLE
Turn off the Exit button so that users won't be able to exit to text mode.
PHINSTANCE
A counter that increments every time phlogin or phlogin2 is launched. This environment variable is used by the -O option to detect whether phlogin or phlogin2 has been run more than once.

See also:

login, ph, tinit

Logging In, Logging Out, and Shutting Down and Managing User Accounts in the Neutrino User's Guide


[Previous] [Contents] [Index] [Next]