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

Configuring an X Session Manager

An X session manager controls the login process. It accepts your login account and pathname, checks the password file, selects a system shell, and sets up the user's environment. The X session manager starts clients automatically when users log in and closes sessions automatically when users log out.

This chapter discusses how you configure a session manager. Topics include:

Your Default X Session Manager

If you have CDE installed on your host, you can use dtlogin as your X session manager. Otherwise, use whichever X session manager is available to you:

Customizing Colors, Fonts and Other Application Defaults

You can specify colors, fonts, and other application defaults in the .Xdefaults file. If you do not have an .Xdefaults file in your home directory, copy one of the following files:

The values that you specify in the .Xdefaults file override the values specified in the /usr/lib/X11/app-defaults directory.

Selecting an X Session Server

No matter which X session management program is available on your system, XDMCP is the underlying mechanism that makes the login process automatic.

By default, HP X stations are configured to use [XDMCP Direct] as their startup mode, and the default X session server is the file server. However, you can configure the X station to any of four types of XDMCP operation:

You can change the default X session server in the remote configuration file or from the [Server] configuration screen.

If you choose XDMCP Direct to host(s) or Indirect, you must also specify the host name or IP address of the X session server.

XDMCP Direct to host(s)

The X station sends a request to the specified host computer (if no host is specified, the request is sent to the file server). This is the default configuration and is preferred if you always want a particular X station to use the same host.

If there are several hosts that the X station could use, you can specify these host names in the [Login Host] field as a comma-separated list. If the first host on the list times out or does not respond, the request will be sent to each host in sequence until a connection can be made.

If you want to log into a remote host (one that is outside of a gateway), follow these steps:

  1. From the [Server] configuration screen, select [XDMCP Direct].

  2. Type in the name of the host in the field Login Host

  3. Click on [OK].

  4. Exit from your current session.

Alternatively, you can specify a remote host from the Select Session Manager screen:

  1. From the Select Session Manager screen, click on the [Direct] button.

  2. Fill in the Host Address (Name) field with the IP address or host name of the host you want to log into.

  3. Click on [Connect].

XDMCP Broadcast

The X station sends a request to all the hosts on the local subnet and the hosts that are willing to supply X session manager services respond. The X station displays these hosts on the Select Session Manager screen along with the number of users logged in and the host load for each computer over the last 1, 5, and 15 minute periods. (If the host is running HP VUE Version 2, only the computer's hostname is displayed, not the host load.) To choose the host, click on the host name, then on [OK].

If you want to shorten the list of hosts displayed, list the hosts to which you normally connect in the [Login Host] field.

If you want to log in to a host that is across a gateway, follow these steps:

  1. From the Select Session Manager screen, click on the [Direct] button.

  2. Fill in the Host Address (Name) field with the IP address or the host name of the host you want to log into.

  3. Click on [Connect].

XDMCP Indirect to host

The X station sends a request to the specified host computer (known as the primary manager). This computer can respond directly or it can choose another computer (a secondary manager) to provide the XDM services to the X station. Using this method, you can direct the primary manager to assign which computer should provide XDM services based on factors such as relative host loading, the X station making the XDM request, which computers the user has accounts on, and so on. For information on how to configure the host computer to respond to an indirect request, see Controlling Access to the Host through XDM.

Note that the indirect request applies to XDM and dtlogin, and is not available with some versions of vuelogin.

XDMCP Broadcast Auto

The X station automatically sends a request to the host computer listed in the Login Host field on the [Server] configuration screen. If no host is specified in the Login Host field, the request is sent to all hosts listed on the Select Session Manager screen. The first host to respond automatically gets the connection. This feature helps to balance the load across all available hosts (if your system administrator has set up the hosts to do so).

Configuring Dtlogin or Vuelogin on HP-UX Systems

This section contains the following topics:

Running Dtlogin in XDM Mode

Dtlogin can run in XDM mode, which gives users an XDM session. By default, users get a dtlogin session.

If you want dtlogin to run in XDM mode for some users, complete the following steps:

  1. Locate the file /etc/dt/config/Xconfig.

  2. To direct dtlogin to read users' .xsession file, as superuser, edit the Xconfig file.

  3. At the line:
    Dtlogin*xdmMode:       True
    
    You can choose to run XDM-style X sessions for selected displays by replacing the * with .terminalname_0.) for the X stations:
    Dtlogin.terminalname_0.xdmMode: True

    For example, the X station in the accounting department that has the terminal name acctsmith would be listed as:

    Dtlogin.acctsmith_0.xdmMode:       True
    

