Recent Changes - Search:

edit SideBar

Mac2008

Below are Christopher Brooks' Mac notes from 2008-2011. See Mac for more recent notes.

Getting Started with a Mac

So, ya bought a Mac. Below are some pointers

What we have

Apple MacBook Pro 15-inch, 2.4GHz MB113LL/A includes base price 3-year warranty, Sadly, Apple continues to ship hardware that does not have part numbers. Going to the Apple site and searching for the manual by the serial number finds Mac Book Pro Early 2008 UserGuide

UI Pointers

  • To get a context menu, or what is a right menu button menu under Windows, hold the Control key and then click.
  • To get a context menu under Windows Remote Desktop Connection, hold both the Shift key and the Control key and then click.
  • To install applications, MacOSX has this peculiar standard for installers that wants the user to drag the icon of the software to the application icon in the installer.
  • The delete key is incorrectly labelled, it is actually a backspace key. Try Fn-delete and other fixes
  • To become root, use sudo -i -u root

Problems

  • The MacBook Pro 15" has really crappy wireless network performance. Apple would probably lose a class action lawsuit on this one . . .
    • Rumor has it that it is because of the aluminum case. Apparently the Mac is supposed to get wifi via the rubber area near the hinge. This problem has been seen in other MacBook Pro 15" machines as well
    • Apple Support: Is Macbook Pro wireless just plain weak?
      • Quickertek FAQ says "How come the PowerBooks, MacBook Pro, etc. have bad signal quality compared to PC Notebooks and Laptops? Because the of the placement of the antenna’s behind the metal case and lower than usual output power from the AirPort card inside the computer."
    • Symptoms:
      • This machine was outperformed by a 3 year old bottom-end Dell in that the Dell could get a wifi signal in a hotel room, but the Mac could not.
      • I get 3 bars even if I'm within 2 meter of the Netgear WPN824 hub.
Network NameSignalNoiseChannel
MyNet61%12%6
OtherNet20%12%1
OtherNet25%14%1
  • In "g only mode", iStumber says:
Network NameSignalNoiseChannel
MyNet61%12%6
OtherNet20%12%1
OtherNet25%14%1
AThirdNet23%12%11
  • I get 4 bars if I'm within 2 meters of an Apple Time Machine
    • TimeMachine in "802.11n (802:11b/g compatible)
      The AirPort Utility says Signal -60, Noise -91, Rate 104
Network NameSignalNoiseChannel
MyNet61%12%6
OtherNet33%14%1
OtherNet35%12%1
  • TimeMachine in "802.11n (2.4GHz)
    The AirPort Utility says Signal -60, Noise -91, Rate 130
Network NameSignalNoiseChannel
MyNet59%18%6
OtherNet32%12%1
OtherNet30%12%1
  • TimeMachine in "802.11n (802.11a compatible)
    The AirPort Utility says Signal -60, Noise -91, Rate 130
Network NameSignalNoiseChannel
MyNet65%12%0
OtherNet32%12%1
OtherNet30%12%1
  • TimeMachine in "802.11n (802.11a compatible)"
    The AirPort Utility says Signal -53, Noise -90, Rate 270
Network NameSignalNoiseChannel
MyNet59%9%0
OtherNet37%14%1
OtherNet30%12%1
  • TimeMachine in "802.11n only (5GHz)"
    The AirPort Utility says Signal -59, Noise -90, Rate 270
Network NameSignalNoiseChannel
MyNet66%9%0
OtherNet36%14%1
OtherNet29%12%1
nterval Since Last Panic Report: 1 sec
Panics Since Last Report: 1
Anonymous UUID: 85824CF1-A1CC-41CF-8ADF-658A16CECBD3

Thu Aug 6 16:22:03 2009
panic(cpu 0 caller 0x001AB0FE): Kernel trap at 0x34b515a7, type 14=page fault, registers:
CR0: 0x8001003b, CR2: 0x00000000, CR3: 0x015b8000, CR4: 0x00000660
EAX: 0x00000000, EBX: 0x34bb0000, ECX: 0x00000000, EDX: 0x0484c2d0
CR2: 0x00000000, EBP: 0x349dbe08, ESI: 0x34bb0000, EDI: 0xe0000010
EFL: 0x00010246, EIP: 0x34b515a7, CS: 0x00000008, DS: 0x06bc0010
Error code: 0x00000000

