Enhanced SAOimage on X Window


Enhanced SAOimage requires an 8-bit X Window display. Most early workstations with X Window are in fact limited to 8-bits of display.   On some systems, such as SGI workstations, the video cards will support multiple depths, e.g., 8-bits, 16-bits, and 24-bits, simultaneously.   In these cases, nothing special need be done in order to run SAOimage.   On the other hand, some systems, such as Linux, normally support only one level of display at a time.   However, Linux offers virtual terminals whereby it is possible to switch between various bit-levels of display using the Ctrl-Alt-F7...12 keys.   In this case, each virtual terminal is identified by a display number, :0 to :6.   The video card must be able to display the required maximum number of bits requested, and must be configured with Xconfigurator to allow multiple "subsections".   There are two ways to go about creating multiple virtual terminals on Linux.

Method 1

Each time the machine is booted, one must log in at each desired virtual terminal and specify the display number and the number of bits.   If the display number is not given, by default this will be set to :0.   Each virtual terminal login is accessed by using the Ctrl-Alt-F1...6 keys, however by default, the initial login is assumed to be at the virtual terminal identified with Ctrl-Alt-F1. As mentioned above, the virtual terminal itself is accessed by the Ctrl-Alt-F7...12 keys with the association F1 to F7, F2 to F8, etc.

An example of a login script for Red Hat Linux is given below.   First be sure that /etc/inittab has Run Level set to 3 so that you will be prompted for a login at a console window, and log in.   If the first virtual temrinal is to be at a depth of 8 bits, be sure that the file .xinitrc exists in your home directory, and contains, for example:

  #!/bin/csh
  xrdb -load $HOME/.Xdefaults
  xset c off s 240 
  sleep 2
  xsetroot -solid blue
  sleep 2
  xload -display :0.0 -update 2 -g 150x80-135-0 &
  sleep 2
  xterm -ls -T ${HOST} -display :0.0 -cr red -g 80x24+10+10 -fg white -bg navyblue &
  sleep 2
  exec fvwm -display :0.0
Next enter
  startx -bpp 8
On some systems, the "-bpp 8" may not be necessary.

To bring up a 24-bit display, rename .xinitrc to .xinitrcoff, press Ctr-Alt-F2, and log in.

Then enter

  startx -- :1 -bpp 32
This will bring up a 24-bit display with the Enlightenment window manager.   If an 8-bit display is needed on the next reboot, rename .xintrcoff to .xinitrc before entering "startx -bpp 8".

Several variations on this scheme are possible;   for example, the .xinitrc file could be split into two parts with the second part accessed with "source screen0".   Or a specific initialization file could be accessed with, for example,

  startx ~/.xinitrc.2 -- :1 -bpp 8

Method 2

In the following we assume that Xconfigurator has been used to create subsections with bit levels of 8 and 32. Here, virtual terminal 1 (display :0) will be 8 bits, and virtual terminal 2 (display :1) will be 32 bits.

Create the file .xinitrc in your home directory as described above.

Edit /etc/inittab to set the Run Level to 5, i.e., make sure you have the line

  id:5:initdefault:
Edit /etc/X11/gdm/gdm.conf so that in the section [servers] there is only the line
  1=/usr/bin/X11/X -bpp 32 vt8
Now when booting, you will briefly (for a fraction of a second) see a console login for display :0 and then be taken to an X Window (gdm) login for display :1. This is the 32-bit display. To get to the 8-bit display, enter
  Ctrl-Alt-F1
and log in. Then enter
  startx
to get the 8-bit X window display. The advantage of this approach is that the file .xinitrc does not have to be renamed and that you get to use the pretty X Window login (for 32 bits). To toggle between the displays use Ctrl-Alt-F7 for 8-bits, and Ctrl-Alt-F8 for 32 bits.

Note that if we had entered two lines in gdm.conf, i.e.,

  0=/usr/bin/X11/X -bpp  8 vt7
  1=/usr/bin/X11/X -bpp 32 vt8
we would still get the X Window login for 32 bits. Entering Ctrl-Alt-F1 would give us an X Window login for 8 bits. However after logging in, this display would behave rather weirdly. You would find that the colors of various windows would change as the mouse is moved around when running 8-bit applications.

If you experience a problem with authorization when using startx, try changing the beginning three lines in /etc/pam.d/login from

  auth       required	/lib/security/pam_securetty.so
  auth       required	/lib/security/pam_pwdb.so shadow nullok
  auth       required	/lib/security/pam_nologin.so
to
  auth       required	/lib/security/pam_securetty.so
  auth       required	/lib/security/pam_nologin.so
  auth       sufficient	/lib/security/pam_pwdb.so shadow nullok
This change does reduce security at the console however.

Setup For Mac OSX

1. Go to "System Preferences..."
2. Click on "Displays"
3. Set "Colors:" to "Millions"
4. Close System Preferences
5. Turn on the X11 Application
6. Under the X11 menu, select "Preferences..."
7. Click on "Output"
8. For "Colors:", select 256 Colors

Finally, the setups described here can be used with either the original SAOimage, or Enhanced SAOimage.

Note: It is incorrect to refer to "X  Window" as "X  Windows", "X-Window", "X-Windows", "XWindow", or "XWindows".