source: trunk/doc/osx.html @ 813

Last change on this file since 813 was 813, checked in by toby, 12 years ago

# on 2004/09/28 22:41:00, toby did:
major update; simply install

  • Property rcs:author set to toby
  • Property rcs:date set to 2004/09/28 22:41:00
  • Property rcs:lines set to +126 -161
  • Property rcs:rev set to 1.4
  • Property rcs:state set to Exp
  • Property svn:keywords set to Author Date Revision Id
File size: 13.6 KB
3   <TITLE>Mac OS X Installation Notes for EXPGUI</TITLE>
4   <meta name="keywords" content="crystallography, Rietveld, diffraction,
5   GSAS, EXPGUI, Mac, OS X">
8A:link {text-decoration:none}
9A:vlink {text-decoration:none}
13      topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" 
14      text="#000000" link="#0033ff" vlink="#0033ff" alink="#0033ff">
17   include("/var/www/include/");
18   include("/var/www/include/");
20<blockquote><font face="arial, helvetica, sans-serif">
23<TR><TH><A  Href="expgui.html">EXPGUI home</A> 
26<HR noshade width="75%" size="2" align="center">
27Installing GSAS/EXPGUI under Mac OS X
28<HR noshade width="75%" size="2" align="center">
[773]32This page contains information on installing and running GSAS & EXPGUI
[813]33on Macintosh OS X computers. The software has been built using OS X 10.2.8
[762]34and has been installed successfully on 10.2 and 10.3 machines.
[813]37<IMG SRC="new.gif" HEIGHT=13 WIDTH=36 alt="New!">
38Installation has been dramatically simplified. You may still want
39to install the development environment (XCODE) and Fink, but these are no
40longer required to install and run GSAS and EXPGUI. GSAS & EXPGUI now contains
41a copy of the Tcl/Tk package (that includes BLT), so installation of this
42package is also now optional.
45<P><LI>Install X11
[813]47Before you can run the GSAS package (or, for that matter,
48a large number of other Unix-derived graphics applications),
49you need to load the X Windows system (X11) onto your computer. </I>
51For 10.2 (Jaguar), this is a bit complex to explain,
52so you will need to do some searching on the web, find a guru or
53consult one of the many Mac OS X books that cover this subject.
55For 10.3 (Panther), Apple bundles a version of X11 with the OS
56and installing can be
57very simple. It can be installed directly from CD-ROM #3 of the OS X
58distribution CD disks. To install X11, insert CDROM #3, then click on the
59Packages folder and within that folder, click on X11User.pkg. Read the
60installation screens, click on the "next" button a few times, and
61X11 is installed.
63X11 for 10.3 can also be downloaded
64from Apple
65(<a href="
69If you have a PowerBook that shipped with 10.3, you may have your
70OS X distribution on two DVDs, so you don't have CDROM #3.
71While Apple technical support does not appear to know this
72(or at least they did not, when I called),
73you can find the X11 package in a folder hidden on the DVD.
74Use the finder Go/"Go to folder" (shift-command-G) menu item to open
75hidden folder <tt>/Volumes/PowerBook Software/System</tt>
76on the first Powerbook software DVD;
77then double-click on the <tt>Installation</tt> folder
78to open it and then open the <tt>Packages</tt> folder.
79(Yes, you could have typed
80<tt>/Volumes/PowerBook Software/System/Installation/Packages</tt>,
81but why buy a Mac if you like to type long names?).
82Finally, double-click on the X11User.pkg file and X11 is installed.
83Just like that!
[773]86<P><LI>Download the GSAS & EXPGUI programs as a Mac disk image.
88<I>Download this file from the NIST website:</I>
[813]90<a href="">
91</a> (~13 Mb)
93<I>These files can also be downloaded from the CCP14 mirrors:</I>
[762]94[(<a href="
97(<a href="
100(<a href="
[762]102>US</a>) or
103(<a href="
108Mount this file by double-clicking on it. This should create a new volume in
109your top-level ("Computer") called "GSASvol"; clicking on this device will open
110a finder window with a single folder ("gsas") present.
[813]111(<I>Note that some browsers will automatically perform this step for
[773]115<I>While you can run GSAS & EXPGUI from this location, you are strongly
116suggested to instead copy the entire package to your computer by dragging the
117gsas folder icon to another finder window, or by clicking on it and using
118Copy and Paste.</I>
[773]121<LI>Install a "shortcut" to launch EXPGUI
[773]123<IMG SRC="expgui_osx.jpg" ALT="EXPGUI AppleScript icon" ALIGN="RIGHT">
[813]124The OS X version of GSAS & EXPGUI has an EXPGUI AppleScript application
125named <tt></tt> in the gsas folder with the icon shown
[773]126to the right. This AppleScript will start X11,
127if needed and then lauch EXPGUI. (If you have ideas for improving the script,
128the code can be found in file expgui_applescript.txt.)
129The EXPGUI AppleScript can be used in three ways:
131<P><LI>Double-clicking on the icon will launch EXPGUI so that it starts
132with the "file open" window in your home directory. This
133window can then be used to navigate to
134access/create experiments in other folders.
135<P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon
136will cause the experiment files to be opened. If more than one file is dropped,
137each file will open in a separate EXPGUI session.
138<P><LI>Dropping one or more folders onto the EXPGUI icon will cause EXPGUI to be
139started with the "file open" window in that folder.
[813]142If you will use GSAS a fair amount, you will likely
143find it convenient to drag the EXPGUI icon to the dock
[773]144for easy access.
[773]146Note, that this <B><U>EXPGUI app will not
[813]147work correctly if copied or moved to another folder</U></B> it must be located
148in the gsas folder along with all the other files and
149subdirectories needed by GSAS & EXPGUI -- you can instead
150create an alias (by highlighting the AppleScript icon in the Finder
151and using the File/"Make alias" menu item or the Command-L shortcut). An alias
152created in this fashion can be moved wherever desired -- for example, to
[773]153the desktop or to the Application folder.
[813]156<LI>For Unix power users: Make a command line shortcut (optional)
[813]158<I>People who have not become completely enlighted to the Mac may wish to
159set up a way to type something (gasp!) in a terminal window that will allow
160them to start EXPGUI. There are a number of ways this can be done,
161(see section 2.2 in the
162<A Href="expgui_Unix_readme.html">Unix installation notes</A>.)
163Also, on the Mac it is possible to add applications to the X11 Applications
164menu, by using the Applications/Customize menu option.
165Note that the command used to start Tcl/Tk and EXPGUI will vary depending
166on where you installed the package. I install the package in ~/Applications
167so the command string to start EXPGUI using:</I> 
169          ~/Applications/gsas/ncnrpack-osx  ~/Applications/gsas/expgui/expgui
[773]175<HR noshade><HR noshade>
176<h4>EXPGUI Enhancements specific to the Mac</H4>
178EXPGUI will automatically designate the EXPGUI AppleScript
179as the "open with" application for every GSAS experiment (.EXP) file
[813]180that is read or written by EXPGUI. This is done with the
181Development Tools program Rez, found in /Developer/Tools or in the gsas folder.
182At the same time, EXPGUI will also set an icon for the .EXP file.
183After this has been done, EXPGUI can be invoked by simply double-clicking on
184a GSAS experiment file (.EXP file) icon.
[773]186If for some reason you would prefer this not be done
187(I would be interested to hear why) -- deselect the
188"Assign app to .EXP files" checkbox in the Options menu.
[773]190<HR noshade><HR noshade>
[762]191<h4>Mac ideosyncracies</H4>
[773]193Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated
194until they are brought to the top of the screen by clicking on them
195(given focus). This is most noticible for PGPLOT
196graphics (in POWPLOT, RAWPLOT,...).
197When you type graphics commands in a terminal window, the plot does not
198appear to change. However, click on the PGPLOT's window bar and the plot will
201<HR noshade><HR noshade>
[813]202<h4>The Tcl/Tk Starkit</H4>
204The GSAS-EXPGUI distribution now includes a single file version of the
205entire Tcl/Tk package, as well as a graphics package for Tcl/Tk, called
206BLT, that is used extensively within EXPGUI. The inclusion of this file
207within the package simplifies installation considerably.
208This single 3 Mb file,
209<tt>gsas/ncnrpack_osx</tt>, contains many other Tcl/Tk packages (that are
210not used within EXPGUI) and may be of value for use with other applications.
211Note that the EXPGUI AppleScript will look for Tcl/Tk first as the
212<tt>ncnrpack_osx</tt> file in the same folder as where the <tt></tt> 
213script is located. If this <tt>ncnrpack_osx</tt> 
214file is deleted, renamed or moved,
215then the script will look for the standard Tcl/Tk program (<tt>wish</tt>) in the
216<tt>/sw/bin</tt> directory.
[773]217<HR noshade><HR noshade>
220If you cannot get EXPGUI or the GSAS graphics programs to work,
[773]221you may have a setup problem with X-windows (X11).
222One common reason for this is that X11 must be restarted any time
[813]223your computer's hostname changes, which may be caused by starting/stopping
224networking, dialing in for e-mail or even by a change in
225IP address initiated by the network DHCP server, if you are hardwired into
226a network.
[773]228If exiting and restarting X11 does not address your problem,
229the following paragraphs
230may help you diagnose problems.
232One possible problem is the definition for the X11 display (shell
233environment variable DISPLAY).
[813]234On my machine, this variable seems to be set correctly in X11 xterm windows,
235but is not set by default within an Aqua terminal window unless
236you make changes to your shell startup.
[813]238A quick test for X11 problems is to type xclock at the shell prompt:
241     bash-2.05a$ xclock
[813]243If you get a clock display -- great, X windows is working!
245If you get the following error message
[762]246the DISPLAY variable is not set:
248     bash-2.05a$ xclock
249     Error: Can't open display:
[813]252If on the other hand, you get this error message, there is a
253security problem with X windows:
255     bash-2.05a$ xclock
256     Error: Can't open display: localhost:0.0
[813]258This will most likely be solved by exiting and restarting X11 (see above).
[762]260You can set the DISPLAY variable in bash/zsh, etc. using:
262     bash-2.05a$ export DISPLAY=localhost:0.0
265or in csh/tcsh, etc. using:
268     [d120234:~] toby% setenv DISPLAY localhost:0.0
[813]270(For info on how to do this automatically, see step 2 in
271<a href="
275A second possible problem relates to the installation of the
[813]276Tcl/Tk and BLT packages. This problem seems unlikely, now that
277the Tcl/Tk package is included in the distribution, but if you have
278removed the ncnrpack_osx file from the gsas folder, the AppleScript
279will try to use wish installed in /sw/bin. If you are choosing to do this,
280you can test if Tcl/Tk and the BLT package are installed correctly using the
[762]281following commands:
283     [d120234:~] toby% wish
284     % package require BLT
285     2.4
286     % pack [blt::graph .g]
287     % exit
289When you type "wish" and press Enter, a new small blank window should appear.
290when you type the 2nd line, "package require BLT," there will be no change in
291the blank window, but the computer should respond "2.4". After the
292"pack [blt::graph .g]" command is entered, a set of x- and y-axes should appear
293in this window. The window should disappear after "exit" is typed.
298  The EXPGUI icon, the original version of the EXPGUI AppleScript
299  and help with this documentation was provided by
300  Francois Farges -- many thanks!
[813]301<P>Thanks to Paul Kienzle of the
302<a href="">
303NCNR DAVE project</A> for providing the "all in one file" (starkit)
304version of Tcl/Tk for OS X.
[762]306<P>GSAS is Copyright, 1984-2000, by
307the Regents of the University of California.
308The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36)
309by the Los Alamos National Laboratory, which is operated by the University
310of California for the U.S. Department of Energy. The U.S. Government is
311licensed to use, reproduce, and distribute this software. Permission is
312granted to the public to copy and use this software without charge, provided
313that this notice and any statement of authorship are reproduced on all
314copies. Neither the Government nor the University makes any warranty, express
315or implied, or assumes any liability or responsibility for the use of this
318<P>The author of EXPGUI is a U.S. Government employee which means that
319EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write
320new sections and make them available to the rest of the world.
322<p>Neither the U.S. Government nor any author makes any warranty,
323expressed or implied, or assumes any liability or responsibility
324for the use of this information or the software described
325here. Brand names cited herein are used for
326identification purposes and do not constitute an endorsement by NIST.
329<P><font size=-1><a href="">Questions/Problems:</a>
331$Revision: 813 $ $Date: 2009-12-04 23:12:29 +0000 (Fri, 04 Dec 2009) $
Note: See TracBrowser for help on using the repository browser.