Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts

Saturday, October 8, 2011

Hardware Growler for Mac OS X Lion

Just in case this could be of any use to someone else, I compiled Growl 1.2.2 for Lion with the fix for HardwareGrowler crash on Lion that happens when disconnecting from a wireless network or waking up the Mac. You can download it here. The binary should work on Snow Leopard too. It's only compiled for x86_64 CPUs.

Sunday, February 21, 2010

How to disable Bonjour on OSX 10.6 (Snow Leopard)

Bonjour is Apple's zeroconf protocol and iTunes (among others) uses it to broadcast the existence of its shared library, which I find annoying because it's quite chatty on the network. In the past shutting down mDNSResponder was enough to keep it quiet but this doesn't work as intended anymore on Snow Leopard as all DNS activity goes through mDNSResponder now.

Apple's KB explains how to properly disable those broadcast advertisements:
  1. sudo vim /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
  2. Add <string>-NoMulticastAdvertisements</string> at the end of the ProgramArguments array.
  3. Save the file
  4. Restart mDNSResponder:
    sudo launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
    sudo launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
There's no need to reboot unlike what the KB says, as you long as you restart mDNSResponder.

Saturday, April 18, 2009

MacPorts failing to upgrade gettext with +with_default_names

MacPort 1.7.1 breaks itself when trying to upgrade from gettext 0.17_3 to 0.17_4 when coreutils are installed with +with_default_names, here's how to fix it.

First off, the symptom will be:
--->  Deactivating gettext @0.17_3
dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
Referenced from: /opt/local/bin/rm
Reason: image not found
Error: Deactivating gettext 0.17_3 failed: 0
Error: Unable to upgrade port: dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
Referenced from: /opt/local/bin/ln
Reason: image not found
Error: Unable to upgrade port: dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
Referenced from: /opt/local/bin/ln
Reason: image not found
Error: Unable to upgrade port: dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
Referenced from: /opt/local/bin/ln
Reason: image not found
A thread on macports-users explains how to fix this:
  1. Edit /opt/local/etc/macports/macports.conf and add this line at the end of the file:
    binpath /bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin:/opt/local/sbin:/usr/X11R6/bin

  2. port deactivate gettext

  3. port install gettext

  4. Remove the line you added in step 1.

  5. Re-run the initial command you were running to resume the upgrade of whatever you were upgrading.
Ryan Schmidt said that he was considering to remove +with_default_names but I disagree with his statement that "it's probably not good to override those default Mac OS X utilities". The GNU coreutils are vastly superior to the BSD ones and what's the point of installing them without +with_default_names? Having to prefix almost every single command with `g' is a waste of time.

Thursday, October 2, 2008

Fixing the sparsebundle error "Operation not supported on socket".

If you're trying to mount a .sparsebundle (typically a directory that contains a FileVault $HOME) and get an unexpected Operation not supported on socket error (aka EOPNOTSUPP / ENOTSUP for those who know what errno is) then the fix is simple: fix the permissions of the file within the .sparsebundle file. At least it worked for me. Some of the files were owned by root. So a simple
sudo chown -R $USER my.sparsebundle
did the trick.

Oddly enough I couldn't reproduce this problem by manually trying to chmod some files in the .sparsebundle. But I'm 100% sure that in my case fixing the permissions fixed the problem.