OpenWindows Advanced User's Guide

Chapter 1 Logging In to SunOS and Starting OpenWindows

The OpenWindows Version software should already be installed on your hard disk or on an accessible server in your file system. If you are unsure about this, see your system administrator, or refer to the installation manual for your specific platform.

This chapter describes how to log in to your system, how to use a shell command interpreter, how to mount and start up the OpenWindows user environment, how to exit the window system, and how to log out. It also describes some special cases, such as configuring the OpenWindows environment for dual monitors.

1.1 Logging In

A standard work session is defined as the interval between the time you log in to the system and the time you log out. The SunOS multiuser environment requires that you identify yourself each time you want to use the system. Your login name (also known as a user name or an account) serves as your identity to the system and to other users on the system. Your password restricts use of your account to those people who know the password. If you don't already have a login name and password, ask the person who is designated as the system administrator for your system to set up an account for you. Once you have this information, you are ready to log in.

Before you log in to the system, your screen should look similar to the following:

login:

Enter the login name given to you by the system administrator and press the Return key. For example, if your login name is spanky, type:

login: spanky

and press Return. Next, the system requests your password as follows:

login: spanky
Password:

Type your password at the prompt and press Return. (If your account does not have a password assigned to it, the system logs you in without asking you for a password.) Note that the system does not display (echo) your password on the screen as you type it. This is to help prevent others from discovering your password.

1.2 Your Login Shell

In the chapters that follow, you'll begin entering SunOS commands. When you issue a command to the system, you are actually providing information to a command interpretation program, called a shell. The shell program then reads the information you have provided and causes the proper action to take place within the system.

The default shell for SunOS system software is the Bourne shell, but there are also two other shell programs available within the operating system: the C shell and the Korn shell. Each of these shells has its own unique differences.


Note -

You can get specific information about any SunOS command, including each of the available shells, by viewing its man (manual reference) page. For more information on man pages, see "2.3.1 Displaying Manual Pages with man" in Chapter 2, Basic SunOS Commands.


When you initially log in to the system (or open a new Command Tool or Shell Tool window) and you see your command prompt, it indicates that a shell program has been started for you automatically. This shell is called your login shell. If your login shell is not the SunOS default (the Bourne shell), it is because a different shell (either the C or Korn shell) has been specified for you by your system administrator.

As mentioned, each shell has its differences. Some commands or procedures available when using one shell may not be available when using another. With this in mind, please note that whenever any commands or procedures are presented in this manual that are not available using the default shell for SunOS (the Bourne shell), the sections are clearly marked as such.

1.3 Logging Out

When you have finished your work session and are ready to exit the operating system, type the following to log out:

$ exit

After a moment, the system once again displays the login prompt:

$ exit
login:

When you see the login prompt, it indicates that you have successfully logged out. The system is now ready for you or another user to log in.


Note -

With the SunOS operating system, turning off your workstation or terminal does not necessarily log you out. Unless you log out explicitly, you may remain logged in to the system.


1.4 Keyboard Equivalents

Although the operations you do not require extensive use of OpenWindows menus and the mouse, in some cases you can speed up these operations by using a sequence of keystrokes, called keyboard accelerators, that duplicate the operations of the mouse and menus, and of the pre-configured keyboard keys.

The following table lists several command operations and the keyboard equivalents for both SPARC and x86 or PowerPC-based machines.


Note -

The Meta key is the <> key on SPARC keyboards and is obtained on x86 or PowerPC keyboards by pressing Ctrl-Alt.


To carry out a keyboard accelerator operation, press and hold the first key (Meta or Control-Alt together) and type the second key. For example, to cut selected text, press and hold the Meta key and press x on a SPARC sytem; on an x86 or PowerPC system, press and hold Control and Alt together and press x simultaneously

Table 1-1 Keyboard Accelerators

Operation 

Keyboard Equivalent 

Action 

Again

Meta - a 

Repeats the previous operation 

