Mac

Mac2008

1.  2011 Mac

Below are updates for the 2011 Mac, see Mac2008 for older notes.

2.  EECS 2011 Mac

MacBook Pro (Winter 2011) Family - 15-inch with 2.0GHz Quad-core Intel Core i7 with 4 Gig of memory

3.  Initial Account

If the intended user is going to use the Apple Migration Assistant, then it is probably best to create an Administrator account with a different name than the name of the intended user so that the intended user can run Migration Assistant in a clean account. I'm not sure if this is necessary, but one user reported that they had to kill off the account that I had created for them.

4.  Software

4.1  Free software

To get a context menu under Windows Remote Desktop Connection, hold both the Shift key and the Control key and then click.

4.2  Non-free software

The Iris Mac FAQ is a big help

  • Access MacSWW and download and install Microsoft Office. The install from smb://macsww.eecs.berkeley.edu/macsww over AirBears is simple, but can take hours depending on the connection strength. Using a wired connection is a lot faster, but you need to register your system with the eecs department before connecting. Alternatively, you could copy the ISO with
scp login:/project/eecs/macsww/Intel/ms.office.2011/Office_Mac_2011.ISO .

Remember to activate the app after installation.

  • Installed Symantec Endpoint http://software-central.berkeley.edu - I chose the Admin version that does not report back to campus
  • Adobe Creative Suite 5.5 Design Standard. Available via SHI
2 EA 20989525 Adobe Creative Suite 5.5 Design Standard - License - 1 user - EDU - CLP - level 3 ( 100000+ ) - Win, 220.93 0.00 484.94 Y Received
2 EA 20989538 Adobe Creative Suite 5.5 Design Standard - Media - CLP - DVD - Mac - Universal English -Media Only, 18.52 0.00 40.65
  • Endnote: TSW says:
"The Cal Student Store now offers Endnote licensing for $76.99 license. This is an electronic download price. Special orders may be placed for a media disk at an additional $10 charge. Purchases must be made in person at the student store or by phone (510)642-9000 x697."