Backtrace (CPU 0), Frame : Return Address (4 potential args on stack)
0x349dbbe8 : 0x12b4c6 (0x45ec20 0x349dbc1c 0x13355c 0x0)
0x349dbc38 : 0x1ab0fe (0x468ecc 0x34b515a7 0xe 0x468678)
0x349dbd18 : 0x1a1703 (0x349dbd30 0x0 0x349dbe08 0x34b515a7)
0x349dbd28 : 0x34b515a7 (0xe 0x48 0x349d0010 0x5a0010)
0x349dbe08 : 0x34b51ee9 (0x34bb0000 0xe0000010 0x6bc4f00 0x7)
0x349dbe48 : 0x416428 (0x34bb0000 0x6bc4f00 0x1 0x3f0838)
0x349dbea8 : 0x417ccb (0x6bc4f00 0x34bb0000 0x4a8b7e0 0x43e1f80)
0x349dbf28 : 0x41752f (0x6bc4f00 0x4a57500 0x0 0x3f5691)
0x349dbf78 : 0x418bc3 (0x6bc4f00 0x8 0x349dbfac 0x1)
0x349dbfc8 : 0x1a14ec (0x47af110 0x0 0x1a40b5 0x50b18b8)
Backtrace terminated-invalid frame pointer 0
Kernel loadable modules in backtrace (with dependencies):
com.Ralink.driver.RT2870USBWirelessDriver(1.2.4)@0x34b50000->0x34baffff
dependency: com.apple.iokit.IONetworkingFamily(1.6.1)@0x5de000
dependency: com.apple.iokit.IOUSBFamily(3.4.3)@0x59d000

BSD process name corresponding to current thread: kernel_task

Mac OS version:
9J61

Kernel version:
Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386
System model name: MacBookPro4,1 (Mac-F42C89C8)

System uptime in nanoseconds: 591224048526
unloaded kexts:
com.apple.driver.InternalModemSupport 2.4.0 - last unloaded 157312253962
loaded kexts:
com.Ralink.driver.RT2870USBWirelessDriver 1.2.4 - last loaded 591130084433
com.cisco.nke.ipsec 2.0.1
com.apple.driver.AppleHWSensor 1.9d0
com.apple.iokit.IOBluetoothSerialManager 2.1.6f8
com.apple.filesystems.autofs 2.0.2
com.apple.driver.AppleUpstreamUserClient 2.7.5
com.apple.driver.AppleHDA 1.6.8a3
com.apple.Dont_Steal_Mac_OS_X 6.0.3
com.apple.iokit.CHUDUtils 200
com.apple.GeForce 5.4.4
com.apple.iokit.CHUDProf 207
com.apple.nvidia.nv50hal 5.4.4
com.apple.driver.AppleHDAController 1.6.8a3
com.apple.driver.SMCMotionSensor 2.1.1d2
com.apple.iokit.IOFireWireIP 1.7.7
com.apple.kext.AppleSMCLMU 1.4.3d2
com.apple.driver.AppleIRController 110
com.apple.driver.ACPI_SMC_PlatformPlugin 3.4.0d10
com.apple.driver.AppleLPC 1.2.12
com.apple.driver.AppleBacklight 1.6.0
com.apple.driver.AudioIPCDriver 1.0.6
com.apple.driver.AppleUSBTCButtons 1.7.4f1
com.apple.driver.BroadcomUSBBluetoothHCIController 2.1.6f8
com.apple.driver.AppleUSBMultitouch 189.32
com.apple.driver.AppleUSBTCKeyboard 1.7.4f1
com.apple.driver.AppleUSBMergeNub 3.4.3
com.apple.iokit.IOSCSIMultimediaCommandsDevice 2.0.9
com.apple.iokit.SCSITaskUserClient 2.0.9
com.apple.driver.XsanFilter 2.7.91
com.apple.driver.AppleUSBHub 3.4.0
com.apple.iokit.IOUSBUserClient 3.3.1
com.apple.iokit.IOATAPIProtocolTransport 1.5.2
com.apple.driver.AppleEFINVRAM 1.2.0
com.apple.iokit.IOAHCIBlockStorage 1.2.1
com.apple.driver.AppleFWOHCI 3.8.2
com.apple.driver.AppleUSBEHCI 3.4.3
com.apple.driver.AppleUSBUHCI 3.3.5
com.apple.iokit.AppleYukon2 3.1.12b14
com.apple.driver.AirPortBrcm43xx 363.35.0
com.apple.driver.AppleAHCIPort 1.6.0
com.apple.driver.AppleIntelPIIXATA 2.0.0
com.apple.driver.AppleSmartBatteryManager 158.10.0
com.apple.driver.AppleRTC 1.2.3
com.apple.driver.AppleHPET 1.4
com.apple.driver.AppleACPIPCI 1.2.4
com.apple.driver.AppleACPIButtons 1.2.4
com.apple.driver.AppleSMBIOS 1.4
com.apple.driver.AppleACPIEC 1.2.4
com.apple.driver.AppleAPIC 1.4
com.apple.security.seatbelt 107.12
com.apple.nke.applicationfirewall 1.6.77
com.apple.security.TMSafetyNet 3
com.apple.driver.AppleIntelCPUPowerManagement 76.0.0
com.apple.driver.DiskImages 199
com.apple.BootCache 30.4
com.apple.iokit.IOSerialFamily 9.4
com.apple.driver.DspFuncLib 1.6.8a3
com.apple.NVDAResman 5.4.4
com.apple.iokit.CHUDKernLib 196
com.apple.iokit.IOHDAFamily 1.6.8a3
com.apple.driver.IOPlatformPluginFamily 3.4.0d10
com.apple.driver.AppleSMC 2.2.1d2
com.apple.iokit.IONDRVSupport 1.7.3
com.apple.iokit.IOGraphicsFamily 1.7.3
com.apple.iokit.IOAudioFamily 1.6.9fc3
com.apple.kext.OSvKernDSPLib 1.1
com.apple.driver.AppleUSBBluetoothHCIController 2.1.6f8
com.apple.iokit.IOBluetoothFamily 2.1.6f8
com.apple.iokit.IOUSBHIDDriver 3.2.2
com.apple.driver.AppleUSBComposite 3.2.0
com.apple.iokit.IOSCSIBlockCommandsDevice 2.0.9
com.apple.iokit.IOBDStorageFamily 1.5
com.apple.iokit.IODVDStorageFamily 1.5
com.apple.iokit.IOCDStorageFamily 1.5
com.apple.iokit.IOSCSIArchitectureModelFamily 2.0.9
com.apple.iokit.IOFireWireFamily 3.4.7
com.apple.iokit.IOUSBFamily 3.4.3
com.apple.iokit.IO80211Family 216.1
com.apple.iokit.IONetworkingFamily 1.6.1
com.apple.iokit.IOAHCIFamily 1.5.0
com.apple.iokit.IOATAFamily 2.0.1
com.apple.driver.AppleEFIRuntime 1.2.0
com.apple.iokit.IOSMBusFamily 1.1
com.apple.iokit.IOHIDFamily 1.5.5
com.apple.iokit.IOStorageFamily 1.5.6
com.apple.driver.AppleACPIPlatform 1.2.4
com.apple.iokit.IOACPIFamily 1.2.0
com.apple.iokit.IOPCIFamily 2.6

