Motif-Based MAINSAIL Tools Reference Guide, Appendix B

previous   next   top   contents   index   framed top   this page unframed


B. MAINDEBUG, Motif, and X

The purpose of this appendix is to give you enough information to customize your MAINDEBUG Motif GUI environment (at least to the extent that it is customizable). You do not have to read this appendix if you are satisfied with the default behavior of the GUI debugger.

This appendix is not a general introduction to X or Motif. There is far more to know about X and Motif than can be presented here. The standard references on these tools are the X Window System series from O'Reilly & Associates, Inc., of Sebastopol, California, and the books on Motif by the Open Software Foundation published by Prentice-Hall, Inc., of Englewood Cliffs, New Jersey. In addition, many thick, heavy books are available to help you decipher the standard documentation.

B.1. Setting Up Your .Xdefaults or .Xresources File

For purposes of setting resource defaults (e.g., in your .Xdefaults or .Xresources file), you will need to know that the widget class of the display areas in the main window and the monitoring windows is DrawingArea; the main area in browser windows is a PanedWindow. All the other widgets are of the standard Motif widget classes; i.e., they are what they look like. All the things that accept input text are Text widgets rather than TextField widgets. Gadgets are not used; wherever there exist both widget and gadget variations of a class, the widget form is used.

If the default font on your system is not fixed-width, you will want to set it to be fixed-width in many of the MAINSAIL GUI widgets, since they were written to expect a fixed-width font. In particular, edit windows work only with a fixed-width font.

Most of the widgets used have not been given individual names, so that you have to customize at the class level. If you need to customize different widgets of the same class in different ways, contact XIDAK; it probably would not be hard to add individual names to the widgets so that you can customize them individually.

The application names associated with the various shell windows are as follows:

Window Application Name
main window mslExec
Data Browser msldatabrowser
MAINSAIL Monitor mslMonitor
Memory Map mslMemoryMap
Procedure Pcs mslProcedurePcs
Allocated Records and DataSecs mslAllocatedRecs
Garbage Collected Records and DataSecs mslCollectedRecs
Chunk Space Allocated by Proc mslChunkSpace
String Space Allocated by Proc mslStringSpace
Static Space Allocated by Proc mslStaticSpace

Some sample entries in your .Xdefaults or .Xresources file might look like:

mslExec*fontList:                  9x15bold
msldatabrowser*fontList:           9x15bold
msldatabrowser*textFontList:       9x15bold
msldatabrowser*background:         black
msldatabrowser*foreground:         white
mslMonitor*fontList:               9x15bold
mslMonitor*textFontList:           9x15bold
mslMemoryMap*fontList:             9x15bold
mslMemoryMap*textFontList:         9x15bold
mslProcedurePcs*fontList:          9x15bold
mslProcedurePcs*textFontList:      9x15bold
mslAllocatedRecs*fontList:         9x15bold
mslAllocatedRecs*textFontList:     9x15bold
mslCollectedRecs*fontList:         9x15bold
mslCollectedRecs*textFontList:     9x15bold
mslChunkSpace*fontList:            9x15bold
mslChunkSpace*textFontList:        9x15bold
mslStringSpace*fontList:           9x15bold
mslStringSpace*textFontList:       9x15bold
mslStaticSpace*fontList:           9x15bold
mslStaticSpace*textFontList:       9x15bold

This actually displays the data browser window in inverse video with respect to the default, which is not necessarily recommended. The above settings are shown as samples only; you will probably want your settings to be different.

B.2. Running X and Motif Applications Remotely

It is possible to run an X/Motif application on one machine while using the display of another machine. Suppose you are sitting at the display of a machine called displaymac and you want to run your application on the machine called runmac. You can do this as follows:

In many cases, the above instructions will be sufficient to let you run an X/Motif application remotely. In some cases, however, especially when the local and remote machines are from different manufacturers, the default font on the remote machine (runmac) may not be available on the local machine (displaymac). This will cause X to issue a series of error messages when the application initializes itself; in the case of the MAINSAIL Motif-based tools, MAINSAIL will be unable to proceed from this point.

To fix this situation, you need to specify a value for the resource name *font in your .Xdefaults or .Xresources file on runmac. The value for this resource should be a font that is available on both runmac and displaymac. For example, add the following line to your .Xdefaults or .Xresources file:

*font:          fixed

(provided that the font name fixed works on both machines. You may choose a different font if you prefer it and it is available).

The change to your .Xresources or .Xdefaults file may not take effect until the next time you log in or reboot runmac; to make the change take effect immediately, use the xrdb command, e.g.:

xrdb ~/.Xdefaults

previous   next   top   contents   index   framed top   this page unframed

Motif-Based MAINSAIL Tools Reference Guide, Appendix B