How to Setup IDL and X-windows at PPPL

General Information

Although you may run IDL from a non-X terminal (like VersaTerm using Tektronix graphics), many applications need X-windows.

Three (of many) ways to use X windows with IDL follow. You must first setup IDL in system-specific ways (see below).

  1. On an X-terminal, type "idl" (without quotes) at the system prompt in any xterm, decterm or telnet window.
  2. On a Macintosh, start eXodus (with at least 13 MB of memory; 32 MB should be always enough unless you run movies in X memory). Run in "Rooted" mode. Use the "Sample XDM Session" under the Communications menu to get an interactive window. If your DISPLAY variable is set, plots from IDL will come to your Mac screen.
  3. On a Macintosh, run VersaTerm and an X-emulator, like eXodus (recommended) or MacX. The X-emulator may need 12-13 MB of memory for some X applications (more is safer). The X-emulator should be configured as "Rootless" and, preferably, 256 colors. If the DISPLAY variable has been set (see below) in the VersaTerm session, the plots created in the IDL session in VersaTerm will be sent to an X-window.

    NOTE THAT VERSATERM MAY NOT WORK AT PPPL AFTER September, 2005, SINCE TELNET IS CONSIDERED INSECURE!!!

If you want to use X-windows on a Macintosh, you need to have MacX or eXodus installed on your Macintosh and use TCP/IP networking. See Exodus Tips for a simple Macintosh setup. See General Atomics' web page on eXodus for setup tips and commonly encountered problems.

Setup Details

As with any X-windows application, IDL needs to know the TCP/IP number of your display device. If the settings are wrong, IDL will display the following message:
% DEVICE: Unable to open X Windows display.
          Is your DEVICE environment variable set correctly?
Some window managers automatically set this information, but if not, you can do it manually. You will need to know your computers TCP/IP number, e.g., 198.35.2.251, or the name, such as mything.pppl.gov. See the architecture-specific information below. Additionally, most X-window systems (but not MacX and eXodus) need permission to send their X windows to your X display. For example, if you have logged into sunfire14 to run IDL, you will have to type
	xhost sunfire14.pppl.gov
in a login window, or give permission through some security menu, to allow X windows from sunfire14.pppl.gov to be displayed at your display.

On the PPPL UNIX Cluster

IDL is on several UNIX computers at PPPL. General UNIX users should use portal. NSTX users should use nstxpool (you must be in the unix group "nstx" to log into nstxpool computers).

IDL will be in your path, so simply type idl to the system prompt.

NSTX users new to Unix should read /p/nstxusr1/util/init_files/AAA_Whats_Here.txt.

To have access to NSTX-support (and some other user-written routines), you will need additional directories added to your IDL_PATH environmental variable. If you are running the csh or tcsh shells, place the following in your .cshrc UNIX startup file:

     module load nstx/mdsplus

and to set your DISPLAY environmental variable (if the system doesn't do so already, as when using ssh):

        sunfire14.pppl.gov% setenv DISPLAY mything.pppl.gov:0
(substituting your TCP/IP identifier for mything.pppl.gov).

If you are running bash, include the following line in your .bashrc file:

    if [ -f /nstxusr1/MDSbashSetup ]; then . /nstxusr1/MDSbashSetup; fi
If you want to use Tektronix graphics on Unix, rather than X, once you are in IDL, type the following:
    IDL> SET_PLOT,'tek'
    IDL> DEVICE, /TEK4100
You may wish to put these in your IDL startup file ($HOME/.idl_startup).

On the PPPL VMS Cluster

General VMS users should use Europa:

    a) If NOT using an X-window for IDL output, simply:
   
        EUROPA$ setup idl
        EUROPA$ idl
        
    b) Otherwise:
        
	EUROPA$ setup nstx	! defines the symbol set_display
        EUROPA$ set_display mything.pppl.gov
        EUROPA$ setup idl x
        EUROPA$ idl
        
       or, if you prefer to use the IDL Development Environment on VMS:
       
	EUROPA$ setup nstx	! defines the symbol set_display
        EUROPA$ set_display mything.pppl.gov
        EUROPA$ setup idlde	! only runs in X-windows
        EUROPA$ idlde
        
(substituting your TCP/IP identifier for mything.pppl.gov). Note that everything but the "idl" or the "idlde" command can go in your login.com file.

NOTE: If you used Secure Shell (ssh) to move to the VMS computer, you will NOT need to manually set your DISPLAY. ssh needs it's own TCP/IP number, so changing it will not work.

Frequently Asked Questions

  1. How can I keep the colors from flashing on my X-display when I change focus to different windows?

    You have some options. See Limiting "Flashing" when using IDL at PPPL.

  2. Why are all my colors very dark/really off, etc.?

    Your monitor, or X-server, is probably set for 24-bit color (millions of colors), and the IDL routines are trying to work with 8-bit color. Do the following immediately upon entering IDL:

         IDL> Device, Pseudo_Color=8, Decomposed=0
    
    See http://NSTX.pppl.gov/nstx/Software/IDL/simplecolors.html for an easy way to plot with named colors in IDL. Excellent advice on using color in IDL is provided at Fanning Consulting IDL Pages . The page on Limiting "Flashing" when using IDL at PPPL is also relevant.

Documentation

Hardcopy of the IDL documentation is available, but you may actually prefer the online documentation supplied with IDL. If you are running X-windows, simply type "?" at the IDL prompt. This documentation can also be viewed from a macintosh without an IDL license -- the files may be downloaded from the PPPL Public Mac Area) (contact the help desk). Documentation sets are available in various locations around the lab. Sets may ordered from RSI at 303-786-9900.

If the IDL documention convention has been followed, you may get documentation on individual routines by typing:

        IDL> doc_library,'routine_name'

Please mail comments on this page to bdavis.

updated:01-Sep-05
by: Bill Davis