Fix: http://www.ralinktech.com/ralink/Home/Support/Macintosh.html and download http://www.ralinktech.com.tw/data/drivers/RTUSB%20D2870-1.3.0.0%20UI-1.7.1.0_2009_03_10.dmg for the USB (RT2870/RT2779/RT307X)" RT28xx:1.3.0.0. Update: The Quickertek nNano is still unstable and crashes regularly on startup. I'm stopping using it and ordering another nQuicky.

  • There is no way to hibernate the machine, only sleep it, which consumes battery power.
    • Fix: Recent MacBooks have safe sleep. Deepsleep is a Dashboard widget that will hibernate the machine.
  • How do I get more information about the wireless signal strength?
    • Fix: Download IStumbler, which should be part of Mac OS X
  • How do I get more information about the Apple USB Modem connection rate?
    • Workaround: Look in /var/log/ppp.log for lines like
      Tue Jul 22 12:06:30 2008 : Communicating at 48000 bps.
    • BTW: To get a terminal window: System Preferences>Network>Ext. Modem>Advanced>PPP>go down to Session, click on it and select Configuration>go down to Terminal Script

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 1 GB (!) download, and might not be required.
  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. Java Communications API 7/16/08 - Could not find download. Sun is no longer supporting the Java Communications API, try rxtx
    3. Java Media Framework - Select the Linux download and then select the cross platform version. See JMF on OS X for hints.
      unzip JMF-2.1.1e-alljava.zip
      sudo -i
      cp JMF-2.1.1e/lib/*.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/
      cp lib/*.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/
      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

Restrictions about Versions of Java

  1. Eclipse 3.4.0 will not start up for me under Java 1.6.0_05 on the Mac. This means that if "java -version" returns 1.6.0_05, then Eclipse failed to start for me.
  2. Within Eclipse 3.4.0 which was started with Java 1.5.0_13, you can compile and run your project with either Java 1.5.0_13 or Java 1.6.0_13.
  3. Eclipse 3.4.0 Java Projects that include Eclipse Plug-ins don't work under either Java 1.5.0_13 or Java 1.6.0_05 on the Mac

Running Eclipse under Java 1.6

It appears that Eclipse 3.4.0, Build id: I20080617-2000 does not work with Java 1.6.0.

On my Mac with these settings:

bash-3.2$ uname -a
Darwin dhcp-39-135.EECS.Berkeley.EDU 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386
bash-3.2$ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
bash-3.2$ which java
/usr/bin/java
bash-3.2$ ls -l /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Jul 15 08:22 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
bash-3.2$

Eclipse 3.4.0 works fine under Java 1.5.0_13 under Mac OS X.

If I change from Java 1.5.0_13 to Java 1.6:

bash-3.2$ sudo -i
Password:
dhcp-39-135:~ root# cd /System/Library/Frameworks/JavaVM.framework/Versions/
dhcp-39-135:Versions root# ls -l Current
lrwxr-xr-x  1 root  wheel  1 Jul 15 08:22 Current -> A
dhcp-39-135:Versions root# ls -l A
total 472
-rw-r--r--   1 root  wheel    1925 Feb 29  2008 CodeResources
drwxr-xr-x  34 root  wheel    1156 Jul 15 08:22 Commands
drwxr-xr-x   3 root  wheel     102 Mar  6  2008 Frameworks
drwxr-xr-x  16 root  wheel     544 Jul 15 08:22 Headers
-rwxr-xr-x   1 root  wheel  236080 Feb 29  2008 JavaVM
drwxr-xr-x  29 root  wheel     986 Jul 15 08:22 Resources
dhcp-39-135:Versions root# ls -l
total 56
lrwxr-xr-x  1 root  wheel    5 Jul 15 08:22 1.3 -> 1.3.1
drwxr-xr-x  3 root  wheel  102 Jan 13  2008 1.3.1
lrwxr-xr-x  1 root  wheel    5 Feb 21  2008 1.4 -> 1.4.2
lrwxr-xr-x  1 root  wheel    3 Jul 15 08:22 1.4.1 -> 1.4
drwxr-xr-x  8 root  wheel  272 Feb 21  2008 1.4.2
lrwxr-xr-x  1 root  wheel    5 Feb 21  2008 1.5 -> 1.5.0
drwxr-xr-x  8 root  wheel  272 Feb 21  2008 1.5.0
lrwxr-xr-x  1 root  wheel    5 Jul 15 08:22 1.6 -> 1.6.0
drwxr-xr-x  8 root  wheel  272 Jul 15 08:22 1.6.0
drwxr-xr-x  8 root  wheel  272 Jul 15 08:22 A
lrwxr-xr-x  1 root  wheel    1 Jul 15 08:22 Current -> A
lrwxr-xr-x  1 root  wheel    3 Jul 15 08:22 CurrentJDK -> 1.5
dhcp-39-135:Versions root# ls 1.6
Classes         Headers         Libraries
Commands        Home            Resources
dhcp-39-135:Versions root# rm Current
dhcp-39-135:Versions root# ln -s 1.6 Current
dhcp-39-135:Versions root# which java
/usr/bin/java
dhcp-39-135:Versions root# java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)
dhcp-39-135:Versions root#

Eclipse fails to start under Java 1.6.0_05 under Mac OS X:

The Eclipse Project 3.4 Plan (Final) says:

"Apple Mac OS X 10.5, Universal, Carbon running:
* Apple Java 2 Platform Standard Edition (J2SE) 5, service release 4"

Thanks to Hauke Fuhrmann

Running Eclipse on MacBooks with Java 6 has more information, but says it can't be done:

"Apparently Eclipse uses 32-bit SWT-Cocoa bindings, and Apple just decided that they weren’t going to support 32-bit SWT any more in Java 6, breaking any app that uses them in the process. So the fix is to just run Eclipse under Java 5 (Java 6 projects still work in this setup). I’m starting to lose track of the consumer-unfriendly attitudes I’ve experienced from Apple. Their version of Java 6 is late, incomplete, and lazy."

Thanks to Patricia Derler

Problems with Eclipse and Ptolemy on the Mac

This problem is solved by modifying configure, but the details are interesting. The solution is to not have projects that have plug-ins in them.

Running Eclipse 3.4.0 with Java 1.5.0_13, I get a stack trace involving HTMLViewer

java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at javax.swing.JEditorPane.registerEditorKitForContentType(JEditorPane.java:1150)
...
at javax.swing.JEditorPane.setContentType(JEditorPane.java:884)
at ptolemy.actor.gui.HTMLViewer._init(HTMLViewer.java:448)

This error does not occur when running from the command line.

A workaround is to use Java 1.6.0_05. However, then the splash screen comes up and hangs.

  • It looks like the main thread quickly exits
  • I tried using .classpath.default by copying that file to .classpath
  • Running ptolemy.plot.moml.EditablePlotMLApplication has similar problems
  • If I replace invokeLater() with invokeAndWait() then I get a grey box and see this
2008-09-12 17:13:17.988 java[19705:17003] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x122429bd0> '(null)') unlocked when not locked
2008-09-12 17:13:17.989 java[19705:17003] *** Break on _NSLockError() to debug.

I see the above for both VergilApplication and EditablePlotMLApplication if I use invokeAndWait()

  • Interestingly, creating a project from the PtPlot5.7 sources works fine - the binary runs.
  • Another symptom is that when starting Vergil inside Eclipse with Java 1.5.0_16, the following messages may appear in the console:
2008-10-08 05:56:58.231 java[51045:80f] [Java CocoaComponent compatibility mode]: Enabled
2008-10-08 05:56:58.232 java[51045:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000

and then Vergil fails to start up.

  • So, really, the problem is that if the Eclipse .classpath has
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

then I get the hanging problem.

The workaround on the Mac is to configure with:

./configure --without-eclipse

and then edit .classpath and remove

<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

configure has been modified so that under Mac OS X, it does not include <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> in the .classpath for the ptII project and does not attempt to compile ptolemy/apps/eclipse/awt or ptolemy/backtrack in the ptII project. Note that ptolemy/backtrack can be compiled outside of Eclipse on the Mac by doing cd $PTII; ./configure; make, the problem is compiling backtrack within Eclipse.

32 bit Java vs 64 bit Java

JVMs are either 32 bit or 64 bit. This matters when we try to link with native shared libraries in the standalone Ptolemy Application, Web Start and signed applets. (Unsigned applets cannot load native shared libraries. The Ptolemy website uses unsigned applets.)

Under Mac OS 10.5, Java 1.5.0_22 is 32 bit, Java 1.6.0_17 is 64 bit:

bash-3.2$ which java
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java
bash-3.2$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java\
 -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03-333-9M3125)
Java HotSpot(TM) Client VM (build 1.5.0_22-147, mixed mode, sharing)
bash-3.2$ /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java\
 -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-9M3125)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
bash-3.2$

To run a 64 bit Java 1.5, use -d64:

bash-3.2$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java\
 -version -d64
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03-333-9M3125)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-147, mixed mode)

The Java Preferences utility displays which JVMs are installed. To bring up the Java Preferences utility, use: Applications -> Utilities -> Java Preferences. Below is a screen shot of the Java Preferences in Mac OS X 10.5. Note the versions of the JDKs and the order

Use the Java Native Interface under 64 bit Java 1.6

Using simpleJavaLauncher with 64 bit Java 1.6

  1. Download simpleJavaLauncher.zip from http://developer.apple.com/library/mac/#samplecode/simpleJavaLauncher/Introduction/Intro.html
  2. Unzip it
  3. Compile
    gcc -m64 -o simpleJavaLauncher simple.c utils.c -L$(/usr/libexec/java_home)/../Libraries -ljvm -L/sw/lib -framework CoreFoundation -framework IOKit -lserver -framework JavaVM
    javac HelloWorld.java
  4. Run with ./simpleJavaLauncher HelloWorld

Note that simpleLauncher also optionally takes a -cp argument to set the classpath. To run the plotter, use:

./simpleJavaLauncher -cp $PTII ptolemy/plot/PlotApplication

Web Start problem with rxtx

rxtx is a Java serial package

Under Webstart, I was getting:

java.lang.UnsatisfiedLinkError: /Library/Java/Extensions/librxtxSerial.jnilib:
no suitable image found. Did find: /Library/Java/Extensions/librxtxSerial.jnilib:
no matching architecture in universal wrapper

The problem is that Web Start is running a 64 bit version:

Java Web Start 1.6.0_17
Using JRE version 1.6.0_17-b04-248-9M3125 Java HotSpot(TM) 64-Bit Server VM

but the libraries are 32 bit

Configuration Issues

Setting the path

The default shell is bash. When you log in, ~/.bash_profile is read. When a remote command is invoked, say via ssh, then ~/.bashrc is invoked. In general, ~/.bashrc should not write to standard out. One trick is to create ~/.bashrc and then create a symbolic link from ~/.bash_profile to ~/.bashrc:

cd
ln -s .bashrc .bash_profile

A typical ~/.bashrc might look like

export PTII=~/ptII
export PATH=${PTII}/bin:${PATH}

Things to buy

Required Hardware

  • Spare Battery MacBook Pro ID#: MA348LL/A $ 116.00
  • Apple USB Modem ID#: MA034Z/A $ 44.00

Optional Hardware

  • Time Capsule ?(1TB Disk) $479 a wireless hard drive that works seamlessly with Time Machine in Mac OS X Leopard. It’s also a full-featured 802.11n Wi-Fi base station
  • Apple MagSafe Airline Adapter (MacBook, MacBook Air, MacBook Pro) ID#: MB441Z/A $ 49.00
  • Extra AC Adapter: ID#: MA938LL/A $ 79.00

Required Software

  • Adobe Creative Suite 3 Design Premium Mac - Student/Faculty/Staff ID#: 54027354L $ 309.99 Coming Soon. Includes Acrobat, Illustrator CS3, Photoshop Extended CS3
  • Endnote - available from TSW for $65. A 30 day trial is available from endnote.com
  • CalAgenda
  • MacTeX

Software to install

Free Software on the EECS Mac DVD

Proprietary Software on the EECS Mac DVD

Other Software

  • Emacs for Aqua 52.5Mb
    • Aquamacs brings up separate windows for each buffer. To disable this, type C-h C-v one-buffer-one-frame and then click on Easy-Customization, set one-buffer-one-frame to nil and then save your settings.
  • Flip4Mac - plays avi and wmv files on the Mac using Quicktime. Note that videos that have Digital Rights Management (DRM) probably won't work in Flip4Mac. Also, since I have the free version of QuickTime, it does not seem possible to make the video screen larger inside a web browser.
  • Microsoft Windows Remote Desktop Connection - Connect to a Windows Machine and run programs on the Windows machine.
  • MacTex 744Mb (!)
  • Bert Rodiers pointed out this editor for LaTeX:
"You might want to checkout Kile ( http://en.wikipedia.org/wiki/Kile ). One of these links will probably help you install it on Mac OS X:

Issues

Below is a list of issues we ran into

iCal

iCal is the Mac OS X Calendar tool.

iCal and Oracle Calendar

It would be nice to be able to use both iCal and CalAgenda (which is really Oracle Calendar).

See also Micronet 10/08 posting: iPhone and CalAgenda

Oracle calendar has many problems, the biggest is that the Oracle Calendar Windows client 10.1.2.3.0.398 exits when it loses its connection with the server. Obviously, the author of this program does not understand the client/server paradigm.

iCal is not an enterprise solution, it does not make it easy for others to edit events etc.

In the perfect world, anyone could use any client to view, add, modify and delete events on any calendar for which they had the appropriate permissions.

However, Oracle Calendar Windows Client 10.1.x does not support easy roundtrip access from iCal and back. It is possible to export and import iCalendar .ics files, but there could be problems with duplicate events and with events being overwritten.

Downloading data from Oracle Calendar to iCal by using the iCalendar format and creating a .ics file is easy enough. However, changes made in iCal will not be propagated back up to Oracle Calendar and downloading multiple times could result in duplicate entries.

  • October, 2006 MAGnet item by Aron Roberts lines out two ways to do a one way download from Oracle Calendar to iCal. Howevever, this does not mean that changes on Oracle are transmitted to iCal or visa versa.
    • Export from Oracle Calendar to iCalendar, which creates a .ics file, then read the file into iCal
    • Use the Oracle Calendar API to access the calendar
  • There is also OraCal2iCal, which uses accessibility to automatically export the calendar from Oracle Calendar and import it into iCal. This is a one-way solution, not a round-trip solution. The OraCal2iCal website says:
OraCal2iCal copies your personal "Oracle Calendar" (AKA "Corporate Time") calendar into iCal, so you can synch your calendar to any device that will synch with iCal or just look at it in the iCal interface.
OraCal2iCal is a one way transfer program. It copies your Oracle calendar into iCal, and overwrites any changes you have made to that calendar in iCal. It does not move any data into the Oracle calendar. Think of it as an iCal subscription to your Oracle calendar.

CalDAV

CalDAV is a standard that allows the sharing of scheduling information.

With CalDAV support in Google Calendar, you'll be able to view and edit your Google Calendar events directly in Apple's iCal. Any changes you make in iCal will automatically appear in Google Calendar the next time you sign in (and vice versa). If you use iCal while offline, changes you make will be saved and updated in Google Calendar when you get back online.

Read-only access to iCal calendars

To share a calendar, use the currently free website http://www.icalx.com.

  1. Go to http://www.icalx.com and register for an account
    1. Log on to http://www.icalx.com, select passwords and create an account and password to give to the person with whom you want to share your calendar.
  2. In iCal, go to Calendar|Publish,
    1. Select Publish to a Private Server
    2. Enter the BaseURL of your calendar, something like http://icalx.com/private/yourlogin, where yourlogin is your iCalx account name (not the name and password you created to give away)
    3. Select Publish changes automatically
    4. You will then be prompted to send email to people who want to subscribe to your calendar. Your calendar will be at an address like webcal://icalx.com/private/yourlogin/Work.ics.

Below is a screenshot of the Publish window

Troubleshooting

I found that Publish changes automatically had become unselected?

iCal hangs

iCal was consuming lots of CPU and hitting the disk hard (writing 6Mb/sec). The Activity Monitor shows iCal (Not Responding).

USB Scanner

I have an old HP ScanJet6300C that has a USB connection. Unfortunately, Mac OS X drivers are not available for it.

USB Printers

Getting USB Printers to work can be difficult. Mac OS 10.5 (Leopard) includes drivers for many printers.

HP DeskJet 6127

I googled HP deskjet 6127 Mac OS. The page that came up had a link at the bottom for Mac OS 10.5 that said to just plug the printer in. http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&dlc=en&cc=us&docname=c01234224

What I did on my machine was plug the printer in and the driver was there.

I was able to print.

To print double sided, I had to select a different paper size, there were two sizes for US Letter. The wrong one was US Letter Banner. It looks like the driver to use is not the gutenprint driver, which is what is included in Mac OS X 10.5. I believe the driver that did work came from HP LaserJet Mac OS X Installer Print Only Software Solution for v10.2, v10.3.x, v10.4.x, v10.5

HP Officejet D145

I am successfully printing to my HP d145 from leopard after much frustration and useless support from HP. I stumbled across an article on the web that said to uninstall the HP software package using the HP uninstaller in the HP folder in the Applications folder. After doing that and removing and reinstalling the printer in the Preferences panel Print & Fax, only the Leopard gutenprint driver was operative and it now works for printing. Of course, my previously available 2 sided printing is not supported and I haven't tried faxing or scanning yet, but I do have a very expensive, but operating USB, not shareable, printer again.

with my printer (doesn't recognize the printer model)."

indicates that the OfficeJet D145 only has a gutenprint driver built in to Mac OS 10.5.

Conversion of Eudora from Windows to Mac

Converting Eudora Mailboxes from Windows to Mac OS X was rather difficult.

Migrating From Windows to MAC from the Eudora site seems to be about moving towards Mac OS 9, not Mac OS X. It may have been necessary to convert the end of line characters using flip. Note that Mac OS X uses Unix end of line characters, not "Mac" end of line characters. It turns out that the key was to use the Mac OS X command line program GetFileInfo to get the type, attributes, and creator codes for a Eudora-created mailbox and then set them for copies of your mailbox using

SetFile -t "TEXT" -c "CSOm" -a avbstclinmedz *.mbx

Showing hidden files and directories like /tmp

The Mac OS X finder does not allow one to browse to directories like /tmp. See Show All Files in the Finder

Problems deleting .svn directories

When I check out a repository in Eclipse using either Subversive or Subclipse, I can't delete the repository from the shell.

bash-3.2$ rm -rf /Users/cxh/Documents/workspace/ptolemy.util/.svn
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/entries: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/prop-base/.classpath.svn-base: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/prop-base/.project.svn-base: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/prop-base/build.properties.svn-base: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/prop-base: Directory not empty
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/text-base/.classpath.svn-base: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/text-base/.project.svn-base: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/text-base/build.properties.svn-base: Operation not permitted
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn/text-base: Directory not empty
rm: /Users/cxh/Documents/workspace/ptolemy.util/.svn: Directory not empty

It seems like only running either Subclipse or Subversive from inside Eclipse has this problem. Repositories checked out by the svn command does not. What I was doing was checking out the triq repository and then importing the projects into a workspace. Subclipse 1.2.0 (Feb. 2007) suggests that this is a problem. It looks like this has been a problem since 2006. Re: Resend: .svn/entries getting locked on OSX ... by eclipse not svn. suggests the problem is Eclipse.

It appears that the problem is that something called the file flags are set. File flags are different than file modes. ls -O shows the file flags as uchg, which means the user can't change the file:

bash-3.2$ ls -lOde /Users/cxh/Documents/workspace/ptolemy.util/src/.svn/entries
-r--r--r--  1 cxh  staff  uchg 744 Oct  3 18:28 /Users/cxh/Documents/workspace/ptolemy.util/src/.svn/entries

The chflags command can be used to set the flags:

bash-3.2$ chflags nouchg /Users/cxh/Documents/workspace/ptolemy.util/src/.svn/entries
bash-3.2$ ls -lOde /Users/cxh/Documents/workspace/ptolemy.utilt/src/.svn/entries
-r--r--r--  1 cxh  staff  - 744 Oct  3 18:28 /Users/cxh/Documents/workspace/ptolemy.util/src/.svn/entries
bash-3.2$ rm /Users/cxh/Documents/workspace/ptolemy.util/src/.svn/entries
override r--r--r--  cxh/staff for /Users/cxh/Documents/workspace/ptolemy.util/src/.svn/entries? y

See How To Fix Stubborn Trash and Why it Won't Delete.

To see what files have the file flags set in a directory tree, run:

find . -print0 | xargs -0 ls -lOd | awk '$5 != "-" {print $0}'

To fix all the files, run

chflags -R nouchg .

The cause of the problem is probably natives/macosx/localfile.c

#define USE_IMMUTABLE_FLAG 1
...
/*
 * Converts a stat structure to IFileInfo
 */

