AIX/HP-UX Interoperability Guide (continued)
[Last Chapter: 2. System Startup and Shutdown]
If you were to look at a typical RS/6000 running AIX 3.2.5 and an HP 700 running HP-UX 9.0x boot at the same time, you would see a striking difference between the two login screens. The RS/6000 would look essentially like an ASCII display, and the HP-UX would look like an X terminal. On both machines a user simply types a user id and a password to access the system. But although the process of logging in looks essentially the same for both machines, there are significant differences between the two.
After bootup the RS/6000 displays a login prompt on what looks like a character-based terminal, but which in reality is part of what is known as a high-function terminal (hft). An hft is not just a display; it also includes the keyboard, the mouse, dials, and keypad. The hft display, along with the appropriate graphics adapter, is capable of supporting the X Window system, but what you'll probably see after bootup is just ASCII text. You log in to this display and then either the X server starts automatically (depending on your system configuration), or you use a script like startx to start it manually.
Logging in to the RS/6000, therefore, follows the typical UNIX login process: The getty process provides the login screen. If a user enters an id at this getty login prompt, getty starts the login process to validate the user. Unlike most UNIX systems, including HP-UX, AIX's login program checks not only /etc/passwd, which contains user names, but also a shadow password file, /etc/security/passwd, which contains the encrypted passwords of each of the users. login then starts a login shell as defined in /etc/passwd for the user, which by default is the KornShell (ksh). [4] ksh then reads the user's .profile. It is here in .profile that X Window frequently starts up, usually by calling the xinit command either directly or via the startx script.
The xinit command starts the X server and then reads the $HOME/.xinitrc file to determine which X programs to start. The three most likely applications to run from .xinitrc are 1) an aixterm (like xterm but emulating an hft display instead of a vt100), 2) the AIX Windows desktop, an icon-based application and file management system, and 3) Motif Window Manager (mwm). (These applications will be discussed in more detail in the chapter on X Windows.) When a user exits his or her X Window session and logs out, control of the terminal returns to the init process, which spawns a new getty process, which in turn displays the Console Login on the display.
The following summarizes the AIX login process:
Other RS/6000 login environments include xdm (X Display Manager), which provides an X Window login interface, and a ASCII-only display session. But the process described above is the most common.
If you are in an X Window session, stopping it by choosing End Session on the Root Menu will usually log you out. However, if your system displays an ASCII screen with a command line prompt (usually a "$" prompt) after you stop X, then you have to take the additional step of closing the shell by typing either the exit command or the logout commands.
The reason you might see a command line prompt after stopping the X server is because of the RS/6000 concept of virtual terminals. The hft device is capable of supporting multiple screens on a single terminal. To create a virtual terminal you simply type the open command followed by the name of the program you want to run in the new virtual terminal. If you type open ksh, or if your .profile contains such a command, then you get a second screen running a KornShell. To access other screens, you simply type the CTRL+ALT/ACTION key sequence, and the terminal displays each screen one at a time.
If the X server is started by the open command, for example open xinit, it appears in its own screen. Thus ending the X Window session simply stops the X server in that particular screen and leaves other virtual terminals still running. To log out requires closing all virtual terminals, so whatever programs are running in them, be they shells or additional X servers, they must be closed in order to logout
The process described below is more accurately described as the HP VUE login process. VUE is HP's Visual User Environment, a graphical user interface for HP-UX. If you were to login to a non-Windows console or were to telnet from another machine to an HP-UX system, the login process would very much be the same as that of a typical UNIX system, which involves the init, getty, and login programs. However, the /etc/inittab file of most HP machines has HP VUE as part of the default run level; in other words, HP VUE starts by default. HP VUE's login program, vuelogin (which is a customized version of xdm), provides the same functions as init, getty, and login, and does not normally read such files as /etc/profile and .profile.
The vuelogin process is as follows:
When a user logs in to the vuegreet display, vuelogin runs /usr/vue/config/Xstartup if it exists, sets certain environment variables to default values, runs /usr/vue/config/Xsession, which in turn reads $HOME/.vueprofile and invokes the session manager, vuesession. Obviously, this process is a departure from the traditional UNIX login process. This is important to remember because if you are trying to customize a user's environment under HP VUE, modifying the .profile file will not by default have any effect. Instead, you must modify .vueprofile
The Options menu on the HP VUE login screen allows you to select several alternative types of sessions, such as HP VUE Lite, or a fail-safe session. You can also select the language for your session.
If you choose not to use HP VUE, you can select Options from the login window menu and No Windows from the VUE login screen, at this time. In that case, enter your login name and password after the appropriate prompts.
To log into and out of a fail-safe session, select Fail-safe from the Options menu and log in. A fail-safe session is a simple session that starts the Workspace Manager and a single terminal window. It is useful when you need access to a single Terminal Emulator window to execute several commands before logging into an HP VUE session.
To log out if you are in an HP VUE session, choose the logout control on the Front Panel, use the log out control to end the session, or choose Log out from the workspace menu. When you log out of a regular HP VUE session, Session Manager saves information about your current session so that it can be restored the next time you log in.
Although the RS/6000 supports xdm, the most likely login configuration will be a more or less standard UNIX one involving the init, getty, and login programs. By default you login to an ASCII-like display, and one of two things happens: 1) the X server starts automatically from the user's .profile or 2) you have to start X manually with either the xinit or startx commands.
Although logging into an HP-UX ASCII terminal or pseudo-terminal will result in a typical UNIX login process, logging in to the console will most likely involve vuelogin, a customized version of xdm. In this case, setting a user's environment does not entail changing /etc/profile or .profile because vuelogin does not normally read those files.
Footnotes:
[4]: AIX also supports the Bourne and C shells.
[Next Chapter: 4. Disks and File Systems]
Provide feedback to: alan_roberts@hp.com