With a little side of applesauce...

Monday, January 31, 2011

OS X / hdiutil - acquire mount point on command line

When I was trying to automate the installation of XiphQT, I was struggling to find the mount point after Finder opened the dmg. I found that I could tail -n1 the output of the hdiutil attach my.dmg and use that output:


# move to the location of our dmg file
cd ~/Downloads

# We need to change the separator for the for loop,
# (in case mountpoint has whitespace)
IFS=\n

# mount the dmg, and output the final line of output which looks like:
# /dev/disk2s1 Apple_HFS /Volumes/XiphQT 0.1.9
for m in $(hdiutil attach xiph-qt-0.1.9.dmg | tail -n1 ) ; do

# set our mount point for future use
# (change our FIELD SEPARATOR to tab, in case of whitespace in mountpoint)
mp=$(echo $m | awk 'BEGIN {FS="\t"}; {print $3}')

# set our destination folder
dest='Library/Components'

# create our destination folder
cd ; mkdir "${dest}"

# copy our component into the destination folder
cp -R ${mp}/XiphQT.component "${dest}"

# detach our mountpoint
hdiutil detach ${mp};
done

iTunes - play ogg

"Ogg! Ogg!", as the caveman raises his club to the sky...

This image always enters my mind when talking about Ogg Vorbis, but as a matter of fact it is "a completely open, patent-free, professional audio encoding and streaming technology with all the benefits of Open Source." (http://www.vorbis.com/) I double on GNU/Linux, as well as Mac OS X, so when I want to play my ogg-encoded files in iTunes, I install the Xiph Quicktime Components, (http://www.xiph.org/quicktime/download.html).

To install Xiph Quicktime Components:
2. Open Terminal
3. Run this command:
cd ~/Downloads ; IFS=\n ;for m in $(hdiutil attach xiph-qt-0.1.9.dmg | tail -n1 ) ; do mp=$(echo $m | awk 'BEGIN {FS="\t"}; {print $3}') ; dest='Library/Components' ; cd ; mkdir "${dest}" ; cp -R ${mp}/XiphQT.component "${dest}" ; hdiutil detach ${mp}; done

4. Restart iTunes
5. Try to add ogg files to library.

Tuesday, January 18, 2011

Eclipse - Profile is currently in use

When I tried installing plugins into eclipse on Mac, I got the obscure 'profile is currently in use' error. I found that I needed to move eclipse off of the external drive, and to the local hard drive. I'm not sure if it was because the partition was fat32...

Thursday, January 6, 2011

Google Apps Infrastructure migration notes - multi-login

I am just going to keep a running list of items that I hit with the new multi-login functionality in Google Apps:

  1. Only 3 accounts can be logged in at a time. If you need to login to more than 3 Google Apps or Gmail accounts, you will need to open a second browser.
  2. Login with your preferred Blogger/YouTube account first. If your blogs and youtube accounts are all under an @gmail.com account, then login with that account first. If you login to Gmail with your @googleapps account, then login to your youtube account with your @gmail.com address, Gmail will logout your @googleapps account, and login with your @gmail.com account. (A real pain!)
  3. Don't forget to turn ON Google Help for your Google Apps domain!! Unbelievably, it is not available to your @googleapps accounts until you enable it in your Gmail domain administrator interface...

I'm sure there will be more :P I must say that the current state of the Google Apps Infrastructure migration is much better than when I first beta-tested it in Oct.(?) At that time, there was no multi-login capabilities yet, so I had to have two browsers open, (ala pre-Opera/Firefox tabs days :( ).