Note: If your account has been set up to run dtlogin in XDM-mode, you can override this option at login time.

Running Vuelogin in XDM Mode

Vuelogin can run in XDM mode, which gives users an XDM session. By default, users get an HP VUE session.

If you want vuelogin to run in XDM mode for some users, complete the following steps:

  1. Locate the file /usr/vue/config/Xconfig.

  2. To direct vuelogin to read users' .xsession file, as superuser, edit the Xconfig file.

  3. At the line:
    Vuelogin*xdmMode:       True
    
    You can choose to run XDM-style X sessions for selected displays by replacing the * with .terminalname_0.) for the X stations:
    Vuelogin.terminalname_0.xdmMode: True

    For example, the X station in the accounting department that has the terminal name acctsmith would be listed as:

    Vuelogin.acctsmith_0.xdmMode:       True
    

Note: If your account has been set up to run vuelogin in XDM-mode, you can override this option at login time.

Bypassing the Login Screen under Vuelogin

With vuelogin, you can bypass the login screen and automatically start a specified user's X session at login. To do this, complete the following steps:

  1. Locate the Xaccess file: /usr/vue/config/Xaccess.

  2. As superuser, add to Xaccess lines similar to the following:

    display BYPASS_LOGIN loginname.

    For example:

    xterm1     BYPASS_LOGIN       ksmith
    

  3. Reboot the terminal. After xterm1 reboots or resets, it automatically runs an X session for user ksmith.

Controlling Access to the Host through Dtlogin or Vuelogin

Dtlogin and vuelogin provide an access control list (Xaccess) that prevents an X station or a range of X stations from receiving X session management services from the host computer.

The access control list is in /usr/vue/config/Xaccess for vuelogin, or /etc/dt/config/Xaccess for dtlogin.

The host computer can receive a direct or a broadcast request for X session management from X stations. To set up Xaccess to control direct and broadcast requests from X stations, use the following syntax:

Examples: Using Xaccess to Manage X Stations

Configuring XDM on HP-UX, Sun, and IBM Systems

For information about running XDM, refer to the following sections:

Starting XDM

To run XDM as the session manager (instead of vuelogin or dtlogin), do the following:

  1. Invoke the administration scripts, as described in Running the X Station Administration Scripts.

  2. Choose XDM Administration from the main menu.

  3. Choose Start XDM from the XDM administration menu.

On HP-UX systems, if you prefer to update files manually, you can set up XDM as follows:

  1. As superuser, add the following line to /etc/inittab:
    xd:234:respawn:/usr/bin/X11/xdm -nodaemon < /dev/null > /dev/null 2>&1
    

    For HP-UX 10.x, replace /usr/bin/X11/xdm with /opt/hpxt/enware/xdm/xdm.

  2. Find the line that begins dt: (for dtlogin) or vue (for vuelogin), and use the # character to comment it out. For example:
     #vue :34:respawn:/etc/vuerc        # VUE validation and invocation
    

Starting XDM on Diskless Workstations

On HP-UX 9.x systems, the xdm directory is context-dependent. To use XDM on a diskless workstation, you need to edit the files in this directory so that they have appropriate context. The files are located in:
/usr/lib/X11/xdm

To each node's /etc/inittab file, add the following line:

xd:234:respawn:/usr/bin/X11/xdm -nodaemon < /dev/null > /dev/null 2>&1

