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"> |
---|
18 | Installing GSAS/EXPGUI under Mac OS X |
---|
19 | <HR noshade width="75%" size="2" align="center"> |
---|
20 | </H1></CENTER> |
---|
21 | |
---|
22 | |
---|
23 | This page contains information on installing and running GSAS & EXPGUI |
---|
24 | on Macintosh OS X computers. |
---|
25 | <P> |
---|
26 | <TABLE BORDER BGCOLOR="#FFFF40" ALIGN=CENTER><TR><TH> |
---|
27 | <B>Please note:</B> |
---|
28 | A new mechanism for installing GSAS & EXPGUI is now recommended. See |
---|
29 | <A HREF="https://subversion.xor.aps.anl.gov/trac/EXPGUI/wiki/InstallOSX"> |
---|
30 | this link</a>. If this method is used, EXPGUI or a python script can |
---|
31 | be used to update GSAS & EXPGUI quickly and easily. |
---|
32 | It 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> |
---|
37 | Both GSAS and EXPGUI require that X-windows (X11) be installed on your Mac. |
---|
38 | Since 10.3, X11 has been distributed as part of the operating system, but |
---|
39 | for 10.3 and 10.4 must be loaded manually. The instructions below |
---|
40 | describe how X11 is installed. |
---|
41 | |
---|
42 | <OL> |
---|
43 | <P><LI>Install X11 (<=10.4, only) |
---|
44 | <DL><DL><I> |
---|
45 | Before you can run the GSAS package (or, for that matter, |
---|
46 | a large number of other Unix-derived graphics applications), |
---|
47 | you 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> |
---|
52 | For 10.4, one can load the Mac OS X from the install disk. |
---|
53 | Note that this requires |
---|
54 | administrator access to the computer. The X11 installation procedure consist |
---|
55 | of 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 |
---|
59 | windows by pressing Continue (note that X11 must be installed on the boot |
---|
60 | disk). |
---|
61 | <LI>On the package list page, click on the arrow next to Applications |
---|
62 | to open the list, then select X11 to be installed by clicking in the box |
---|
63 | to the left and click Install. |
---|
64 | <LI>The installation then begins. |
---|
65 | <LI>When installation is complete, the X11 package can be run |
---|
66 | from the utilities menu of the system Applications folder. |
---|
67 | </UL> |
---|
68 | <P> |
---|
69 | For 10.3 (Panther) I am pretty sure a similar process to 10.4 can be used, |
---|
70 | but I don't have access to a machine that can boot that OS. Alternately, if you |
---|
71 | have OS X 10.3 on CDROMs, insert CDROM #3 and |
---|
72 | then click on the Packages folder and within that folder, |
---|
73 | click on X11User.pkg. Read the |
---|
74 | installation screens, click on the "next" button a few times, and |
---|
75 | X11 is installed. |
---|
76 | <P> |
---|
77 | For 10.2 (Jaguar), X11 installation is not simple, |
---|
78 | so you will need to do some searching on the web, find a guru or |
---|
79 | consult one of the many Mac OS X books that cover this subject. |
---|
80 | One 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 |
---|
84 | for the CPU type of your computer (to find out what you have |
---|
85 | click on the "About This Mac" item in the Apple menu) from |
---|
86 | <a href="http://11bm.xor.aps.anl.gov/downloads/gsas/macOSX/"> |
---|
87 | http://11bm.xor.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 | |
---|
98 | While you can run GSAS & EXPGUI from this location, you are strongly |
---|
99 | suggested to instead copy the entire package to your computer by dragging the |
---|
100 | gsas folder icon to another finder window, or by clicking on it and using |
---|
101 | Copy 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"> |
---|
106 | The OS X version of GSAS & EXPGUI has an EXPGUI AppleScript application |
---|
107 | named <tt>expgui.app</tt> in the gsas folder with the icon shown |
---|
108 | to the right. This AppleScript will start X11, |
---|
109 | if needed and then lauch EXPGUI. (If you have ideas for improving the script, |
---|
110 | the code can be found in file expgui_applescript.txt.) |
---|
111 | The 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 |
---|
114 | with the "file open" window in your home directory. This |
---|
115 | window can then be used to navigate to |
---|
116 | access/create experiments in other folders. |
---|
117 | <P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon |
---|
118 | will cause the experiment files to be opened. If more than one file is dropped, |
---|
119 | each 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 |
---|
121 | started with the "file open" window in that folder. |
---|
122 | </UL> |
---|
123 | <P> |
---|
124 | If you will use GSAS a fair amount, you will likely |
---|
125 | find it convenient to drag the EXPGUI icon to the dock |
---|
126 | for easy access. |
---|
127 | <P> |
---|
128 | Note, that this <B><U>EXPGUI app will not |
---|
129 | work correctly if copied or moved to another folder</U></B>. |
---|
130 | It must be located |
---|
131 | in the gsas folder along with all the other files and |
---|
132 | subdirectories needed by GSAS & EXPGUI -- you can instead |
---|
133 | create an alias (by highlighting the AppleScript icon in the Finder |
---|
134 | and using the File/"Make alias" menu item or the Command-L shortcut). An alias |
---|
135 | created in this fashion can be moved wherever desired -- for example, to |
---|
136 | the 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 |
---|
142 | set up a way to type something (gasp!) in a terminal window that will allow |
---|
143 | them 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>.) |
---|
146 | Also, on the Mac it is possible to add applications to the X11 Applications |
---|
147 | menu, by using the Applications/Customize menu option. |
---|
148 | Note that the command used to start Tcl/Tk and EXPGUI will vary depending |
---|
149 | on where you installed the package. I install the package in ~/Applications |
---|
150 | so 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 | |
---|
161 | EXPGUI will automatically designate the EXPGUI AppleScript |
---|
162 | as the "open with" application for every GSAS experiment (.EXP) file |
---|
163 | that is read or written by EXPGUI. This is done with the |
---|
164 | Development Tools program Rez, found in /Developer/Tools or in the gsas folder. |
---|
165 | At the same time, EXPGUI will also set an icon for the .EXP file. |
---|
166 | After this has been done, EXPGUI can be invoked by simply double-clicking on |
---|
167 | a GSAS experiment file (.EXP file) icon. |
---|
168 | <P> |
---|
169 | If 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> |
---|
176 | Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated |
---|
177 | until they are brought to the top of the screen by clicking on them |
---|
178 | (given focus). This is most noticible for PGPLOT |
---|
179 | graphics (in POWPLOT, RAWPLOT,...). |
---|
180 | When you type graphics commands in a terminal window, the plot does not |
---|
181 | appear to change. However, click on the PGPLOT's window bar and the plot will |
---|
182 | update. |
---|
183 | |
---|
184 | <HR noshade><HR noshade> |
---|
185 | <h4>The Tcl/Tk Starkit</H4> |
---|
186 | <P> |
---|
187 | The GSAS-EXPGUI distribution now includes a single file version of the |
---|
188 | entire Tcl/Tk package, as well as a graphics package for Tcl/Tk, called |
---|
189 | BLT, that is used extensively within EXPGUI. The inclusion of this file |
---|
190 | within the package simplifies installation considerably. |
---|
191 | This single 3 Mb file, |
---|
192 | <tt>gsas/ncnrpack_osx</tt>, contains many other Tcl/Tk packages (that are |
---|
193 | not used within EXPGUI) and may be of value for use with other applications. |
---|
194 | Note 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> |
---|
196 | script is located. If this <tt>ncnrpack_osx</tt> |
---|
197 | file is deleted, renamed or moved, |
---|
198 | then 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> |
---|
203 | If you cannot get EXPGUI or the GSAS graphics programs to work, |
---|
204 | you may have a setup problem with X-windows (X11). |
---|
205 | One common reason for this is that X11 must be restarted any time |
---|
206 | your computer's hostname changes, which may be caused by starting/stopping |
---|
207 | networking, dialing in for e-mail or even by a change in |
---|
208 | IP address initiated by the network DHCP server, if you are hardwired into |
---|
209 | a network. |
---|
210 | |
---|
211 | If exiting and restarting X11 does not address your problem, |
---|
212 | the following paragraphs |
---|
213 | may help you diagnose problems. |
---|
214 | <OL><LI> |
---|
215 | One possible problem is the definition for the X11 display (shell |
---|
216 | environment variable DISPLAY). |
---|
217 | On my machine, this variable seems to be set correctly in X11 xterm windows, |
---|
218 | but is not set by default within an Aqua terminal window unless |
---|
219 | you make changes to your shell startup. |
---|
220 | <P> |
---|
221 | A quick test for X11 problems is to type xclock at the shell prompt: |
---|
222 | |
---|
223 | <PRE> |
---|
224 | bash-2.05a$ xclock |
---|
225 | </PRE> |
---|
226 | If you get a clock display -- great, X windows is working! |
---|
227 | <P> |
---|
228 | If you get the following error message |
---|
229 | the DISPLAY variable is not set: |
---|
230 | <PRE> |
---|
231 | bash-2.05a$ xclock |
---|
232 | Error: Can't open display: |
---|
233 | </PRE> |
---|
234 | |
---|
235 | If on the other hand, you get this error message, there is a |
---|
236 | security problem with X windows: |
---|
237 | <PRE> |
---|
238 | bash-2.05a$ xclock |
---|
239 | Error: Can't open display: localhost:0.0 |
---|
240 | </PRE> |
---|
241 | This will most likely be solved by exiting and restarting X11 (see above). |
---|
242 | <P> |
---|
243 | You can set the DISPLAY variable in bash/zsh, etc. using: |
---|
244 | <PRE> |
---|
245 | bash-2.05a$ export DISPLAY=localhost:0.0 |
---|
246 | </PRE> |
---|
247 | |
---|
248 | or 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> |
---|
257 | A second possible problem relates to the installation of the |
---|
258 | Tcl/Tk and BLT packages. This problem seems unlikely, now that |
---|
259 | the Tcl/Tk package is included in the distribution, but if you have |
---|
260 | removed the ncnrpack_osx file from the gsas folder, the expgui.app AppleScript |
---|
261 | will try to use wish installed in /sw/bin. If you are choosing to do this, |
---|
262 | you can test if Tcl/Tk and the BLT package are installed correctly using the |
---|
263 | following commands: |
---|
264 | <PRE> |
---|
265 | [d120234:~] toby% wish |
---|
266 | % package require BLT |
---|
267 | 2.4 |
---|
268 | % pack [blt::graph .g] |
---|
269 | % exit |
---|
270 | </PRE> |
---|
271 | When you type "wish" and press Enter, a new small blank window should appear. |
---|
272 | when you type the 2nd line, "package require BLT," there will be no change in |
---|
273 | the 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 |
---|
275 | in 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/"> |
---|
285 | NCNR DAVE project</A> for providing the "all in one file" (starkit) |
---|
286 | version of Tcl/Tk for OS X. |
---|
287 | |
---|
288 | <P>GSAS is Copyright, 1984-2000, by |
---|
289 | the Regents of the University of California. |
---|
290 | The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36) |
---|
291 | by the Los Alamos National Laboratory, which is operated by the University |
---|
292 | of California for the U.S. Department of Energy. The U.S. Government is |
---|
293 | licensed to use, reproduce, and distribute this software. Permission is |
---|
294 | granted to the public to copy and use this software without charge, provided |
---|
295 | that this notice and any statement of authorship are reproduced on all |
---|
296 | copies. Neither the Government nor the University makes any warranty, express |
---|
297 | or implied, or assumes any liability or responsibility for the use of this |
---|
298 | software. |
---|
299 | |
---|
300 | <P>EXPGUI was created by a (former) U.S. Government employee, which means that |
---|
301 | EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write |
---|
302 | new 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, |
---|
305 | expressed or implied, or assumes any liability or responsibility |
---|
306 | for the use of this information or the software described |
---|
307 | here. Brand names cited herein are used for |
---|
308 | identification purposes. |
---|
309 | Mac computers are the best, but this does not |
---|
310 | constitute an endorsement by NIST. |
---|
311 | </blockquote> |
---|
312 | <hr> |
---|
313 | <br> |
---|
314 | $Revision: 973 $ $Date: 2010-03-28 17:19:55 +0000 (Sun, 28 Mar 2010) $ |
---|
315 | </BODY> |
---|
316 | </HTML> |
---|