source: trunk/doc/osx.html @ 891

Last change on this file since 891 was 891, checked in by toby, 11 years ago

# on 2007/01/17 04:45:37, toby did:
remove NIST web exit hijacks

  • Property rcs:author set to toby
  • Property rcs:date set to 2007/01/17 04:45:37
  • Property rcs:lines set to +7 -13
  • Property rcs:rev set to 1.8
  • Property rcs:state set to Exp
  • Property svn:keywords set to Author Date Revision Id
File size: 13.7 KB
Line 
1<HTML>
2<HEAD>
3   <TITLE>Mac OS X Installation Notes for EXPGUI</TITLE>
4   <meta name="keywords" content="crystallography, Rietveld, diffraction,
5   GSAS, EXPGUI, Mac, OS X">
6</HEAD>
7<style>
8A:link {text-decoration:none}
9A:vlink {text-decoration:none}
10</style>
11
12<BODY BGCOLOR="#FFFFFF"
13      topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" 
14      text="#000000" link="#0033ff" vlink="#0033ff" alink="#0033ff">
15
16<?
17   include("/var/www/include/navigation.inc");
18   include("/var/www/include/utility.inc");
19?>
20<blockquote><font face="arial, helvetica, sans-serif">
21
22<TABLE BORDER BGCOLOR="#FFFF40" ALIGN=RIGHT>
23<TR><TH><A  Href="expgui.html">EXPGUI home</A> 
24</TH></TR></TABLE><BR CLEAR=ALL>
25<CENTER><H1>
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">
29</H1></CENTER>
30
31
32This page contains information on installing and running GSAS & EXPGUI
33on Macintosh OS X computers. The software has been built using OS X 10.2.8
34and has been installed successfully on 10.2 and 10.3 machines.
35
36<h2>Installation</H2>
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.
43
44<OL>
45<P><LI>Install X11
46<DL><DL><I>
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>
50<P>
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.
54<P>
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.
62<P>
63X11 for 10.3 can also be downloaded (43 Mb!)
64from Apple
65(<a href="http://www.apple.com/support/downloads/x11formacosx.html"
66>http://www.apple.com/support/downloads/x11formacosx.html</A>).
67<P>
68If you have a PowerBook that shipped with 10.3, you may have your
69OS X distribution on two DVDs, so you don't have CDROM #3.
70While Apple technical support does not appear to know this
71(or at least they did not, when I called),
72I found the X11 package in a folder hidden on the DVD.
73Use the finder Go/"Go to folder" (shift-command-G) menu item to open
74hidden folder <tt>/Volumes/PowerBook Software/System</tt>
75on the first Powerbook software DVD;
76then double-click on the <tt>Installation</tt> folder
77to open it and then open the <tt>Packages</tt> folder.
78(Yes, you could have typed
79<tt>/Volumes/PowerBook Software/System/Installation/Packages</tt>,
80but why buy a Mac if you like to type long names?).
81Finally, double-click on the X11User.pkg file and X11 is installed.
82Just like that!
83<P>
84For people who do like the command line, typing this works too:
85<PRE>
86     find /Volumes  -name "X11User.pkg"
87</PRE>
88You can then copy the file to some place that is easy to access
89(like the desktop) so that it is easy to click on with a command like this:
90<PRE>
91    cp "/Volumes/PowerBook Software/System/Installation/Packages/X11User.pkg" ~/Desktop/
92</PRE>
93</DL></DL>
94
95<P><LI>Download the GSAS & EXPGUI programs as a Mac disk image.
96<DL><DL>
97<I>Download this file from the NIST website:</I>
98<BR>
99<a href="ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsasexpgui.dmg">
100ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsasexpgui.dmg</a> (~13 Mb)
101<BR>
102<I>This file can also be downloaded from the CCP14 mirrors:</I>
103[(<a href="http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
104>UK</a>),   
105(<a href="http://ccp14.sims.nrc.ca/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
106>Canada</a>),
107(<a href="http://ccp14.semo.edu/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
108>US</a>) or
109(<a href="http://ccp14.minerals.csiro.au/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
110>Australia</a>)].
111<P>
112
113Mount this file by double-clicking on it. This should create a new volume in
114your top-level ("Computer") called "GSASvol"; clicking on this device will open
115a finder window with a single folder ("gsas") present.
116(<I>Note that some browsers will automatically perform this step for
117you.</I>)
118<P>
119
120<I>While you can run GSAS & EXPGUI from this location, you are strongly
121suggested to instead copy the entire package to your computer by dragging the
122gsas folder icon to another finder window, or by clicking on it and using
123Copy and Paste.</I>
124</DL></DL>
125
126<LI>Install a "shortcut" to launch EXPGUI
127<DL><DL>
128<IMG SRC="expgui_osx.jpg" ALT="EXPGUI AppleScript icon" ALIGN="RIGHT">
129The OS X version of GSAS & EXPGUI has an EXPGUI AppleScript application
130named <tt>expgui.app</tt> in the gsas folder with the icon shown
131to the right. This AppleScript will start X11,
132if needed and then lauch EXPGUI. (If you have ideas for improving the script,
133the code can be found in file expgui_applescript.txt.)
134The EXPGUI AppleScript can be used in three ways:
135<UL>
136<P><LI>Double-clicking on the icon will launch EXPGUI so that it starts
137with the "file open" window in your home directory. This
138window can then be used to navigate to
139access/create experiments in other folders.
140<P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon
141will cause the experiment files to be opened. If more than one file is dropped,
142each file will open in a separate EXPGUI session.
143<P><LI>Dropping one or more folders onto the EXPGUI icon will cause EXPGUI to be
144started with the "file open" window in that folder.
145</UL>
146<P>
147If you will use GSAS a fair amount, you will likely
148find it convenient to drag the EXPGUI icon to the dock
149for easy access.
150<P>
151Note, that this <B><U>EXPGUI app will not
152work correctly if copied or moved to another folder</U></B>.
153It must be located
154in the gsas folder along with all the other files and
155subdirectories needed by GSAS & EXPGUI -- you can instead
156create an alias (by highlighting the AppleScript icon in the Finder
157and using the File/"Make alias" menu item or the Command-L shortcut). An alias
158created in this fashion can be moved wherever desired -- for example, to
159the desktop or to the Application folder.
160</DL></DL>
161
162<LI>For Unix power users: Make a command line shortcut (optional)
163<DL><DL>
164<I>People who have not become completely enlighted to the Mac may wish to
165set up a way to type something (gasp!) in a terminal window that will allow
166them to start EXPGUI. There are a number of ways this can be done,
167(see section 2.2 in the
168<A Href="expgui_Unix_readme.html">Unix installation notes</A>.)
169Also, on the Mac it is possible to add applications to the X11 Applications
170menu, by using the Applications/Customize menu option.
171Note that the command used to start Tcl/Tk and EXPGUI will vary depending
172on where you installed the package. I install the package in ~/Applications
173so the command string to start EXPGUI using:</I> 
174<PRE>
175          ~/Applications/gsas/ncnrpack-osx  ~/Applications/gsas/expgui/expgui
176</PRE>
177</DL></DL>
178
179</OL>
180
181<HR noshade><HR noshade>
182<h4>EXPGUI Enhancements specific to the Mac</H4>
183
184EXPGUI will automatically designate the EXPGUI AppleScript
185as the "open with" application for every GSAS experiment (.EXP) file
186that is read or written by EXPGUI. This is done with the
187Development Tools program Rez, found in /Developer/Tools or in the gsas folder.
188At the same time, EXPGUI will also set an icon for the .EXP file.
189After this has been done, EXPGUI can be invoked by simply double-clicking on
190a GSAS experiment file (.EXP file) icon.
191<P>
192If for some reason you would prefer this not be done
193(I would be interested to hear why) -- deselect the
194"Assign app to .EXP files" checkbox in the Options menu.
195
196<HR noshade><HR noshade>
197<h4>Mac ideosyncracies</H4>
198<P>
199Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated
200until they are brought to the top of the screen by clicking on them
201(given focus). This is most noticible for PGPLOT
202graphics (in POWPLOT, RAWPLOT,...).
203When you type graphics commands in a terminal window, the plot does not
204appear to change. However, click on the PGPLOT's window bar and the plot will
205update.
206
207<HR noshade><HR noshade>
208<h4>The Tcl/Tk Starkit</H4>
209<P>
210The GSAS-EXPGUI distribution now includes a single file version of the
211entire Tcl/Tk package, as well as a graphics package for Tcl/Tk, called
212BLT, that is used extensively within EXPGUI. The inclusion of this file
213within the package simplifies installation considerably.
214This single 3 Mb file,
215<tt>gsas/ncnrpack_osx</tt>, contains many other Tcl/Tk packages (that are
216not used within EXPGUI) and may be of value for use with other applications.
217Note that the EXPGUI AppleScript will look for Tcl/Tk first as the
218<tt>ncnrpack_osx</tt> file in the same folder as where the <tt>expgui.app</tt> 
219script is located. If this <tt>ncnrpack_osx</tt> 
220file is deleted, renamed or moved,
221then the script will look for the standard Tcl/Tk program (<tt>wish</tt>) in the
222<tt>/sw/bin</tt> directory.
223<HR noshade><HR noshade>
224
225<h4>Problems</H4>
226If you cannot get EXPGUI or the GSAS graphics programs to work,
227you may have a setup problem with X-windows (X11).
228One common reason for this is that X11 must be restarted any time
229your computer's hostname changes, which may be caused by starting/stopping
230networking, dialing in for e-mail or even by a change in
231IP address initiated by the network DHCP server, if you are hardwired into
232a network.
233
234If exiting and restarting X11 does not address your problem,
235the following paragraphs
236may help you diagnose problems.
237<OL><LI>
238One possible problem is the definition for the X11 display (shell
239environment variable DISPLAY).
240On my machine, this variable seems to be set correctly in X11 xterm windows,
241but is not set by default within an Aqua terminal window unless
242you make changes to your shell startup.
243<P>
244A quick test for X11 problems is to type xclock at the shell prompt:
245
246<PRE>
247     bash-2.05a$ xclock
248</PRE>
249If you get a clock display -- great, X windows is working!
250<P>
251If you get the following error message
252the DISPLAY variable is not set:
253<PRE>
254     bash-2.05a$ xclock
255     Error: Can't open display:
256</PRE>
257
258If on the other hand, you get this error message, there is a
259security problem with X windows:
260<PRE>
261     bash-2.05a$ xclock
262     Error: Can't open display: localhost:0.0
263</PRE>
264This will most likely be solved by exiting and restarting X11 (see above).
265<P>
266You can set the DISPLAY variable in bash/zsh, etc. using:
267<PRE>
268     bash-2.05a$ export DISPLAY=localhost:0.0
269</PRE>
270
271or in csh/tcsh, etc. using:
272
273<PRE>
274     [d120234:~] toby% setenv DISPLAY localhost:0.0
275</PRE>
276(For info on how to do this automatically, see step 2 in
277<a href="http://www.chemistry.ucsc.edu/~wgscott/xtal/page1.html"
278>http://www.chemistry.ucsc.edu/~wgscott/xtal/page1.html</A>).
279<P><LI>
280A second possible problem relates to the installation of the
281Tcl/Tk and BLT packages. This problem seems unlikely, now that
282the Tcl/Tk package is included in the distribution, but if you have
283removed the ncnrpack_osx file from the gsas folder, the expgui.app AppleScript
284will try to use wish installed in /sw/bin. If you are choosing to do this,
285you can test if Tcl/Tk and the BLT package are installed correctly using the
286following commands:
287<PRE>
288     [d120234:~] toby% wish
289     % package require BLT
290     2.4
291     % pack [blt::graph .g]
292     % exit
293</PRE>
294When you type "wish" and press Enter, a new small blank window should appear.
295when you type the 2nd line, "package require BLT," there will be no change in
296the blank window, but the computer should respond "2.4". After the
297"pack [blt::graph .g]" command is entered, a set of x- and y-axes should appear
298in this window. The window should disappear after "exit" is typed.
299</OL>
300<P>
301<HR>
302<P>
303  The EXPGUI icon, the original version of the EXPGUI AppleScript
304  and help with this documentation was provided by
305  Francois Farges -- many thanks!
306<P>Thanks to Paul Kienzle of the
307<a href="http://www.ncnr.nist.gov/dave/">
308NCNR DAVE project</A> for providing the "all in one file" (starkit)
309version of Tcl/Tk for OS X.
310
311<P>GSAS is Copyright, 1984-2000, by
312the Regents of the University of California.
313The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36)
314by the Los Alamos National Laboratory, which is operated by the University
315of California for the U.S. Department of Energy. The U.S. Government is
316licensed to use, reproduce, and distribute this software. Permission is
317granted to the public to copy and use this software without charge, provided
318that this notice and any statement of authorship are reproduced on all
319copies. Neither the Government nor the University makes any warranty, express
320or implied, or assumes any liability or responsibility for the use of this
321software.
322
323<P>The author of EXPGUI is a U.S. Government employee which means that
324EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write
325new sections and make them available to the rest of the world.
326
327<p>Neither the U.S. Government nor any author makes any warranty,
328expressed or implied, or assumes any liability or responsibility
329for the use of this information or the software described
330here. Brand names cited herein are used for
331identification purposes and do not constitute an endorsement by NIST.
332</blockquote>
333<hr>
334<P><font size=-1><a href="mailto:crystal@nist.gov">Questions/Problems: crystal@nist.gov</a>
335<br>
336$Revision: 891 $ $Date: 2009-12-04 23:13:49 +0000 (Fri, 04 Dec 2009) $
337</BODY>
338</HTML>
Note: See TracBrowser for help on using the repository browser.