5.  Setting up a Mac for use with Ptolemy

  1. Update to the most recent version of the OS by doing Apple | Software Update
  2. Install XCode from Apple, which includes gcc and other tools. Xcode is a 4.4 GB (!) download, and might not be required, but if you want <code>svn</code>, get XCode. Oddly, Apple is charging $4.99 for XCode 4. However XCode 3 is still available for free (4.1Gb download!)
    1. Apparently XCode 4 is available for free to Mac OS X 10.7 users. XCode4 is available via the Apple store. If you installed XCode 3, uninstall it first with sudo /Developer/Library/uninstall-devtools –mode=all and reboot. After installing XCode4, start it up (it is in /Applications as XCode4) and go to Preferences and install the command line tools.
  3. Install Java Extensions - Several extensions were already installed, others are not available for the Mac. Below is a description.
    1. Java 3D - No need to install, the jars are already in System|Library|Java|Extensions, (j3daudio.jar, j3dcore.jar, j3dutilities.jar and jnilibs)
    2. rxtx (serial port code) (optional, but should be installed so that the serial code is built)
      1. Go to http://rxtx.qbang.org
      2. Follow the download link and download http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
      3. Double click on the download zip file, which will create rxtx-2.1-7-bins-r2
      4. See http://rxtx.qbang.org/wiki/index.php/Installation_on_MacOS_X
        1. cd ~/Downloads/rxtx-2.1.7-bins-r2
          cp RXTXcomm.jar /Library/Java/Extensions/
          cp Mac_OS_X/librxtxSerial.jnilib /Library/Java/Extensions/
      5. Install the 64-bit version of librxtx, see Use the Java Native Interface under 64 bit Java 1.6
        cp ~/Downloads/librxtxSerial.jnilib /Library/Java/Extensions/
    3. Java Media Framework - Select the cross platform version and uncompress it in ~/Downloads. Then:
      cp ~/Downloads/JMF-2.1.1e/lib/* /Library/Java/Extensions/
      Note that it seems that is not possible to use the video camera with JMF. The jminit script runs the JMFInit class that is found in jmf.jar. The source for JMFInit indicates that it searches for classes like VFWAuto, SunVideoAuto and SunVideoPlusAuto. These classes are not found in the jmf.jar file shipped with jmf-2_1_1e-alljava.zip
    4. Java Advance Imaging - No need to install, already in System|Library|Java|Extensions (jai_codec.jar, jai_core.jar) - Note that JAI is not available for the Mac from Sun.
    5. QuickTime for Java - Already installed in System|Library|Java|Extensions (QTJava.zip)
  4. Install Eclipse, see the ptexternal page

Mac OS X and Java 1.7

The Java 1.7 preview is available at http://jdk7.java.net/macportpreview/

One issue is that Java3D fails with 1.7.0_04-ea

bash-3.2$ java -version
java version "1.7.0_04-ea"
Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b14, mixed mode)

Java 1.7: No J3D in Library Path

The error:

Caused by: java.lang.UnsatisfiedLinkError: no J3D in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at javax.media.j3d.MasterControl$22.run(MasterControl.java:891)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:888)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:233)
at javax.media.j3d.TransformGroupRetained.setTransform(TransformGroupRetained.java:127)
at javax.media.j3d.TransformGroup.setTransform(TransformGroup.java:111)

The fix: create links for the .dylib files:

cd /Library/Java/Extensions/
ln -s /System/Library/Java/Extensions/*jnilib .
cp libJ3D.jnilib libJ3D.dylib
cp libJ3DAudio.jnilib libJ3DAudio.dylib
cp libJ3DUtils.jnilib libJ3DUtils.dylib

Java 1.7: apple/awt/CGraphicsDevice

ptolemy.kernel.util.IllegalActionException: in .CartPendulum.manager
Because:
apple/awt/CGraphicsDevice
at ptolemy.actor.Manager.execute(Manager.java:480)
at ptolemy.actor.Manager.run(Manager.java:1111)
at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1641)
Caused by: java.lang.NoClassDefFoundError: apple/awt/CGraphicsDevice
at javax.media.j3d.GraphicsConfigTemplate3D.<clinit>(GraphicsConfigTemplate3D.java:55)
at com.sun.j3d.utils.universe.SimpleUniverse.getPreferredConfiguration(SimpleUniverse.java:368)

See http://bugs.sun.com/view_bug.do?bug_id=7124557

6.  Things to buy

  • Mini DisplayPort to VGA Adapter $29
  • Apple Memory Module 8GB 1333MHz DDR3 (PC3-10600) - 2x4GB $400

6.1  Power

The battery life of the laptop is about 3 hours with regular use (compiling etc.).

An external battery would be light in weight and not require a separate wall wart.

7.  Scrubbing a Mac OS X Disk

To erase the contents of a Mac OS X machine: Ideally, find the Mac OS X install/setup disk that came with the machine. If the disk cannot be found, try using the disk that came with the new Mac. You will not be able to install the new OS on the old hardware, but with Mac OS X 10.6 on a machine that came with Mac OS 10.5, I was able to choose "Restore from time machine" and then choose Utilities | Disk Utilities. Wiping a 200Gig disk with a 35 pass overwrite was estimated to take two hours.

8.  Lion Issues

8.1  TextEdit: can't edit html file, save always saves it as a .txt file

To edit the html code, see How To Edit HTML with TextEdit

To replicate the problem:

  1. Applications -> TextEdit
  2. In the window, type in some html
  3. File -> Save, in the Save As: field, type in a name that ends with .htm, for example, foo.htm
  4. The titlebar changes to foo.htm
  5. Add more html text
  6. File -> Save a version
  7. The titlebar changes to foo.txt

See https://discussions.apple.com/thread/3201126?start=0&tstart=0

On September 7, 2011, https://discussions.apple.com/message/16115358#16115358 said

"I have a bug open for this. Apple replied saying that it's a known issue. Hopefully, it will be I. 10.7.2."

On October 14, 2011, the TextEdit problem was fixed with an upgrade to Mac OS X 10.7.2

8.2  TexShop: Sometimes SaveAs and Exit are greyed out

I did not see an obvious solution. However, I'm ruing TeXShop 2.43 and a 64-bit Lion specific version is available at http://pages.uoregon.edu/koch/texshop/lion.html. That might help.

8.3  HP Color LaserJet 4600 Font problem

Under Mac OS X 10.7, the bottom symbol fails to print on a HP Color LaserJet 4600 when using the HP Color LaserJet 4600 v3010.107 driver.

However, the same file prints fine from Windows Server 2003. I believe that Windows is downloading the font.

Under Mac OS X 10.7, the bottom symbol does print on an HP LaserJet 9040. In this case, I believe that the printer has the font.

Using Adobe Acrobat's preflight indicates that the bottom character has this problem:

Uses CID Type 2 font
Page 1: Symbol 13.0 pt TrueType (CID) embedded (as a subset) CMYK (0.0/0.0/0.0/1.0) overprint: off
Text uses CID Type 2 font (a CID font with TrueType glyph procedures). CID fonts may cause issues when sent to older RIPs or printers that do not fully support PostScript language level 3. CID fonts have been part of the PDF specification since PDF 1.2 (Acrobat 3).

Interestingly, the HP Color LaserJet 4600 - Gutenprint v5.2.3 driver does print the symbol. However, the print out is black and white?

8.4  Setting Printer Defaults

Edward pointed out that http://127.0.0.1:631 brings up the CUPS interface, which has ways to change printer defaults such as two sided printing.

  1. http://127.0.0.1:631
  2. Select 'Printers'
  3. Click on the printer to modify
  4. Click on 'Administration' and then 'Set Default Options'
  5. To set double-sided printing as the default, look under the 'General' link.

8.5  Root Account Missing.

The issue I fixed was that the root account had been removed. The symptom was that when I did

sudo -i
whoami

Then the 'ealbak' string was returned instead of the 'root' string.

To fix this, I searched around the net for

Mac OS X root account deleted

and eventually found search for

Mac OS X enable root account

which lead to http://support.apple.com/kb/ht1528

That page describes how to use the "Open Directory Utilitity" via the Users & Groups System Preference

When I search "Users" for "root" the "ealbak" account came up.

The solution was to search for "root" on another Mac OS 10.7 machine and create a new "System Administrator" with these settings:

8.6  How to reverse pdf pages in Acrobat

Sadly, in Mac OS 10.6, Apple made the very poor decision to prevent printing to PDF. Thus, the "Reverse Pages" dialog choice in the Acrobat X print dialog can only be used to reverse pages in hard copy. The solution is to install the Reverse Page Order Acrobat Action:

  1. Go to Reverse Page Order Acrobat Action and download the Reverse Page Order.sequ
  2. In Acrobat X: File -> Action Wizard -> Edit Actions -> Import
  3. Import the Reverse Page Order.sequ and run it.

8.7  iCal in Lion is hard to use

Sadly, someone tried to port the iPhone calendar app (which uses a touchscreen) to Mac OS X (which does not have a touchscreen). Even worse, there was no user testing. Anyone who used a calendar before would fail the Lion iCal:

  • The backward/today/scroll buttons are far from the day/week/month ui.
  • The today button is easy to click when scrolling backward or forward
  • Why is the selection of which calendars are visible a modal dialog?
  • Why is there no key about what colors correspond to what calendars?

I can only guess that someone without supervision managed to force the Mac version in. Maybe it is the same fool who keeps redesigning the keyboard layout?

Anyway.

8.8  Mac Port

  • A user was having a problem where running port install boost was failing with:
Warning: xcodebuild exists but failed to execute

Running:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

fixed the problem