Apple Errors Hardware Software

Mac os (Mountain) Lion + external display + sleep when closing the lid

I recently dared to upgrade from Snow Leopard (10.6) to Mountain Lion (10.8), skipping Lion (10.7) altogether.

One of the mayor disturbances I had, was when I was using my Macbook Pro at my home office. I use an external display (some Samsung SyncMaster) as well as my MBP’s main display.

I put my MBP to sleep by simply closing the lid, keeping the power source and external display attached.

Pre-Lion this resulted in my MBP neatly going to sleep mode, in Mountain Lion this resulted in Mac OS using the external display as sole display and keeping the MBP running… Not something I was interested in, as it would either require me to unplug power before closing the lid or manually clicking the sleep button for my MBP to go to sleep.

After some great searching, I came along this post (page 3 and 4 have useful information) and I’ll summarize it here:

  1. Unplug your external display
  2. open Terminal (via spotlight for example) and type:
    sudo nvram boot-args="iog=0x0"
  3. Type your Mac password
  4. Reboot and wait for Mac OS X to fully boot
  5. Plug your external display back in. The resolution might be wrong and it might not recognise your display.
  6. Go to sleep by closing the lid. It should now work correctly.
  7. Upon reopening, the resolution will be fixed (if not, close and reopen or replug the external display — I’m sure it’ll be solved now).

I’ll add this info as well that jk10003 added:

If it screws up your system, just zap the PRAM next boot (cmd-opt-p-r) and you’ll be back to the default Lion state. Or if you can still get into terminal, this command will get you back to Lion’s default state as well:

sudo nvram -d boot-args



Apple Software www

Compile wget on Mac OS X

There’s a precompiled wget available on the net, but it’s not automatically accepting StartSSL’s certificates. And as it seems, there’s a wget update available that did.

This is what I had to do to compile it on my Macbook Pro;

  • Install Xcode, if you haven’t, and be sure to select UNIX Dev Support.

Or you’ll get this error:

configure: error: C compiler cannot create executables
  • Export Xcode’s gcc PATH:
  • Download wget
  • In Terminal: untar it
tar xvzf wget-latest.*
  • And compile it
cd wget directory
sudo make install
  • In case you had an old (precompiled) wget installed;
    remove that version first (/usr/bin/wget probably).
    By default, this one will install itself in /usr/local/bin/wget which should be in your $PATH as well (in case it’s not, make a symlink from the old /usr/bin/wget to /usr/local/bin/wget, or recompile with other installation directories).
Apple Errors Software

Java + Angry IP Scanner error

Angry IP scanner was quitting each time I started the application, and looking at Console I saw these errors:

06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190] [JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading file
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190] [JavaAppLauncher Error] CFBundleCopyResourceURL() failed while getting Resource/Java directory
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190] [LaunchRunner Error] No main class specified
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190] [JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190] Exception in thread "main" java.lang.NullPointerException
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190]  at
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190]  at apple.launcher.LaunchRunner.callMain(
06/11/08 11:34:15 [0x0-0x1f01f].net.azib.ipscan[190]  at apple.launcher.JavaApplicationLauncher.main(
06/11/08 11:34:15[97] ([0x0-0x1f01f].net.azib.ipscan[190]) Exited with exit code: 1

After some googling I came upon this website.

Following the (long/first) instructions did solve the problem, and I can now run the application.

Only skipping , as I could not find the “CFBundleExecutable”, and simply renaming the old ipscan to ipscan.bak, and renaming JavaApplicationStub to ipscan.


YouTube of the day

Just ’cause I’m bored.

Apple Software www

wget for Mac OS X

The missing tool in Mac OS X is most likely wget. Here’s a (universal) port.

Read the readme for installation howto. 🙂