Ptolemy NT Hints

Startup

If you need to install Ptolemy under NT, see Ptolemy NT Installation.
  1. You will need to set certain environment variables. Under NT, the way to do this is to use the Start Menu -> Settings -> Control Panels -> System and then to select the Environment Tab. The top pane contains the system wide variables, which can only be set if you have Administrator privileges. The bottom pane contains user specific settings.
    The values of PTOLEMY and PTARCH should follow these conventions:
  2. The value should not contain a colon ':'. For example, D:/users/ptolemy is incorrect.
  3. Do not use multiple slashes.
    For example, //D/users/ptolemy is incorrect.
  4. PTOLEMY should be set to the directory that contains the Ptolemy distribution. For example, /users/ptolemy.
  5. PTARCH should be set to nt4
  6. PATH should contain
  7. c:\usr\X11R6.4\bin - The location of the X11 distribution
  8. %PTOLEMY%/bin;%PTOLEMY%/bin.nt4
  9. If you are using the Java pxgraph, then you path should include the directory that contains the java.exe binary.
  10. Start up Exceed by mousing on Start Menu->Programs->eXceed->eXceed
  11. Start up bash by mousing on the icon in Start Menu->Programs->Cygwin32
  12. In bash, do
    DISPLAY=localhost:0
    export DISPLAY
    cd $PTOLEMY
    pigi
    
  13. If pigi does not start up, follow the steps below:
    1. Verify that your x server is running by starting up a client, such as:
      xterm &
      
    2. Try running the pigi script with sh -x
      sh -x $PTOLEMY/bin/pigi
      
      and look for errors in the output.
  14. pigi starts up vem, which in turn starts up pigiRpc. You can start vem by hand with the following under bash
    OCTTOOLS=$PTOLEMY
    export OCTTOOLS
    vem
    
  15. Try starting up ptiny, which brings up a smaller version of Ptolemy that includes SDF and DE only:
    pigi -ptiny
    
  16. You could also try starting up ptcl, which is the non-graphical Ptolemy type:
    ptcl
    
    if you get a prompt, type
    domains
    
    you should get the domains listed.

NT Hints

  • The NT Resource kit includes a shutdown.exe binary that can be executed from a bash shell. The following command should reboot:
    shutdown /L /R /Y /C
    
  • Cygwin32 hints

    If you have problems, try searching the Cygwin32 mailing list archives via Cygnus Cygwin32 page. The FAQ is also useful.

    Setup

  • c:\cygnus\cygwin-b20\Cygnus.bat is a MSDOS batch script that starts up bash with the proper environment variables set for finding the compiler and such. Cygnus.bat is what is run when the Cygnus icon in the Program menu is clicked on. If you ever need to start bash from a MSDOS prompt, you get better results if you run Cygnus.bat instead of bash.exe itself
  • If your tree is located on a Unix file system, use Samba. See the Ptolemy NT Installation page for details
  • If you install the Cygwin X11R6 binaries and Exceed, then you can set up NT so that you can telnet in and bring up remote xterms. The xterm terminal emulator is better than the vanilla bash terminal, since you can have scrollbars and use less with xterm, but not with the vanilla bash emulator.
    1. Turn on the telnetd daemon by going to Control Panels -> HCL Inetd and then selecting Telnetd and then Enable
    2. From the remote machine, telnet in to the NT machine. You will be running a DOS shell.
    3. To bring up bash with the proper environment, run C:\cygnus\cygwin-b20\cygnus
    4. To bring up an xterm from within bash:
      	DISPLAY=yourremotemachine:0
      	export DISPLAY
      	xterm -sb -e bash &
      	
  • The Bash type command is invaluable in debugging path problems. type is like the C-Shell which command, it will tell you which script or binary you are actually running.
  • To use gdb remotely without the Tcl interface, start it with
    gdb -nw
    
  • Cygwin32 pathnames

    The way that Cygwin32 handles pathnames can cause a lot of problems.
  • The FAQ on the Cygnus Cygwin32 page has some information about pathnames.
  • Cygwin32 automatically converts backslashes in Windows environment variables to forward slashes. This causes no end of problems with /bin/sh scripts that are calling java, which expects Windows style backslashed pathnames in command line arguments
  • Cygwin32 has the mount command, which allows the user to mount local and remote file systems in the Cygwin32 file space. The downside of this is that applications that do not use the Cygwin32 api will not be able to see the Cygwin32 mount points. For example:
  • java will not be able to access files mounted via the Cygwin32 mount point.
  • Tycho can have similar problems. Note that if you install Ptolemy under NT, there are now two distinct ways to run Tycho under NT:
    1. Using the prebuilt native Windows itkwish.exe. This binary is available on the Itcl website. This binary uses the native Windows pathnames, so it will not understand Cygwin32 mount points.
    2. Using the Cygwin32 $PTOLEMY/tcltk/itcl.nt4/bin/itkwish2.2.exe binary. This binary is built during the Ptolemy Tcl/Tk installation process. This binary understands Cygwin32 mount points.
  • When Cygwin32 is converting environment variables to forward slashes, it may also attempt to substitute in any mount points it knows about. This can cause problems as well.
  • The location of your root directory can also cause problems with java. For example, if Cygwin is setup so that /tmp is actually d:/tmp, then java will probably look in the Windows root, which could be c:\tmp. Remounting d:/ as / might help here. The Cygwin FAQ might also have hints.
  • X11 Hints

  • Under Exceed, the middle mouse button is emulated by holding both mouse buttons. The Input configuration icon has a check box to turn on the middle mouse button emulation and an entry widget to control how the timing.

  • Up to the Ptolemy under NT page - Back to Ptolemy NT Overview - Forward to Ptolemy NT Installation
    Copyright © 1997-1999, The Regents of the University of California. All rights reserved.
    Last updated: 10/31/99, comments to: cxh at eecs