Top Up Prev Next Bottom Contents Index Search

G.3 Window system problems

Below we discuss various problems we've seen between Ptolemy and the X window system.

Error: not found

You have not installed the shared library needed by Ptolemy when it is used under OpenWindows.

pigi fails to start and gives a message about not finding fonts

The default fonts for vem are specified in the file $PTOLEMY/lib/pigiXRes9, and also and pigiXRes9.cp. These files define a set of X window resources. The file is used if pigi is started with the -bw option. The .pigiXRes9.cp file is used in pigi is started with the -cp option. The definitions in these files can be overridden by the user. For example, a user who prefers to use microscopic fonts could set the X resource as follows:

Vem*font: *-times-medium-r-normal--*-120-* If, however, the fonts defined in these files on not available on the system, then the Ptolemy installer should change them in the files $PTOLEMY/lib/pigiXRes9*.

The fonts for tk (and hence, the fonts for most of the dialog boxes) are specified in $PTOLEMY/lib/tcl/ptkOptions.tcl. These may similarly require modifications at some sites. In the worst case, if many standard fonts are not available, it may be necessary to redefine the default fonts built into the tk source code, and recompile tk. You may find the X11 program xlsfonts useful.

Ptolemy startup window only has an OK button

If the Ptolemy startup window does not have the Mr.Ptolemy bitmap and the copyright
button, but instead the startup window is very small and has only an OK button, then you probably have font problems, see the section above for details about fonts.

Errors involving xedit

The program xedit is a program provided with Ptolemy to display text files on your screen during a Ptolemy run. Over time, we plan on using tycho, the Ptolemy syntax editor, as a replacement for xedit.

If there is some problem with xedit that you cannot solve, or you do not like xedit, it is possible to change the display program used by Ptolemy. To do this, you need to set the PT_DISPLAY environment variable before you run pigi. For example, to use PT_DISPLAY to view files in a separate tycho window, do:

setenv PT_DISPLAY "tycho %s"

To use PT_DISPLAY to view files in a new xterm window with the vi editor, do

setenv PT_DISPLAY "xterm -e vi %s"

The value of the PT_DISPLAY variable is a printf format string with one %s in it. That %s is replaced with the file to be viewed, for look-inside commands and to view generated code. The default value is "xedit %s".

Emacs confuses .pl files with Prolog

The .pl extension used to define Ptolemy stars is the same extension used for the Prolog language. Some text editors, such as emacs, have special modes for editing Prolog files. These modes are inappropriate for editing Ptolemy files. You can add the following line to your .emacs file in your home directory:

(setq auto-mode-alist (cons '("\\.pl$" . c++-mode) auto-mode-alist))

Problems with the colormap

Some applications, for example FrameMaker 5, allocate as many colors as they can from the colormap when they start up. This may force applications that are started later (such as pigi) to have access to a very restricted set of colors. If when you start pigi, the welcome window appears in black and white, then you may have such a situation. If the situation is worse, and there are not enough colors in the colormap for vem to start, then you may not even get this far. One solution is simply to exit the offending application (e.g., FrameMaker or Netscape), and restart pigi. A better solution is to configure the offending application to use fewer slots in the colormap. We have found that for FrameMaker 5, the following X resources (placed in your .Xdefaults file) usually solve the problem:

Maker.targetExactColors: 2 Maker.minimumExactColors: 0 Maker.targetColorCube: 4 Maker.minimumColorCube: 1 This still leaves FrameMaker with a very rich set of colors to use. You may need to replace the 2 or 4 with smaller numbers if you have other color-intensive applications running (such as root window pictures of beaches in Tahiti).

The HP window system, VUE, may not display the correct colors when running Ptolemy. If the Vem window appears with white text on a tan background, or if the Ptolemy run window appears blue instead of tan, then VUE is getting the Ptolemy colors wrong.

The solution here is force VUE to use the regular Ptolemy X resources. Before starting pigi, in an xterm, do the following line:
xrdb -load $PTOLEMY/.Xresources
Then run pigi.

The window manager crashes

The window manager twm sometimes crashes when you are running Ptolemy. We do not know why. It seems to be an interaction with Tk. Our solution is to simply restart it. You may wish to make sure your configuration does not log you out when the window manager exits.

Problems with Mac X and Ptolemy

Some people have had difficulties running Ptolemy with Mac X. Tze-Wo Leung of Bell Northern Research suggests the following setup for Mac X when using Ptolemy:

Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.