FacetTerm  
 
FacetCorp
 

SCO ANSI Color Technical Notes


The SCO color console emulations pose an interesting problem when using FacetTerm. The problem that FacetTerm encounters has to do with the different ways that the SCO platform sends color attribute sequences. There are 3 major ways that SCO sends color attribute sequences:

  1. ISO color: CSInm where n describes a graphic/color attribute This is the most popular way of setting color on the SCO console

  2. SCO setcolor: CSI=nX where n describes a color attribute and X describes a graphic attribute This is unique to the SCO operating systems.

  3. XENIX color: CSI2;F;Bm where F is the foreground and B is the background color This was designed for XENIX but is sometimes used on SCO UNIX.

This provides for an extremely large number of color/graphic attribute combinations. In addition to this, there are sub-registers that control the reverse, blink/dim and underline display functions. Different combinations of the above sequences affect these sub- registers differently. Older versions of FacetTerm cannot handle a mix of ISO color, XENIX color and SCO setcolor sequences. That is why we had two different terminal description files: ansic.fi and ansi_setc.fi.

One would want to use the ansic.fi file almost all of the time. This file was designed to handle most of the ISO color and the XENIX color sequences. The disadvantage to the ansic file is that this was designed for use on a XENIX color console. The console drivers between XENIX and UNIX handle the color sequences differently enough that this does allow FacetTerm to correctly refresh the screen all the time when on a SCO UNIX console or emulation of the SCO UNIX console. The ansi_setc.fi is designed for use with the SCO setcolor sequences. This works great only if your software is sending the setcolor sequences exclusively. To utilize either of these specific terminal description files, you have two basic ways of doing this.

  1. First, you can set an environment variable FACETTERM equal to ansic or ansi_setc and then export the FACETTERM environment variable before starting FacetTerm. For example, if you were using the if statement described in the FacetTerm manual for starting FacetTerm in the .profile, you would set it up something like this:
            if fct_info not_a_window
            then
                 FACETTERM=ansi_setc
                 export FACETTERM
                 exec facetterm nonstop
            fi
    
  2. The other way would be to copy either of the files to a name that matches your TERM environment variable. To make this type of change invisible to and FacetTerm upgrades, you will need to create a new subdirectory called localterm under /usr/facetterm. You would then need to place the renamed file in the /usr/facetterm/localterm. For example, your TERM environment variable is set to ansicolor. In this case you would want to execute the following command:

    cp /usr/facetterm/term/ansic.fi /usr/facetterm/localterm/ansicolor.fi

FacetTerm versions 3.3.0 and later have a true SCO UNIX Color Console terminal description file along with terminal descriptions for several other flavors of ANSI Color that are now handled with an enhanced terminal description language. If you are having difficulties with ANSI color emulations and are using an older version of FacetTerm, it is very likely that upgrading to a later version of FacetTerm will make your life easier!