jboolean convertStatToFileInfo (JNIEnv *env, struct stat info, jobject fileInfo) {
...
#if USE_IMMUTABLE_FLAG
    if (!readOnly && ((info.st_flags & (UF_IMMUTABLE | SF_IMMUTABLE)) != 0))
        readOnly = true;
#endif

/*
 * Class: org_eclipse_core_internal_filesystem_local_LocalFileNatives
 * Method: internalSetFileInfoW
 * Signature: ([BLorg/eclipse/core/filesystem/IFileInfo;)Z
 */

JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalSetFileInfoW

#if USE_IMMUTABLE_FLAG
    flags |= UF_IMMUTABLE; // set immutable flag for usr
#endif
    } else {
        mask |= (S_IRUSR | S_IWUSR); // set 'r' and 'w' for user
#if USE_IMMUTABLE_FLAG
    flags &= ~UF_IMMUTABLE; // try to clear immutable flags for usr
#endif

See Eclipse Bug 188874 Import from FileSystem damages the files' chflags flags

File attributes

Modes

Files have regular unix modes, use ls -l

Access Control Lists (ACLs)

Files have Access Control Lists (ACLs) ls -l shows a + in the modes column.

     Use ls -le for more info

The -e option to ls shows Access Control List info.

bash-3.2$ ls -ld ~/Documents
drwx------+ 14 cxh  staff  476 Oct  3 17:59 /Users/cxh/Documents
bash-3.2$ ls -lde ~/Documents
drwx------+ 14 cxh  staff  476 Oct  3 17:59 /Users/cxh/Documents
 0: group:everyone deny delete

Extended Attribute Keys

Extended attribute keys and sizes - These are the Mac specific attributes that tell what app to open. ls -l has a @ in the first column. Use ls -@ to view:

bash-3.2$ ls -l .DS_Store
-rw-r--r--@ 1 cxh  staff  6148 Oct  4 10:59 .DS_Store
bash-3.2$ ls -l@ .DS_Store
-rw-r--r--@ 1 cxh  staff  6148 Oct  4 10:59 .DS_Store
        com.apple.FinderInfo      32

Use GetFileInfo and @@SetFile

File Flags

Use ls -O and chflags

Backups

We've had several problems with the Apple Time Machine

Migration Assistant

The Wikipedia Migration Assistant page says:

"The Migration Assistant does not transfer the operating system of the old computer to the new one. Similarly, applications and utilities bundled by Apple with the operating system (e.g. Safari) are not transferred, based on the assumption that the newer machine has the same or newer version already installed. However settings for these applications (e.g. bookmarks) are transferred."

Target Disk Mode

Command line

We ended up using Carbon Copy Cleaner, which is free to educational use.

When using Carbon Copy Cleaner, if the external drive is to be bootable, it must be formatted Mac OS (Journaled), see Formatting & Partitioning a Hard Drive in OS X - Tiger and Leopard

Spell Checking

It looks like aspell is the way to go.

aspell -c foo.txt was failing with Error: No word lists can be found for the language "en_US".

The fix was to download the en dictionary from ftp://ftp.gnu.org/gnu/aspell/dict/0index.html and then do (:source) tar -jxf ~/Downloads/aspell6-en-6.0-0.tar.bz2 cd aspell6-en-6.0-0/ ./configure make sudo -i

  1. cd to the aspell6-en-6.0-0 directory

make install (:sourceend:)

Personally Identifiable Information

Encrypted File Systems

Personal Identifiable Information (PII) Scanners:

Mac Software

Apple Repair at UC Berkeley

Apple laptops purchased as part of the departmental purchase have a three year warranty.

  1. Get the serial number, which is inside the battery bay on a laptop, or try Apple (in the upper left) -> About this Mac -> More info
  2. Go to https://selfsolve.apple.com/GetWarranty.do
  3. If your machine is under warranty, then "Connect with an Apple Advisor" will be an option. This choice allows you to set up a telephone call back, which is much better than going to the store.

If you choose to have a box sent to you, then be aware that the box will be sent to you on the next business day, which means if you call on Friday, it will arrive on Monday. If you ship out on Monday, then the machine will arrive at Apple on Wednesday.

When you send in a machine, you will be asked for your password. There is a chance that your machine will be wiped as part of the repair process. If you do not want to give your password or possibly have your disk wiped, then open the case and remove the hard drive. Note that removing the hard drive can be very difficult for some machines and it requires a #6 Torx drive, which is very small.

A thread on Micronet reported:

Edit - History - Print - Recent Changes - Search
Page last modified on April 08, 2012, at 03:35 PM