Copy

Meta - c 

Copies the selection to the clipboard 

Cut

Meta - x 

Cuts the selection and puts it on the clipboard 

Find

Meta - f 

Finds the selection to the right of the caret 

Help

Help or F1 

Displays a help window with context-sensitive help for the object at the pointer location 

New

Meta - n 

Loads a new file 

Open (File)

Meta - o 

Opens a file (for example, if you've highlighted a file icon in File Manager) 

Open (Window)

Meta - w 

Opens an icon or closes a window to an icon 

Paste

Meta - v 

Copies the clipboard selection to the insertion point 

Print

Meta - p 

Sends the file to the printer (for example, if you've highlighted a file icon in File Manager) 

Props

Meta - i 

Displays the property window for th application at the pointer location 

Redo

Shift-Meta - p 

Undoes an Undo 

Save

Meta - s 

Save the current file 

Stop

Stop or Esc 

Stops the current operation 

Undo

Meta - u 

Undoes the previous operation

1.5 OpenWindows Start-up Considerations

Before you start the OpenWindows software, take note of these considerations. If none of these considerations apply to you, skip ahead to "1.6.1 Displaying the OpenWindows Software", in this chapter.


x86 only -

If you changed the type of mouse device, keyboard, or video adaptor card on your system after installing Solaris, you'll need to run the devconfig program to update system configuration. See the devconfig(1M) man page.


1.5.1 The OPENWINHOME Environment Variable

If you are currently running a version of the OpenWindows software earlier than Version 3.3, you may have set up your system to use the OPENWINHOME environment variable. It is no longer recommended that users set the OPENWINHOME environment variable, either by-hand or from a start-up file.

When you run the openwin command it automatically sets the OPENWINHOME environment variable to /usr/openwin; therefore, you do not need to do it.

If you have set the OPENWINHOME environment variable in either the .profile or .cshrc file in your home directory, comment out the line or delete it altogether before running OpenWindows Version 3.3, or a later version.

To remove, or comment out, the OPENWINHOME environment variable in the .profile or .cshrc file:

  1. Open the .profile or .cshrc file using a text editor such as vi.

  2. Type a pound sign (#) before the variable, as shown below, or delete the line entirely.

    If you are working in the .profile file, do Step 1; if you are working in the .cshrc file, do Step 2.

    1. In the .profile file:

      #OPENWINHOME=/usr/openwin
      

    2. In the .cshrc file:

      #setenv OPENWINHOME /usr/openwin
      

  3. Save and quit the file.

  4. Unset the OPENWINHOME environment variable (or log out and log back in).

    If you are running the Bourne or Korn shell, do Step 1. If you are running the C shell, do Step 2.

    1. In the Bourne or Korn shell, type:

      $ unset OPENWINHOME
      

    2. In the C shell, type:

      example% unsetenv OPENWINHOME
      

    Once you have unset the environment variable you are ready to run the OpenWindows software, as described in "1.6.1 Displaying the OpenWindows Software", in this chapter.

1.5.2 Using the Correct Start-Up File

If you are currently running a version of the OpenWindows software earlier than Version 3.3, it is important to determine the status of your .xinitrc file. The .xinitrc file is an OpenWindows start-up file your home directory that may contain user-defined options.

To determine the status of your .xinitrc file, type the following commands:

$ cd
$ ls -a .xinitrc

Depending on the output of this command, do one of the following things:

1.5.2.1 Start-Up File Procedures

  1. To delete the .xinitrc file from your home directory, type the following command:

    $ rm .xinitrc
    

  2. To retain the changes to your .xinitrc file, do the following steps:

    1. Move .xinitrc to .xinitrc.save:

      $ mv .xinitrc .xinitrc.save
      

    2. Copy /usr/openwin/lib/Xinitrc to .xinitrc in your home directory:

      $ cp /usr/openwin/lib/Xinitrc $HOME/.xinitrc
      

    3. Add the lines that you want to keep from the .xinitrc.save to .xinitrc.


      Caution - Caution -

      When editing the .xinitrc file, do not add a secondary version of olwm, do not add svenv, and do not remove the line containing /usr/openwin/lib/openwin-sys.


1.6 Starting the OpenWindows User Environment

To start the OpenWindows user environment you perform the following general steps:

  1. Using NFS, mount the OpenWindows software from the server on which it is installed.

    For information on how to mount the OpenWindows software from a server, see OpenWindows Desktop Reference Manual, or talk to your system administrator.

  2. Start the OpenWindows software with the command openwin, adding any additional start-up options as needed.

1.6.1 Displaying the OpenWindows Software

Once you have mounted the OpenWindows software from a server and run the OpenWindows installation script you are ready to start the OpenWindows software.

To start the OpenWindows software, type /usr/openwin/bin/openwin at the shell prompt and press Return.

$ /usr/openwin/bin/openwin

This displays the OpenWindows Version 3.3 screen and sets up the OpenWindows working environment.

1.6.1.1 Displaying OpenWindows Quickly

Once you have successfully started OpenWindows, you can set up your system to use a shortcut so that you do not need to type the full OpenWindows path each time.

If you are using the Bourne or Korn shells you do this by placing a shell function in your .profile file. If you are using the C shell you put an alias in your .cshrc file. Both the .profile and .cshrc files are found in your home directory.

When you have placed the shortcut in the appropriate file for your shell, to start OpenWindows simply type:

$ openwin

How to enter the OpenWindows shortcut into your start-up files is described in the following sections, "In the .profile File", and "In the .cshrc File".

In the .profile File

To enter the OpenWindows shortcut into your .profile file:

  1. Open the .profile file using a text editor such as vi.

  2. Enter the following shell function, exactly as shown, into the file:

    openwin () {
             /usr/openwin/bin/openwin
    }
    

  3. Save and quit the file.

  4. Log out and log back in to activate the shortcut, or type:

    $ . .profile
    

Now, whenever you want to start OpenWindows, you simply have to type openwin.

In the .cshrc File

To enter the OpenWindows shortcut into your .cshrc file:

  1. Open the .cshrc file using a text editor such as vi.

  2. Enter the following alias command, exactly as shown, into the file:

    alias openwin /usr/openwin/bin/openwin
    

  3. Save and quit the file.

  4. Log out and log back in to activate the shortcut, or type:

    example% source .cshrc
    

Now, whenever you want to start OpenWindows, you simply have to type openwin.

1.6.2 If OpenWindows Won't Display

When you start the OpenWindows software it is accessed through the directory /usr/openwin. The OpenWindows software is installed in this location by default. Many applications, for example Calendar Manager, cannot load unless the OpenWindows software is properly installed in /usr/openwin.

If your OpenWindows does not start when you type the command /usr/openwin/bin/openwin, either you do not have the OpenWindows software installed, or it is installed in a directory other than /usr/openwin. See the OpenWindows Desktop Reference Manual, or see your system administrator.

1.7 Quitting the OpenWindows Environment

Once you have displayed the OpenWindows software and are working in the windows environment, you cannot log out as you would from a standard SunOS command-line session. You must first exit from the windows environment and then log out.

If you type logout at a shell prompt, you see the message:

Not login shell.

To exit from the OpenWindows environment, follow these steps:

  1. Position the mouse so that the arrow (pointer) is on the background of your screen (the workspace).

  2. Press the MENU mouse button.

    The Workspace menu appears, presenting several options.

  3. Drag the pointer down the menu until you highlight the last menu item, Exit.

  4. Release the mouse button.

    A popup window appears, asking you to confirm that you want to exit the window system.

  5. Position the pointer on Exit and click the SELECT mouse button.

    After a few moments all the windows are dismissed and the system prompt appears in the lower left corner of your screen.

1.8 Special OpenWindows Start-up Options

Most users can start the OpenWindows software by following the steps described in "1.6.1 Displaying the OpenWindows Software". However, in some cases you may want to use additional options to modify the OpenWindows start-up.

This section describes the following special cases:

To start up the OpenWindows software with special options, you use the openwin command:

$ openwin [ options ]

In the preceding example, options are the command line options that enable you to tailor the default setup of the server. The following sections describe some of more commonly used options.

1.8.1 Starting with Reduced Network Security

If you are operating in an open networked environment and are not concerned about network security, you may want to use the -noauth option so that other users can run applications on your system.

The following command overrides the default security feature, which enables you to specify other users who can access your window server:

$ openwin -noauth

1.8.2 Starting with Various Monitor Types

If you have a gray-scale monitor (a non-color monitor with a frame buffer of 8 bits or more) you may want to use the grayvis option when you start up the OpenWindows software. This may improve certain aspects of your OpenWindows display, but it is not required.

To use this option, type the following at the system prompt:

$ cd
$ openwin -dev /dev/fb grayvis

1.8.2.1 SPARC: Starting with Multiple Monitors


SPARC only -

Note the following sections concerning "Starting with Multiple Monitors" apply only to SPARC-based machines. These sections require some system administration experience. If you have never configured a system, ask your system administrator for assistance.


To run the OpenWindows environment on multiple screens, you must inform the system of the additional devices and display types you want to run. You can either specify the device options or use the default values available with the openwin script that starts up the OpenWindows software.

Two options are required with the openwin command when you start the software on dual monitors:

$ openwin [ [ -dev device ] [ deviceoptions ] ]

The double brackets indicate that the combination of [ -dev device ] [ deviceoptions ] can be entered more than once on the command line (that is, once per device).

[ -dev device ]

The device command line option specifies the frame buffer device which the server should use for the display, or screen.

If the command line does not show this option, the server uses the default, /dev/fb. Multiple (more than one) occurrences of the -dev option on the command line indicate multiple displays on the same server.

[ deviceoptions ]

The deviceoptions command line option is a list of device modifiers that change the behavior of the device specified in the -devoption.

1.8.2.2 Device Option Examples

This section provides examples of stacked and side-by-side dual-monitor arrangements.


Note -

In all examples, the order of the devices is important. The first device specified must be the screen physically placed to the left or top of the second device. The second device specified must be the screen physically placed to the right or bottom of the first device.


[ left ] [ right ]

The following command line instructs the system to start up two displays. The left display is the default frame buffer and the right display is a monochrome. This enables you to move the cursor left and right between the two displays.

$ openwin -dev /dev/fb left -dev /dev/fbs/bwtwo0 right

The following example is equivalent to the previous example. By default, the first device is to the left of the second device listed in the command line.

$ openwin -dev /dev/fb -dev /dev/fbs/bwtwo0

The following command line instructs the system to start up two displays. The right display is the default frame buffer and the left display is a monochrome. This setup enables you to move the cursor left and right between the two displays.

$ openwin -dev /dev/fb right -dev /dev/fbs/bwtwo0 left

[ top ] [ bottom ]

The following command line instructs the system to start up two displays. The top display is a CG6 and the bottom display is a monochrome. This setup enables you to move the cursor up and down between the two displays.

$  openwin -dev /dev/fbs/cgsix0 top -dev /dev/fbs/bwtwo0 bottom

The following example is not equivalent to the previous example. By default, the first device is to the left of the second device listed in the command line.

$   openwin -dev /dev/fbs/cgsix0 -dev /dev/fbs/bwtwo0

The following command line instructs the server to start up two displays. The bottom display is a CG6 and the top display is a monochrome. This setup enables you to move the cursor up and down between the two displays.

$  openwin -dev /dev/fbs/cgsix0 bottom -dev /dev/fbs/bwtwo0 top

1.8.2.3 Miscellaneous Notes

The following are important considerations when you are running multiple screens.