source: trunk/doc/osx.html

Last change on this file was 1225, checked in by toby, 8 years ago

update to latest, with Fourier & f'/f

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