X Windows Configuration Setup for Using NAG
The document NAG Fortran Library contains an overview of NAG and information on its use that should be read prior to reading this document.
The most efficient way to do program development with NAG on Strauss is to use a workstation that functions as an X Windows server. This type of workstation includes SunRays, Microsoft Windows systems using XMING and UNIX workstations. In these multi-windowed environments, you can open several windows at once—a documentation window, an editor window and a compile/run window.
This document assumes that you have already modified your UNIX configuration files as described in the document Getting Started with NAG: Setting Up Your UNIX Account . Further modifications to these configuration files, described below, will facilitate your use of NAG in an X Windows environment.
Modifying your alias file
The commands nagxterm and nagstrauss
will open an xterm window just for
working with NAG. When you are done
with that window, close it or type
exit. The command nagxterm only works
on Strauss; nagstrauss will works on
any Unix machine with ssh X tunneling
enabled.
Add the following lines to the file
called ~/.alias, which may not exist.
if $?DISPLAY then alias nagxterm '(setenv NEED_NAG; xterm -name commands &)' alias nagstrauss\ ssh -X -f strauss.udel.edu 'setenv NEED_CTT\; xterm -name commands' endif
These three new commands will become defined when you start a new shell or open an new xterm window.
Modifying your X defaults file
The commands in the previous section
all start an xterm with the name
"commands." This is where you type
commands to compile and run your
program. Compiling and running your
program may produce more lines of
output than fit in a normal sized
window. You may want to configure your
X defaults so any window named
"commands" has more lines on the screen
and more lines in the save buffer for
scrolling.
Add the following lines to your
~/.Xdefaults-strauss.udel.edu file on
Strauss.
commands.VT100.Foreground: DarkSlateBlue commands.VT100.Background: lightGray commands.VT100.geometry: 80x48 commands.VT100.saveLines: 4800 commands.VT100.ScrollBar: true
Now, any xterm on Strauss with the name "commands" will have these resources set. The window will be 48 lines long and 4800 lines (100 pages) will be saved in the scrollback buffer. You can use the scrollbar, or you can use the Page Up, Page Down, Home and End keys to display all the saved lines.
It is recommended that you edit the source or data files from another window. That way, the normal output will not be interrupted with full screen edit lines.
Connecting to Strauss from your local desktop
Here are the three steps to start an xterm on Strauss:
- Select an X11 windows server:
You will need an X11 server on your local desktop. Start XMING on a Windows PC or start the X11 application package on a Mac OS X. Local X Windows desktops such as Gnome, KDE or CDE are based on X11, so you do not need to start a new X11 server. - Use an SSH client to connect to
Strauss:
Type ssh -X username@strauss.udel.edu replacing username with your UDelNet ID. On a Windows PC, use the University-supplied SSH client to connect to Strauss with X11 tunneling enabled. - Open a NAG xterm window:
Type nagxterm
These last two steps can be accomplished with one command:
ssh -X -f username@strauss.udel.edu 'setenv NEED_NAG\; xterm -name commands'Use this command to customize your desktop for quickly opening a NAG-configured xterm on Strauss.