MegaCads runs on X-terminals, but needs enough free entries in the colormap of your X-server (terminal). If you receive error messages like 'XAllocColor failed', you may have to terminate other applications running on your terminal. This concerns applications which use lots of colors like plotting software (e.g. Tecplot) or some text processing applications (e.g. FrameMaker).
To run MegaCads, you have to set the following environment variables (this will be done usually by the script MegaEnvironment):

MEGA_HOME
Points to the directory where the MegaCads installation is located.
This variable should be set to the default path for your installation:
/raid/ea2k/MEGACADS_C.1

MEGA_BIN
Defines the path where the binaries (executables) for your installation are stored.
This variable should be set to the default path for your installation:
/raid/ea2k/MEGACADS_C.1/BINARIES/...[DEC|CDC|HP|SUN|IBM]

MEGAPIXMAPS
Specifies the path to the directory where MegaCads looks for the pictures for the graphical user interface.
It's default setting is:
$MEGA_HOME/PIXMAP
An alternative to the fancy pictures are text symbols for the buttons. Set $MEGA_HOME/PIXMAP_2

MEGA_LABEL_FONT
Defines the name of the font for the entity label. Default is -adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*. The variable has to be set to run MegaCads.

MEGA_HELP
Points to the directory where the help files for the MegaCads help application reside.
The default value is:
$MEGA_HOME/HELP

WWW_HOME
Names the starting help page which is displayed when the help viewer is started.
The default page is:
$MEGA_HELP/HelpMain.html
(If you are using the C-shell, you can use the setenv command to set these variables). The standard installation procedure (Configure) creates a file environent which can be 'sourced' to set the variables.

Furthermore you must load the resources from the file 'MegaCads.rsc' into your X-server. You can use the command
xrdb -merge MegaCads.rsc
to load the resources. If you created a personal copy of MegaCads, make sure that the line '#define MEGA_APP MegaCads' uses the correct name of your executeable. If not, MegaCads will quit after issuing an error message concerning undefined column width settings for the XbaeMatrix widget.

Using the X-window system, the look of MegaCads can be configured to your personal (dis)taste.
The key to these settings is buried in the resource files, which are used by most sophisticated X11 applications. These files may contain entries to specify colors, fonts, geometric constraints like shadow and border widths and much more. The exact syntax of these entries is documented in the X11 manual page (X). It contains information on the usage of wildcards ('*' and '?') too as well as the search algorithm which is used to resolve resource descriptions.
The resources can be interactively modified using editres, a dynamic resource editor for X Toolkit applications which is common on Unix systems.

If you were using the `Configure' script for the installation of Megacads, the resource file `MegaCads.rsc' has been copied into the current directory. This file contains a (small) selection of parameters which are responsible for the look of MegaCads. You can edit your copy of `MegaCads.rsc' to make the look of MegaCads suit your personal taste.

Parameters specifying window positions and sizes are kept in the file megacads.ini. This became necessary because simple implementations of the Motif-Window-Manager do not apply the coordinate values from resource files to the managed windows. Thus entries in the resource file have no influence on window sizes and positions. The file megacads.ini is unique to each project and is kept in the project directory.

Unter X-Windows steht eine Vielzahl verschiedener Schriften zur Verfügung. Allen Bedienelementen von MegaCads können eigene Schriftarten zugewiesen werden. Da eine derartige Vielfalt nicht allzu augenfreundlich ist, enthält die Resourcendatei nur wenige Schriftvorschläge für bestimmte Funktionsgruppen. Fuer die Variation des Label-Font der Entities, siehe Customize (MEGA_LABEL_FONT).

Schriftart für alle Dialogfelder:

.mega.AppShell*menuBar*XmDialogShell*fontList:
Schriftart für Schaltflächen im Grafikwerkzeugkasten:
.mega.graphic_shell*graphic_action_form.XmPushButton*fontList:
Schriftart zunächst für alle Objekte in der Indexliste, dann in der nächsten Zeile verfeinert für die Schaltflächen:
.mega.index_shell.index_form*fontList:
.mega.index_shell.index_form*XmPushButton*fontList:

Nach dem Schlüsselwort fontList folgt ein Doppelpunkt, nach dem die eigentliche Schriftbezeichnung folgt. Eine typische Bezeichnung lautet etwa:

-adobe-itc avant garde gothic-book-r-normal--10-100-75-75-p-*-iso8859-1
Eine Auflistung aller verfügbaren Schriften (die sich von Rechner zu Rechner unterscheiden kann), läßt sich mit dem Kommando xlsfonts erzeugen.
More lazy users start the xfontsel program and build the desired font descriptor interactively. It is recommended to keep as much wildcards as possible in the font descriptors, to make it easier for the X-server to find matching fonts.

You can specify different colors for background, foreground (lines, text), shadows (top/left and bottom/right), and for the focus rectangle (focus highlight):

background: ...
foreground: ...
topShadowColor: ...
bottomShadowColor: ...
highlightColor: ...
The resource file `MegaCads.rsc' contains several canned color schemes, which can be selected by specifying the appropriate value for COLOR_SCHEME.

Mesa

If OPENGL-XTERM has been choosen during the MegaCads configuration then the Mesa library will be used. Mesa emulates OpenGL syntax using X11.

Different environment variables have to be set:

MESA_BACK_BUFFER
has to set to pixmap to increase graphics performance. This will done automatically by loading MegaEnvironment.

Mesa uses special functions to optimize the display environment. A visual from the X-server will be choosen by the MegaCads code.

In most of the cases this should work. But it might be possible that a X-server has a reduced number of visuals. The result is that entities will not be displayed in the desired colors. Set the environment variable
MESA_RGB_VISUAL
to get another visual. xdpyinfo may help you to find a appropriate visual.
The following listing shows parts of the xdpyinfo output:

visual:
    visual id:    0x25
    class:    TrueColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits

MESA_RGB_VISUAL needs the arguments visual-class and visaul-depth. The arguments for the listing above are:
visual-class 	class:    TrueColor
viual-depth 	depth:    8 planes
MESA_RGB_VISUAL can be set using the following commands:
C-shell: % setenv MESA_RGB_VISUAL "TrueColor 8" % setenv MESA_RGB_VISUAL "PseudoColor 8" KornShell: $ export MESA_RGB_VISUAL="TrueColor 8" $ export MESA_RGB_VISUAL="PseudoColor 8"
If no improvement can be recognized the next visual may work. But try to use PseudeColor or TrueColor visual's.

{Rebuild 17.2.1998 by megacads}