XDM Administration

You get to the XDM administration menu as follows:

  1. Invoke the administration scripts, as described in Running the X Station Administration Scripts.

  2. Choose XDM Administration from the main menu.

The XDM administration menu contains options such as:

Controlling Access to the Host through XDM

The X11R5 version of XDM provides an access control list (Xaccess) that prevents an X station or a range of X stations from receiving X session management services from the host computer.

For the host computer, there are two types of X session management requests: a request for the host to manage a particular X station (which could be either a direct or a broadcast request) and a request for the host to provide the X station with a list of willing hosts (which is an indirect request).

Examples: Using Xaccess to Manage X Stations

Bypassing the Login Screen under XDM

If you want XDM to bypass the login screen and automatically start a specified user's X session at login, complete the following steps:

  1. Locate the Xaccess file:
    /usr/lib/X11/xdm/Xaccess

    For HP-UX 10.x systems: /opt/hpxt/enware/xdm/Xaccess

  2. As superuser, add to Xaccess lines similar to the following:

    display BYPASS_LOGIN loginname

    For example:

    xterm1     BYPASS_LOGIN       ksmith
    

  3. Reboot the terminal. After xterm1 reboots or resets, it automatically runs $HOME/.xsession for user ksmith.

Setting XDM Resources for a Particular Class of X Station

The X server classname is used by XDM as part of the XDMCP protocol. By adding the X server classname to a resource listed in the Xconfig file, you can set a resource to affect a specific class of X stations.

The Xconfig file is usually: /usr/lib/X11/xdm/Xconfig

For HP-UX 10.x systems, the file is: /opt/hpxt/enware/xdm/Xconfig

The X server classname is:
Hewlett_Packard_Company-CxxxxA
where CxxxxA is the X station hardware model number.

You can find the hardware model number by accessing the configuration screens and selecting [Diagnostics] and then Installed Configuration. Insert the classname between the resource name and the final resource name segment. For example:

DisplayManager.Hewlett_Packard_Company-C2731A.startup

Note: For more information, please consult the XDM man page (the Resources section).

Using Restricted Shells

If you are using the Korn shell or the Bourne shell and you wish to set up a restricted shell environment for your users, refer to the comments and code in the following files:

For HP-UX 10.x systems, refer to:

Configuring scologin on SCO Systems

The X session manager available on SCO UNIX systems is called scologin. This section describes:

Starting scologin

To run scologin as the session manager, do the following:

  1. Invoke the administration scripts, as described in Running the X Station Administration Scripts.

  2. Choose scologin Administration from the main menu.

  3. Choose: scologin , or a startup method appropriate for your system.

Using scologin to Control Clients

The script scologin begins by running /usr/lib/X11/scologin/Xsession. Xsession attempts to run the .xsession script in the user's home directory. Unedited, .xsession starts an scoterm window, the mwm window manager, and an X.desktop or Desktop window. .xsession can be customized for each user.

If .xsession is not found, Xsession attempts to run the .startxrc script in the user's home directory; otherwise, it defaults to /usr/lib/X11/sys.startxrc, which starts an odtterm window and an icon manager window. If you type xdt3 & in the terminal emulator window, you get an X.desktop or Desktop window.


Note: We recommend that you have an .xsession file in the user's home directory. However, if there is an .xsession file in the user's home directory, logging in through scologin on the console may cause unwanted results, since Xsession bypasses the startx routine which configures the console. From the console, either log in as another user (root) or disable scologin.

Logging Out from scologin

scologin logs out the user when $HOME/.xsession, $HOME/.startxrc or /usr/lib/X11/sys.startxrc runs to completion. The foreground task, that is, the first client that does not have a & at the end of its command line, is the last client started by the startup script. Therefore when the user closes the foreground task, mwm in the default .startxrc script and scoterm in the .xsession script, scologin logs the user out.
[Previous]   [Next]   [Contents]   [Index]