Bookmark this site!

2006-06-17

Battery Fault MacBook Pro

Summary

I have one of the faulty MBP batteries

Symptoms

My MBP was working fine; 3h - 4h battery life. Now I get 20 mins, then darkness.

Suddenly, after 20 minutes from fully charged, MBP dies —no warning, no shutdown, just STOP! Battery still has 4 lights, try restart; dies again within seconds of starting. Battery now only 1 light flashing.

I can operate on AC and battery appears to charge, but running on battery reproduces the symptoms above.

Tried resetting the PRAM, tried restting the PMU; no change

Others have the same problem.

Working on AC — planning trip to Apple dealer.

Update Scotsys are great!

First we verified that the battery was the problem — we swapped the batteries of their demo machine and my MBP (both registring "charged"; took the machines off AC, set them both to work (iTunes visualizer, no volume, no sleep); waited for their machine (with my battery) to die, which it did after 10 minutes or so.

They didn't have a stock of batteries. You don't plan to stock replacement batteries in the first years of a product line.

So they loaned me the battery from the demo model while the dud was returned to Apple for replacement.

The demo model is running on AC, without the battery.

Update

The first replacement Scotsys got was damaged in transit, so I kept their battery until a replacement for that arrived. All went well for a few weeks, then a new disaster!

2006-06-04

texmf.local for Fink-installed latex

This note assumes you have a working Fink installation of tetex on your Mac.

To install the local latex classes, such as infletr, which produces letters on informatics letterheads (School, Institutes, Graduate School, ITO, etc.):

In a terminal window on your mac, do (don't type the % that is supposed to represent the shell prompt)
% cd /sw/etc/texmf.local/tex/
then the following
% sudo scp -r user@host.inf.ed.ac.uk:/usr/local/share/texmf/tex/latex .
Here user is your UUN, host is any dice machine you have access to. You will get asked for your mac password (for the sudo) and then, unless you have a valid Kerberos ticket, your dice password (for the scp access to your dice machine).
Then let the latex installation cache information about the classes you've installed.
% sudo texhash

Fink doesn't interfere with texmf.local, so you can use Fink to update your latex installation without destroying your copy of the informatics classes — but you should use rsync from time-to time to keep your copy up-to-date.

% sudo rsync -az --delete user@host.inf.ed.ac.uk:/usr/local/share/texmf/tex/latex /sw/etc/texmf.local/tex/latex
% sudo texhash

2006-06-03

LATEX iT


\pi^2 =&6\sum_{i=0}^{\infty}\frac{1}{i^2}\\
\pi^4 =&90\sum_{j=0}^{\infty}\frac{1}{j^4}\\
\pi^6 =&960\sum_{k=0}^{\infty}\frac{1}{k^6}
Series expansions for pi

This small app from Pierre Chatelier allows you to create JPG and PDF images for inclusion in your web pages, easily from LATEX math. Here you see a jpg — click the image to see the pdf.

When you generate a pdf file, LATEX iT embeds the LATEX source in the pdf, so that,later, you can paste the pdf back into this application, and edit the source. Brilliant!

2006-05-19

Shockwave & Flash for Intel Mac

The latest Universal Binary Flash Plugin (9,0,28,0) now works in Safari 2.0.4 (419.3) — see Flash Player Update

A Universal Binary Flash Plugin is available, but Shockwave is still PPC only. Solution: run Safari in Rosetta.

Download the latest version! (as of 20060910: 9.0 r20 for Intel; 9.0 r16 for PPC)

2006-05-05

MacBookPro Temperature Firmware

Battery Fault

SMC Firmware Update

This System Management Controller firmware update (unlike the one below) is offered via Software Update; now I really do think my MacBookPro is running cooler. This firmware and the SMC are invisible to About this Mac — the Boot ROM version remains the same as below.

Intel Mac (early 2006) Firmware Update 1.0.1 2006-04-17

Check your firmware version:
Apple Menu >> About this Mac >> More Info
The MacBook Pro Firmware Updater installs Boot ROM Version: MBP11.0055.B03
If your version is lower, follow the instructions!

I found this while reading Apple Discussions about overheating issues for MBP. The case around the area below the ESC key sometimes now feels cooler (I think - need temperature monitor).

2006-04-30

Fink on Intel Macs

Summary: It works for me!

The newsflash is discouraging:

A preliminary version of Fink for the Intel architecture is now ready. No binary packages are available, and things are still rough around the edges, but it should be usable if you are patient!

but gives the following instructions:

To install it, you need to install the XCode compiler and SDK packages (at minimum). Then you need to get the file fink-0.24.14.tar.gz from the Sourceforge file release page for Fink, expand the file, and run the command
./bootstrap.sh
At the end of the bootstrap process, run
fink selfupdate
and you'll get the currently available packages.

I tried it and it works! The Intel Mac is fast enough that installing everything from source doesn't take forever.

I then downloaded the 0.5.4 version of the Fink Commander binary from SourceForge - this works.

You can also download the source using CVS:

First login anonymously (this is a single instruction, and should be given on a single line, just copy the whole instruction, and paste into the terminal - when challenged for password, hit return):
cvs -d:pserver:anonymous@finkcommander.cvs.sourceforge.net:/cvsroot/finkcommander login
Then checkout the whole tree (another single instruction - this will create a directory namd FinkCommander):
cvs -z3 -d:pserver:anonymous@finkcommander.cvs.sourceforge.net:/cvsroot/finkcommander co -P .
open FinkCommander/FinkCommander.xcodeproj - this should launch XCode.

In the Project menu, Set Active Build Configuration to Deployment; in the Build menu select Build. Wait a short while and voila - your own universal 0.5.4 binary! Find FinkCommander.app and move it into your Applications folder. Make sure you tick use unstable packages under the Fink tab of FinkCommander preferences.

I use Fink primarily to install the latest emacs (emacs21) and LATEX (tetex), but also for other goodies such as unison (which now does doesn't yet build on Intel) and bibtex2html.

2006-03-23

ant java Shark: XrunShark

You want to use Shark to profile your java code - and you want an ant target that runs your jar file under Shark. You have to call the jvm with the option -XrunShark

Create a new target in your build.xml file

<target name="profile" depends="jar"
        description="Run jar file (no args) with Shark profiler">
     <java jar="${jarfile}" fork="yes" failonerror="true">
         <jvmarg value="-XrunShark"/>
     </java>
</target>

Start Shark, then run
ant profile

Shark is a profiling tool included in the CHUD package. CHUD is an optional install which comes with XCode Tools. The CHUD installer is in the Packages folder, and installs Shark in /Developer/Applications/Performance Tools

2006-03-22

Unison

Unison, courtesy of Benjamin Pierce is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

I have Unison installed using FinkCommander (see my blogitem on Intel port of Fink) - as a by-product this also gives you an installation of ocaml. Unison is an "unstable" packackage installed from source, so to install it you first need to install Apples's XCode and X11 SDK (from the Tiger installation disks) to provide the compilers, headers etc neded to build the application. Then in Fink Commander Preferences select "Use unstable packages" (Fink tab). From the menus run Source>SelfUpdate then Source>UpdateAll. Finally, select the unison package then install from source (click the .h icon).

To use unison to synchronise your mac with your DICE files, run unison from the command-line in an X terminal window using the staff.ssh.inf.ed.ac.uk server. The DICE unison installation may not be the latest, so use 'unison-[version]' to run a matching version on the Mac. (eg unison-2.10.2). Current DICE version is 2.12.0 - this is not included in the Fink package.

Shuly Wintner provides a variety of binary versions with native Mac UI. Get the 2.12.0 version, to match the unison server on DICE - it appears to run fine under rosetta.

2006-03-16

Real Player for OSX Intel

Real Player Universal Binary is now available - build 412.

Note that this version is not mirrored on all download sites (the London UK site hosted by demon still has build 352, PPC only). I used one of the Seattle sites to get 412. You can check which build you have downloaded using get Info (command-I).

Once you've downloaded the correct build and put the put it into your applications folder, quit all web browsers; open the RealPlayer application, go through the setup process, which will install the plugin needed to access RealPlayer content on the web, such as BBC Radio Player.

You can then change Safari to run native — unless you want to view Shockwave content!

In the finder use get Info (command-I) then click "Open using Rosetta".

Since the RealPlayer plugin is compiled to PPC code you have to ensure Safar is run under Rosetta - an application running native Intel code cannot use a PPC plugin.

BBC Radio Player uses RealPlayer, so you need the same trick to run BBC Radio player on an Intel Mac.

2006-03-15

DivX for OSX 10.4 Intel

Since the DivX plugin is compiled to PPC code you have to ensure Quicktime or Safari run under Rosetta - in the finder use get Info (command-I) then click "Open using Rosetta". Update 2006:04:12 The plugin provided by the official release of DivX Player for Macintosh is a Universal binary. You can run it native. Curiosly, the DivX Converter and DivX Player are still PPC. Download the DivX 6 for Mac Installer.pkg
Double-click the installer to install the codec. Restart, and use Quicktime Player or Safari, to watch the latest day's work on the building (around 1.5Mb). You can also see the day at a slower pace (around 170Mb) or a directory of other views.

2005-12-26

ant javac Xlint:unchecked

You are porting your code to Java 5.0 (aka 1.5); building your project under Xcode gives the following notes from javac:

[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
This raises the following question:
Q: How do I pass -Xlint:unchecked to an ant javac task?
A: Edit the relevant target in your build.xml file to add an embedded compilerarg entry, to the javac task:
<compilerarg value="-Xlint:unchecked"/>
or
<compilerarg value="-Xlint"/>
so it reads something like this:
<target name="compile" description="Compile code">
       <mkdir dir="${bin}"/>
       <mkdir dir="${lib}"/>
       <javac srcdir="${src}" destdir="${bin}" 
              includeAntRuntime="no" 
              classpathref="lib.path" 
              debug="${compile.debug}">
           <compilerarg value="-Xlint"/>
       </javac>
</target>
Using "-Xlint" enables all recommended Xlint options, including :unchecked. See the Sun javac documentation (scroll down to Xlint) for details of other options, giving finer control if you need it.

2005-12-09

Installing the University Certificate

The EUCS site gives complex instructions for installing the University Certificate on MacOSX for use with Safari.

Now Apple have made this simple:

  1. Download the Edinburgh CA Certificate.
  2. Open (double-click) the certificate in the finder. This should launch Keychain Access and take you through a dialog to install the certificate.
  3. Install the Certificate in your X509 Anchors keychain.

2004-11-19

Broadcasting using iSight and Quicktime Broadcaster

NB this still seems flakey (ie it works sometimes but not reliably). Use at your own risk...

Preliminaries

These instructions assume you have an iSight camera, and have downloaded and installed Apple's QuickTime Broadcaster. Register to get an account on the University Darwin Streaming Server. You will be given FTP access to pilton.ucs.ed.ac.uk—the reflector which will braodcast your video stream.

Setting up a live broadcast

Plug in the iSight; quit from iChat; launch QuickTime Broadcaster.

Check the IP address for pilton.ucs.ed.ac.uk
(type host pilton.ucs.ed.ac.uk on the unix command line).

In the quicktime broadcaster window, select multicast transmission, and enter the reflector (i.e. pilton) IP 129.215.16.20 for both audio and video address. Don't change the port entries.

Under Audio, enable the audio stream and select the source (probably iSight) and set parameters; under Video enable the video stream, select source (iSight) and parameters. (Note that the University reflector is throttled at 350kbits/sec total for both streams, so 300kbits/sec is about the most you can use for video.)

Now choose File>>Export>>SDP... from the file menu. This produces an sdp file. Save it somewhere convenient (eg. as test.sdp) and then transfer it to the reflector (pilton.ucs.ed.ac.uk) by ftp.

You can save the Broadcast Settings at this point, quit QuickTime Broadcaster, and come back later to give your performance.

Launch Quicktime Broadcaster; Click the broadcast button to go on air, and tell your audience to watch the stream with QuickTime Player (File>>Open URL in New Player...) using a URL like rtsp://pilton.ucs.ed.ac.uk:554/hcs/test.sdp (see your email from ucs which gives details of the URL to your space on pilton). Unfortunately, both Safari and Firefox try and open this URL using Real Player - which doesn't cope with the format.

2004-05-04

sshLogin ssh-agent ssh-add

ssh-agent and ssh-add don't do what you want if run from terminal or xterm.

The excellent application sshLogin carries a GPL licence. This provides ssh-agent ssh-add functionality integrated with Apple's X11. You can even, in effect, install your ssh identity in your Apple keychain.

To install sshLogin:

You have to set up a keychain pair using ssh-keygen before using sshLogin.

2004-04-21

Setting environment variables

There is a special environment file which loginwindow reads each time a user logs in. The environment file is: ~/.MacOSX/environment.plist

Dot files aren't, by default, visible in the finder, so type cd; open .MacOSX in a terminal. If the environment.plist file is there you can open it in the Property List editor with a doubleClick. Otherwise, you will have to create the .MacOSX directory yourself.

To create the directory and file
$ cd
$ mkdir .MacOSX
$ echo "" > .MacOSX/environment.plist
$ open .MacOSX/environment.plist

This should open your new, empty environment.plist file in the Property List Editor. Select Root and Add a Child: the Key should be the name of the variable you want to set; Type should be String; Value should be the value you want to set for this variable. Next time you log in the variables should be set.

Environment variables set in environment.plist also appear in the standard bash environment. You can see all your environment variables using the shell command env from a Terminal window.

REFERENCE: http://developer.apple.com/qa/qa2001/qa1067.html

WARNING: do not set the DISPLAY variable—see my post re. X11 on Leopard.

2004-04-12

No xauth data

The common
Warning: No xauth data; using fake authentication data for X11 forwarding.
appears to be harmless. However, it is annoying. It arises when you have no xauth data!

The command
xauth list
displays all your xauth data. If there is no entry for your local display — which looks something like
localhost/unix:0 MIT-MAGIC-COOKIE-1 026666083d4e480d3e77544949281b49
you can generate one using the command
xauth generate :0 .

This creates an authorization using the MIT-MAGIC-COOKIE-1 protocol. Clients that connect with this authorization will be untrusted.
The period "." is part of the command; "untrusted" is probably what you want.
However, for some operations you need to connect as a trusted client. In case of problems, try using the command
xauth generate :0 . trusted
see man xauth or the X11 Security Extension Specification.

2004-04-01

Printing to DICE printers

You have to be connected inside the DICE firewall (eg. by physical connection, informatics wireless, or ssh) to use the printers ...

On a DICE machine, use the Unix command printers -s to list the available printers, + information on models, printservers, and location. (See man printers for other options.)

Use the Printer Setup Utility (in /Applications/Utilities/ on the Mac) to add a new printer:

IP Printing
Printer type: LPD/LPR
Printer Address: printbp.inf.ed.ac.uk
Queue Name: lwa
Printer Model HP LaserJet 4050 Series

Printer Type
is LPD/LPR
Printer Address
is the address of the server
Queue Name
is the name of the printer
Printer Model
can be left as Generic. However, if you get it right you can access printer-specific options from the OSX print dialogs.

2004-02-02

EUCS VPN and wireless

To use the central 802.11 wireless network (available in,: Raeburn Room, Old College; Hodgson Room, Science & Engineering College Office; Concourse, Appleton Tower, inter alia) and the University VPN, register online with the University Computing Service (EUCS) .

You do not need to download the Cisco VPN client. Once registered, you can connect to the University VPN server, vpngate.net.ed.ac.uk using PPTP with the built-in VPN client (accessible via Internet Connect on MacOSX v10.3 (Panther)).

Once connected via the VPN you can use the staffmail SMTP server: staffmail.inf.ed.ac.uk

2003-01-01

feedback

Please give feedback on this blog by leaving a comment below.

Was the tip you found unclear?
Were you looking for something else?

Let me know!

Thank You

This is a post to say, "thank you" to you, the reader, for your interest, feedback, comments and tips.

If you found this blog helpful, please just click the link at the foot of the post.

For constructive feedback or criticism, add a comment on the relevant post (or for general feedback, on this post).

To submit a tip, mail it to mpfourman-mactip@blogspot.com.