mac

Finding the current system JAVA_HOME on mac osx 10.5+

I always forget where this file is located - so just as a reminder ;)

To find the current JAVA_HOME for the current user (set by java preferences) run:

/usr/libexec/java_home

Details from http://developer.apple.com/library/mac/#qa/qa1170/_index.html

Technical:

Running rvm ruby 1.9.2 with rvm packages on OSX Lion - failing to make due to readline

Getting rvm rubies to compile with the rvm packages isn't turning out that easy.

First off - you need to get XCode for Lion installed from the App Store (even if you upgraded from Snow Leopard - Lion needs a newer version). In addition - the App Store downloads an XCode installer - you also have to run it to get it installed ;)

So I grabbed the latest rvm:

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

This puts up the following message:

Mac homebrew and homebrew-alt

Updating mac homebrew from 0.7.1 to 0.8 removed the rsync formula that I use to update mac rsync from the supplied 2.x version to 3.x.

This is due to the fact that homebrew doesn't want duplicates of existing software.

However - these are still available via homebrew-alt

For example - to regain the rsync formula was as simple as:

brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/rsync.rb

Prevent iPhoto '11 from asking for your e-mail password

iPhoto '11 from iLife '11 has a new set of e-mail templates for sending photos directly from the application.

However - each time it prompts for your e-mail password and doesn't seem to have a "remember" option.

To fix - open Keychain Access (/Applications/Utilities).

Select login (your login keychain) from the top left Keychains list and Passwords from the lower left (Category) list.

Adding hosts to /etc/hosts on Leopard/Snow Leopard

Adding hosts to /etc/hosts on Leopard/Snow Leopard is a little simpler than earlier versions (see /etc/hosts on Mac OS X)

  • Edit /private/etc/hosts1
  • Run dscacheutil -flushcache

  1. Since /etc is symlinked from /private/etc /private/etc/hosts is the same file as /etc/hosts 

Technical:

Tunnelling IPv6 from a mac over IPv4 tunnel through a debian firewall using tunnelbroker.net

There are three steps to this:

  1. Tunnel configuration
  2. Firewall configuration
  3. Client configuration

Tunnel configuration

Sign up for an account at http://tunnelbroker.net

Once signed up - choose "Create Regular Tunnel"

Enter the IPv4 address of the external interface of your firewall. Note - this must be able to receive and respond to ping from arc.he.net - the webpage will give you an IP address to allow ping for if it can't ping your firewall.

Java Apps banned from new mac app store

A follow up on Java deprecated on Mac OS X?

From a response in this thread we can read:

Apps that use deprecated or optionally installed technologies (e.g., Java, [PowerPC code requiring] Rosetta) will be rejected.

Technical:

Java deprecated on Mac OS X?

There's an interesting paragraph in the latest Mac OS X Java update relasenotes New and Noteworthy - a paragraph called "Java Deprecation".1

As of the release of Java for Mac OS X 10.6 Update 3, the version of Java that is ported by Apple, and that ships with Mac OS X, is deprecated.

Technical:

Importing custom CA certificates to OSX

For my own sites I use SSL certificates signed by my own CA.

The CA certificate needs to be imported to the machines where I use the websites and for Mac OSX it needs to go into the system keychain - not the users keychain.

Importing via Keychain Access sometimes fails with cryptic error codes.

Here's how to do it via the command line:

sudo security import  -k /Library/Keychains/System.keychain

Technical:

A really weird #NextGenTel router issue

Thursday the 11th February - the router from my ISP (NextGenTel) suddenly entered a constant restart loop. Start, find DSL, find settings, connect, 2 sec or so uptime, reboot and off we go again.

We've been investigating and now have found what starts the cycle but have no idea how or why - it just seems really odd ;)

iSCSI on the ReadyNAS NV+ and OSX Snow Leopard

The Pro series of NAS from ReadyNAS (Netgear) support iSCSI out of the box. But the NV+ 4disk unit does not. However - a third party plugin is available. Let's look at what is needed to get iSCSI connections between the ReadyNAS NV+ and an iMac running Snow Leopard.

Setting /usr/local/bin before /usr/bin in bash PATH for Mac OSX Snow Leopard for all users

Just a short reminder - the list of paths that path_helper (/usr/libexec/path_helper is called from /etc/profile) is stored in /etc/paths. Just add /usr/local/bin at the top of the file.

Time machine on a large external disk as a sparseimage

Having a very large external disk I wanted to limit Time Machine to use only part of it.

To do so - you can use the same technology as time capsule does - sparseimages.

In the following:

HOSTNAME is the result of:

hostname -s

MAC is the mac address of the network adapter:

ifconfig en0 | grep ether | sed -e "s/.*ether //" | sed -e "s/://g"

