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> |
---|
8 | A:link {text-decoration:none} |
---|
9 | A: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"> |
---|
25 | Installing GSAS/EXPGUI under Mac OS X |
---|
26 | <HR noshade width="75%" size="2" align="center"> |
---|
27 | </H1></CENTER> |
---|
28 | |
---|
29 | |
---|
30 | This page contains information on installing and running GSAS & EXPGUI |
---|
31 | on Macintosh OS X computers. |
---|
32 | |
---|
33 | <h2>Installation</H2> |
---|
34 | Both GSAS and EXPGUI require that X-windows (X11) be installed on your Mac. |
---|
35 | Since 10.3, this has been distributed as part of the operating system, but |
---|
36 | is not loaded as part of a default installation. The instructions below |
---|
37 | describe how X11 is installed. |
---|
38 | |
---|
39 | <OL> |
---|
40 | <P><LI>Install X11 |
---|
41 | <DL><DL><I> |
---|
42 | Before you can run the GSAS package (or, for that matter, |
---|
43 | a large number of other Unix-derived graphics applications), |
---|
44 | you need to load the X Windows system (X11) onto your computer. </I> |
---|
45 | <P> |
---|
46 | For 10.4, one can load the Mac OS X install disk. Note that this requires |
---|
47 | administrator access to the computer. The X11 installation procedure consist |
---|
48 | of 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 |
---|
52 | windows by pressing Continue (note that X11 must be installed on the boot |
---|
53 | disk). |
---|
54 | <LI>On the package list page, click on the arrow next to Applications |
---|
55 | to open the list, then select X11 to be installed by clicking in the box |
---|
56 | to the left and click Install. |
---|
57 | <LI>The installation then begins. |
---|
58 | <LI>When installation is complete, the X11 package can be run |
---|
59 | from the utilities menu of the system Applications folder. |
---|
60 | </UL> |
---|
61 | See the page on <a href="x11osx/osx_x11.html"> Installing X11 under Mac OS X</a> |
---|
62 | for more details. |
---|
63 | <P> |
---|
64 | For 10.3 (Panther) I am pretty sure a similar process to 10.4 can be used, |
---|
65 | but I don't have access to a machine that can boot that OS. Alternately, if you |
---|
66 | have OS X 10.3 on CDROMs, insert CDROM #3 and |
---|
67 | then click on the Packages folder and within that folder, |
---|
68 | click on X11User.pkg. Read the |
---|
69 | installation screens, click on the "next" button a few times, and |
---|
70 | X11 is installed. |
---|
71 | <P> |
---|
72 | For 10.2 (Jaguar), X11 installation is not simple, |
---|
73 | so you will need to do some searching on the web, find a guru or |
---|
74 | consult one of the many Mac OS X books that cover this subject. |
---|
75 | One 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 |
---|
79 | for the CPU type of your computer (to find out what you have |
---|
80 | click 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"> |
---|
87 | ftp://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"> |
---|
93 | ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/OSX_gsas+expgui_Intel_2007Jan15.dmg |
---|
94 | </a> (~32 Mb)<BR> |
---|
95 | Intel-based Macs can also use the PPC version, but will |
---|
96 | see 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 |
---|
100 | can use this link:</I> |
---|
101 | <BR><a href= |
---|
102 | "ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/OSX_10.3_gsas+expgui_2007Jan15.dmg"> |
---|
103 | ftp://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> |
---|
107 | for a CCP14 mirror, look in |
---|
108 | http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/ |
---|
109 | </UL></DL> |
---|
110 | |
---|
111 | Mount the downloaded file by double-clicking on it. This should create a new volume in |
---|
112 | your top-level ("Computer") called "GSASvol"; clicking on this device will open |
---|
113 | a finder window with a single folder ("gsas") present. |
---|
114 | (<I>Note that some browsers will automatically perform this step for |
---|
115 | you.</I>) |
---|
116 | <P> |
---|
117 | |
---|
118 | <I>While you can run GSAS & EXPGUI from this location, you are strongly |
---|
119 | suggested to instead copy the entire package to your computer by dragging the |
---|
120 | gsas folder icon to another finder window, or by clicking on it and using |
---|
121 | Copy 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"> |
---|
126 | The OS X version of GSAS & EXPGUI has an EXPGUI AppleScript application |
---|
127 | named <tt>expgui.app</tt> in the gsas folder with the icon shown |
---|
128 | to the right. This AppleScript will start X11, |
---|
129 | if needed and then lauch EXPGUI. (If you have ideas for improving the script, |
---|
130 | the code can be found in file expgui_applescript.txt.) |
---|
131 | The 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 |
---|
134 | with the "file open" window in your home directory. This |
---|
135 | window can then be used to navigate to |
---|
136 | access/create experiments in other folders. |
---|
137 | <P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon |
---|
138 | will cause the experiment files to be opened. If more than one file is dropped, |
---|
139 | each 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 |
---|
141 | started with the "file open" window in that folder. |
---|
142 | </UL> |
---|
143 | <P> |
---|
144 | If you will use GSAS a fair amount, you will likely |
---|
145 | find it convenient to drag the EXPGUI icon to the dock |
---|
146 | for easy access. |
---|
147 | <P> |
---|
148 | Note, that this <B><U>EXPGUI app will not |
---|
149 | work correctly if copied or moved to another folder</U></B>. |
---|
150 | It must be located |
---|
151 | in the gsas folder along with all the other files and |
---|
152 | subdirectories needed by GSAS & EXPGUI -- you can instead |
---|
153 | create an alias (by highlighting the AppleScript icon in the Finder |
---|
154 | and using the File/"Make alias" menu item or the Command-L shortcut). An alias |
---|
155 | created in this fashion can be moved wherever desired -- for example, to |
---|
156 | the 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 |
---|
162 | set up a way to type something (gasp!) in a terminal window that will allow |
---|
163 | them 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>.) |
---|
166 | Also, on the Mac it is possible to add applications to the X11 Applications |
---|
167 | menu, by using the Applications/Customize menu option. |
---|
168 | Note that the command used to start Tcl/Tk and EXPGUI will vary depending |
---|
169 | on where you installed the package. I install the package in ~/Applications |
---|
170 | so 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 | |
---|
181 | EXPGUI will automatically designate the EXPGUI AppleScript |
---|
182 | as the "open with" application for every GSAS experiment (.EXP) file |
---|
183 | that is read or written by EXPGUI. This is done with the |
---|
184 | Development Tools program Rez, found in /Developer/Tools or in the gsas folder. |
---|
185 | At the same time, EXPGUI will also set an icon for the .EXP file. |
---|
186 | After this has been done, EXPGUI can be invoked by simply double-clicking on |
---|
187 | a GSAS experiment file (.EXP file) icon. |
---|
188 | <P> |
---|
189 | If 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> |
---|
196 | Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated |
---|
197 | until they are brought to the top of the screen by clicking on them |
---|
198 | (given focus). This is most noticible for PGPLOT |
---|
199 | graphics (in POWPLOT, RAWPLOT,...). |
---|
200 | When you type graphics commands in a terminal window, the plot does not |
---|
201 | appear to change. However, click on the PGPLOT's window bar and the plot will |
---|
202 | update. |
---|
203 | |
---|
204 | <HR noshade><HR noshade> |
---|
205 | <h4>The Tcl/Tk Starkit</H4> |
---|
206 | <P> |
---|
207 | The GSAS-EXPGUI distribution now includes a single file version of the |
---|
208 | entire Tcl/Tk package, as well as a graphics package for Tcl/Tk, called |
---|
209 | BLT, that is used extensively within EXPGUI. The inclusion of this file |
---|
210 | within the package simplifies installation considerably. |
---|
211 | This single 3 Mb file, |
---|
212 | <tt>gsas/ncnrpack_osx</tt>, contains many other Tcl/Tk packages (that are |
---|
213 | not used within EXPGUI) and may be of value for use with other applications. |
---|
214 | Note 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> |
---|
216 | script is located. If this <tt>ncnrpack_osx</tt> |
---|
217 | file is deleted, renamed or moved, |
---|
218 | then 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> |
---|
223 | If you cannot get EXPGUI or the GSAS graphics programs to work, |
---|
224 | you may have a setup problem with X-windows (X11). |
---|
225 | One common reason for this is that X11 must be restarted any time |
---|
226 | your computer's hostname changes, which may be caused by starting/stopping |
---|
227 | networking, dialing in for e-mail or even by a change in |
---|
228 | IP address initiated by the network DHCP server, if you are hardwired into |
---|
229 | a network. |
---|
230 | |
---|
231 | If exiting and restarting X11 does not address your problem, |
---|
232 | the following paragraphs |
---|
233 | may help you diagnose problems. |
---|
234 | <OL><LI> |
---|
235 | One possible problem is the definition for the X11 display (shell |
---|
236 | environment variable DISPLAY). |
---|
237 | On my machine, this variable seems to be set correctly in X11 xterm windows, |
---|
238 | but is not set by default within an Aqua terminal window unless |
---|
239 | you make changes to your shell startup. |
---|
240 | <P> |
---|
241 | A quick test for X11 problems is to type xclock at the shell prompt: |
---|
242 | |
---|
243 | <PRE> |
---|
244 | bash-2.05a$ xclock |
---|
245 | </PRE> |
---|
246 | If you get a clock display -- great, X windows is working! |
---|
247 | <P> |
---|
248 | If you get the following error message |
---|
249 | the DISPLAY variable is not set: |
---|
250 | <PRE> |
---|
251 | bash-2.05a$ xclock |
---|
252 | Error: Can't open display: |
---|
253 | </PRE> |
---|
254 | |
---|
255 | If on the other hand, you get this error message, there is a |
---|
256 | security problem with X windows: |
---|
257 | <PRE> |
---|
258 | bash-2.05a$ xclock |
---|
259 | Error: Can't open display: localhost:0.0 |
---|
260 | </PRE> |
---|
261 | This will most likely be solved by exiting and restarting X11 (see above). |
---|
262 | <P> |
---|
263 | You can set the DISPLAY variable in bash/zsh, etc. using: |
---|
264 | <PRE> |
---|
265 | bash-2.05a$ export DISPLAY=localhost:0.0 |
---|
266 | </PRE> |
---|
267 | |
---|
268 | or 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> |
---|
277 | A second possible problem relates to the installation of the |
---|
278 | Tcl/Tk and BLT packages. This problem seems unlikely, now that |
---|
279 | the Tcl/Tk package is included in the distribution, but if you have |
---|
280 | removed the ncnrpack_osx file from the gsas folder, the expgui.app AppleScript |
---|
281 | will try to use wish installed in /sw/bin. If you are choosing to do this, |
---|
282 | you can test if Tcl/Tk and the BLT package are installed correctly using the |
---|
283 | following commands: |
---|
284 | <PRE> |
---|
285 | [d120234:~] toby% wish |
---|
286 | % package require BLT |
---|
287 | 2.4 |
---|
288 | % pack [blt::graph .g] |
---|
289 | % exit |
---|
290 | </PRE> |
---|
291 | When you type "wish" and press Enter, a new small blank window should appear. |
---|
292 | when you type the 2nd line, "package require BLT," there will be no change in |
---|
293 | the 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 |
---|
295 | in 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/"> |
---|
305 | NCNR DAVE project</A> for providing the "all in one file" (starkit) |
---|
306 | version of Tcl/Tk for OS X. |
---|
307 | |
---|
308 | <P>GSAS is Copyright, 1984-2000, by |
---|
309 | the Regents of the University of California. |
---|
310 | The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36) |
---|
311 | by the Los Alamos National Laboratory, which is operated by the University |
---|
312 | of California for the U.S. Department of Energy. The U.S. Government is |
---|
313 | licensed to use, reproduce, and distribute this software. Permission is |
---|
314 | granted to the public to copy and use this software without charge, provided |
---|
315 | that this notice and any statement of authorship are reproduced on all |
---|
316 | copies. Neither the Government nor the University makes any warranty, express |
---|
317 | or implied, or assumes any liability or responsibility for the use of this |
---|
318 | software. |
---|
319 | |
---|
320 | <P>EXPGUI was created by a (former) U.S. Government employee, which means that |
---|
321 | EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write |
---|
322 | new 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, |
---|
325 | expressed or implied, or assumes any liability or responsibility |
---|
326 | for the use of this information or the software described |
---|
327 | here. Brand names cited herein are used for |
---|
328 | identification purposes. |
---|
329 | Mac computers are the best, but this does not |
---|
330 | constitute 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> |
---|