source: trunk/doc/osx.html @ 971

Last change on this file since 971 was 971, checked in by toby, 14 years ago

change web pages to html

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