source: trunk/doc/osx.html @ 845

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

# on 2005/09/07 21:16:07, toby did:
minor updates

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