Previous Topic: Choose a Protection ModeNext Topic: Change the Screen Lock Icon


Set Stations to Lock When Idle

The selock utility lets you lock idle stations to prevent unauthorized access to these stations when they are left idle.

To set stations to lock when idle

  1. (Optional) Set the DISPLAY environment variable.

    For the selock command to work, you must set the DISPLAY environment variable. However, you can specify the target display directly in the selock command instead.

  2. Place the selock command in the user's login script (the .login file).

    Alternatively, you can place the selock command in the /etc/login or /etc/cshrc file.

Note: Two users can always unlock a locked screen. By default, these users are the current user and root. However, you can replace root with any other user if you specify the other user's name in the unlocking_user token, located in the [selock] section of the seos.ini file. You can replace the current user with any other user by using the ‑user option when executing selock.

Example: Idle station lockup command in a startup file

The following is a typical startup command, suitable to be placed in X startup files:

selock ‑display $DISPLAY ‑timeout 5

This command activates selock after five minutes of terminal inactivity.

We recommend that you place the following line in the global xstartup script. The xstartup script usually resides in the directory /usr/lib/X11/xdm/Xstartup.

selock ‑display $DISPLAY ‑user $USER ‑timeout 3 &

This statement enforces use of the terminal locking program for all users who are using X terminals.

More information:

selock Utility—Lock the X Terminal Screen