OpenWindows Advanced User's Guide

Appendix A Migrating to OpenWindows Version 3.3, or Later Versions

In some cases you may be running a version of the user environment software that is no longer current with Solaris, which runs OpenWindows as its default user environment. For example, you may be running the SunView user environment software, or a version of OpenWindows earlier than Version 3.3. If so, you may want to upgrade to OpenWindows 3.3, or later versions. This appendix describes how to do this.


Note -

The SunView software is no longer supported in OpenWindows Version 3.3, or later versions. Unlike previous versions of OpenWindows, once you migrate to Version 3.3 or later you no longer have the option of also running SunView.


A.1 SPARC: Migrating from the SunView Environment

If you are migrating to the OpenWindows environment from the SunView environment, the following information may make your transition easier.

A.1.1 The .defaults and .Xdefaults Files

To customize your OpenWindows environment in the same way as your SunView environment, you can convert your .defaults file (used by the SunView software) into an .Xdefaults file (used by the OpenWindows software). If you have a .defaults file in your home directory, you should run the convert_to_Xdefaults program that's in your home directory, as follows:

$ cd
$ /usr/openwin/bin/convert_to_Xdefaults .defaults

This creates an .Xdefaults file in your home directory that is used to customize your OpenWindows environment when you start the software.

A.2 Migrating from a pre-Version 3.3 OpenWindows Environment

Read this section carefully if you formerly ran a version of the OpenWindows environment that predates Version 3.3 and now want to migrate to Version 3.3, or later versions. In particular, much of this information applies to those who have been using the OpenWindows Version 2 Environment.

A.2.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 later versions.

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, use example a; if you are working in the .cshrc file, use example b

    1. In the .profile file:

      #OPENWINHOME=/usr/openwin
      

    2. In the .cshrc file:

      #setenv OPENWINHOME /usr/openwin
      

  3. Save and quit the file.

A.2.2 The .xinitrc File

The following are important notes about the .xinitrc and /usr/openwin/lib/Xinitrc files:

  1. In the OpenWindows Version 2 environment, the openwin script automatically created a copy of /usr/openwin/lib/Xinitrc to a file called .xinitrc in your home directory. This is no longer the case in the OpenWindows Version 3.3 environment. This is significant because:

    1. The openwin start-up script uses the default start-up file, /usr/openwin/lib/Xinitrc, unless there is an .xinitrc file in your home directory, which overrides the default.

    2. It is important that you use the default /usr/openwin/lib/Xinitrc file that come with OpenWindows Version 3.3 software, or later versions. (However, if you want to retain any special changes you made to the .xinitrc file in the Version 2 software, you can do so by following the instructions in this section.)

  2. If you run your system with multiple screens, you no longer need multiple instances of olwm.

A.2.3 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:

A.2.3.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.


A.2.4 Workspace Properties

In prior versions of OpenWindows (before version 3.3), a change made in the Workspace Properties menu would be stored in the file .Xdefaults in your home directory. In OpenWindows version 3.3, and later versions, changes made in the Workspace Properties menu are now stored in the file .OWdefaults, also in your home directory. The .Xdefaults file can still exist, but precedence is given to the customizations made in .OWdefaults.

The .Xdefaults file should be used only to make additional customization changes that cannot be made through Workspace Properties. For example, you can edit the .Xdefaults file using a text editor such as vi to make customizations to non-OpenWindows applications or to add C pre-processor macros. Using Workspace Properties does not disturb these customizations.

If you already have a .Xdefaults file in your home directory and you do not want to make any customization changes to it, you do not need to remove it. Since the .OWdefaults file takes precedence over it, it does not interfere.

A.2.5 Customizing the Workspace Menu

In OpenWindows 3.3, or later versions, you customize the Programs submenu on the workspace menu using Workspace Properties. Prior to OpenWindows 3.3, you did this customization by editing the .openwin-menu file in your home directory.


Note -

If you do not have a .openwin-menu file in your home directory, it is not necessary to do the following procedure. You can customize the workspace menu by using Workspace Properties.


If you do have a .openwin-menu file, you must perform the following steps in order to use Workspace Properties to customize your workspace menu.

If you see the following line in your .openwin-menu file:

"Programs"	MENU /usr/openwin/lib/openwin-menu-programs

delete it and replace it with this line:

"Programs"	INCLUDE openwin-menu-programs

If your .openwin-menu file does not contain the line that needs to be removed and replaced, simply add the substitute line to the .openwin-menu file, as shown above.

Adding or substituting this line adds the default Programs menu to your workspace menu. This enables you to customize it using Workspace Properties.

If, by chance, you end up with redundant items in your workspace menu, simply edit them out by removing the redundant lines from .openwin-menu.