Utilities

Time Tamer:

Backing up Aperture Vault to a NAS

Listening to the digital story this morning prompted me to think about my Aperture setup.

Aperture has its "vault" functionality - but this only works to the local hard drive or to USB/firewire drives directly attached to the box.

I have a RAID5 based NAS (network attached storage) device which I would  far prefer to have my backups on - since I've had USB disks die on me before.

How to get the vault onto the network device?

Google address book sync to mac address book - aargh - duplicates

The latest update to Mac OSX 10.5.3 now includes inbuilt google/address book synchronization.

However - after updating and adding my login details for gmail to addressbook it just seemed to hang with:

Can't connect to the sync server: NSInvalidReceivePortException: connection went invalid
while waiting for a reply ((null))

The solution was to remove the contents of

~/Library/Application Support/SyncServices/Local

and try again.

Note that for account name it needed the full e-mail address complete with googlemail.com domain.

Update

Leopard issues

Folllowing issues after update (updated 8:55 wed 19th dec)

Technical:

Setting up custom routes depending on the network location in OSX

Nearly all you need to know is available here:

http://www.geisterstunde.org/drupal/?q=osx_routing

All I found is that $BUNDLE refers to /System/Library/SystemConfiguration/Kicker.bundle/ and the script should go in $BUNDLE/Contents/Resources - not $BUNDLE/Resources (the paths are a little mixed in the original article).

Bluetooth triggered activity for the mac

http://metaquark.de/homezone/

A really cool little app that can do things when you move in/out of range with your bluetooth phone.

It can also trigger based on your IP or airport availability :)

Technical:

Geotagging photos on the mac

With a couple of bits of free software you can simply geotag (add longitude/latitude to a photos EXIF data) your pictures. These can then be shown on flickr's map, google maps etc.

GPSBabel and GPSBabel+

A really handy command line utility and graphic GUI for translating GPS formats. It can grab from file or from various devices and can convert between many different formats.

GPSPhotoLinker

Syncing nokia n95 with the mac, address book pairing and 3G over bluetooth

The n95 from nokia is not directly supported by mac osx. However - there are two additions that will help.

iSync

Nokia themselves provide an iSync plugin that will give you full syncing of iCal and Address Book. More info available from Nokia

Address Book pairing

Apple Mail dialog

Dialog popped up when hitting Get Mail in apple Mail.app

Taxonomy upgrade extras:

The Mac OSX menu with dual screens

The menu on a mac is always shown on the primary display - something which is awkward when you have dual monitors and are working on the secondary display.

While it isn't perfect - this app allows you to have a keypress which will bring up the menu as a context menu by the mouse - and seems to be the best solution currently available.

http://homepage.mac.com/khsu/DejaMenu/DejaMenu.html

Technical:

Mac OSX 10.4.9 iSync and SonyEricsson P990i

[img_assist|nid=221|title=iSync detect of P990i|desc=|link=none|align=left|width=640|height=206]Somewhat as expected - the iSync update in the update to Mac OSX 10.4.9 still gives that it is not supported. Oh well.

Technical:

Colour calibration - Macbook Pro -> Epson 2000P

I finally managed to get consistent colour right from the screen through to the printer. Here's what I needed to do.

First step was to calibrate the screen (Macbook Pro in this case). To do this I used the Spyder2 calibration device from ColorVision.

Second step was to get the Epson papers onto the Macbook Pro (they were not originally present - since the printer is connected to a Mac Mini and used over the network - but I grabbed them from the mini and stuck them in the same location.

Amanda backup for OSX

I needed to get both my Mac machines (mac mini intel and macbook pro) to be included in the amanda backup I run.

I could have tried going via samba - but the following page works exactly as advertised:

http://www.locnar.net/drupal/?q=node/16

Technical:

Squid proxying and whatsmyip.net and similar services

Just a quick note.

If you configure the mac's HTTP proxy under network system settings to point to a squid server on your local network - then whatsmyip.net et al return your internal IP (in my case a 192.168.1.x one) - instead of the real external address.

Very confusing when you can't work out how an internal IP is getting out there - it isn't.

Could well be the same (in fact I expect it would be) for windows, linux too.

Printing to HP 1015 via Synology USB Station

The USB Synlogy print server works just fine with Windows. The documentation states that it can only print to a Postscript printer from Mac OS X.

The HP 1015 LaserJet is sadly not a postscript printer - and I didn't spot this requirement before buying the print server.

However - despite the fact that it will detect the printer as a Postscript printer (you can try printing to it if you want to waste lots and lots of paper) - you can get this to work.

Ignore the fact that it says it must be postscript - just use the hpijs printer (see this post) and hey presto - it all just works.

Technical:

Pages

Subscribe to RSS - mac