source: trunk/doc/osx.html @ 893

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

# on 2007/01/25 22:18:16, toby did:
major revision

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