zen.org Communal Weblog

September 22, 2007

iTunes on the wireless network

Filed under: — brendan @ 11:39 GMT

After a little difficulty, I’ve got it working! The music on the Mac Mini upstairs is coming out of the speakers of our 15 year-old Aiwa stereo in the diningroom downstairs.

My laptop’s got a Belkin TuneCastII FM Transmitter plugged into its headphone jack. The laptop (booted into WindowsXP) is running iTunes, playing a song—right now, “The Devil Went Down to Georgia” by The Charlie Daniels Band. And the laptop’s connected over our wireless network.

The Linksys WRT54G in the livingroom is running DD-WRT, a replacement firmware giving it a lot more oompf than what comes on the box by default. I specifically put it on to solve the continuous problem of Mac laptops losing their association with it after a few hours or a day.

Anyway, it turns out the only thing preventing the iTunes on my laptop from seeing the shared music off the mini upstairs was that I’d left the “SPI Firewall” enabled. Since I’ve got the wireless already as tight as I can get it (no broadcast, mac filter, wep encrypted and soon wpa), it’s probably not particularly useful since anything connected via an Ethernet cable wouldn’t be protected by it either.

With that firewall disabled, the packets (to whatever port(s)) made it through and can finally play music on my laptop!

Our 9 month-old boy doesn’t seem to like “Let It Roll”, the next song in that album. Let’s see if he likes The Eagles…

September 18, 2007

Mac OS X Update, Reboot

Filed under: — sven @ 15:18 GMT

Like, Oh Em Gee, there was a Mac OS X update today and I didn’t have to reboot! Praises from Summerland! The only problem was it didn’t tell me that until it was done and I had already saved and quit out of all my applications by the time it finished.

July 10, 2007

MacOS to KDE

Filed under: — sven @ 19:00 GMT

I had too many passwords to remember at work, MacOS X did a good job of remembering them but it kept them in a way that was difficult to extract. At home, with Kubuntu, KWallet kept things encrypted but also gave me access to them with only one password. So I installed KDE of my University surplus system and got osx2x to work to share the keyboard with my much newer Mac. So now when I need one of my LDAP passwords in a place I have not used it before I can read it and not contact systems to reset my password.

The odd thing is, slowly, I’m doing more and more on my slow Debian box with KDE then on the duel processor Mac. MacOS X: iTunes, iCal, GNU Emacs 22, web browser testing. KDE: KMail, web browser use, OO.o, RSS, command line. I still keep the Mac monitor in front of me, hence Emacs. Before I installed KDE, I longed for a GUI sftp access in the Finder, now I use KDE’s file browser to browse my Mac files more then the Mac finder, even though it is right in front of me!

Gotta go, meeting.

June 6, 2007

Mac Mini becomes Network Grand Master

Filed under: — brendan @ 11:53 GMT

My desktop system has sporadically been freezing up on me, even as I try to swap out various parts to figure out what’s causing my grief. I’m finally giving in and accepting that it’s a 9 year-old system with a mixture of 1-year and 7-year parts. It’s wasted too much of my time. So I’ll start figuring out what to do for a replacement (yay tax deductions for work).

To be practical, I need to move some things to not depend on it until I get the replacement. First on the list is all of my mail folders which are usually available via the IMAP server (running courier-imap) on my desktop system. The little Mac Mini on the corner of my desk is probably the answer; having just upped its memory I figure it’s ready for the task.

Luckily David Bondes in Sweden has spelled out most of the steps to get the Courier IMAP server to build and run under OS X. Elsewhere, I found ttya.net with a more complete and up-to-date set of instructions about how to make authentication work.

The best discovery is MacPorts (formerly DarwinPorts), which uses a FreeBSD-style ports system to make it really easy to build and install random software to run on the system. As you’re about to see, though, the efforts of the MacPorts version of courier IMAP needs some further polishing.

The steps I did:

  • Install MacPorts.
  • Downloaded and installed everything with the fun command
    sudo /opt/local/bin/port install courier-imap
    which did all of: db44, courier-authlib, zlib, openssl, and courier-imap.
  • Edited /opt/local/etc/courier-imap/imapd and set IMAPDSTART to YES (may actually be irrelevant)
  • The command the script said to run to make it start up when we boot:
    sudo launchctl load -w /Library/LaunchDaemons/org.macports.courier-imap.plist
  • sudo cp /opt/local/etc/authlib/authdaemonrc.dist /opt/local/etc/authlib/authdaemonrc
  • and edit authdaemonrc to have authmodulelist be just authuserdb.

  • Following the instructions from ttya.net, put entries in a new file /opt/local/etc/authlib/userdb
    that look like
    username uid=511|gid=511|home=/Users/username|shell=/bin/bash|systempw=*|gecos=Real Name
    with userdbpw to generate the hash that replaces the * for systempw. Then run makeuserdb to convert the userdb into a DB4 database. Make sure you have a TAB character, not a space, between username and uid.
  • sudo mkdir -p /opt/local/var/spool/authdaemon
    sudo /opt/local/sbin/authdaemond start
  • I also had to do this to make it generate the SSL key:
    sudo sh /opt/local/share/courier-imap/mkimapdcert
  • And the command to make it start now without having to reboot:
    sudo /opt/local/etc/LaunchDaemons/org.macports.courier-imap/courier-imap.wrapper start
  • I didn’t have to run maildirmake Maildir because I’m syncing mine over en masse.

And it works! The manual bits after port did its deeds were pretty tedious, and the majority should be able to be done as part of the Portfile included with courier-authlib. It should also be possible to use the DirectoryServices API to make an ‘authosx’ sort of module to not require the userdb hack. (That file needs to be regenerated any time someone changes their password, for instance.)

That’s ok—at least I’ve let go of a major depencency on my dying desktop system.

June 4, 2007

Ahh, memory makes all the difference

Filed under: — brendan @ 15:49 GMT

Cartoon from a great blog entry about upgrading

We’re using an Apple Mac Mini as our server du jour. In addition to keeping all of our CDs ripped on it in iTunes, it is our DHCP server, our nameserver, our printer server, and keeps our free dynamic DNS entry up-to-date so we can avoid paying for a static IP address with our DSL connection. It sits on top of a cool external hard drive for holding the music and backups (as a samba server).

The only problem was the way iTunes would make the rest of the Mini come to a bit of a crawl—even when other computers are just asking the Mini to resolve some hostnames. Today, after the small box sat on my desk for three full months, I finally took half an hour to do the deed. Following an awesome memory upgrade tutorial, I replaced the normal 512Mb of memory in the Mini with a whopping 1GB of luscious fruitful memory ready to serve your every need. Beautiful memory is waiting to talk to you now…cough. Since this is an older (PowerPC-based) Mac Mini, it took very little effort at all; newer ones involve more surgery.

Increasing the memory has really made a difference. I can be in iTunes loading up the white 10Gb second-generation iPod with music to play on the DART when I have to go up into Dublin. But at the same time I could have a Terminal window open, or bring up Safari to look up the generations of the iPods in Wikipedia. And it all just works. What a difference! This helps avoid random excuses used to buy new stuff. Which is a good thing—honest, I’m reminding myself of that all the time. It’s better this way. It still works just fine.

Even better now.

Really. It’ll eventually sink in.

P.S. I’m toying with tossing random cartoons at the beginning of some posts just as an experiment. A friend of ours does some awesome writing in her blog (added to our links on the right of our page as well), but she also includes a great assortment of pictures and cartoons with her posts. I found it’s a neat extra piece to the whole blog entry, and makes it more satisfying than just reading all plain text. Maybe I’ll get tired of hunting for something I like each time, or maybe the few people reading this are on dialup and loathe the waiting time. But let’s see how it plays out. :-)

January 24, 2007

Quicktime Update

Filed under: — sven @ 16:43 GMT

@#$%, make me reboot.

July 28, 2006

Mac and Memory

Filed under: — sven @ 15:15 GMT

There was a grad student here that wrote a Perl program to compute the Jaccard coefficent of some Blast data. The Mac he was using has 8G of memory, but come to about 2GB of memory usage Perl would crash. I reworte it into two programs, first to dump all his data to a gdbm file, then processed that file using the Jaccard coefficent. It never used more then 2G and finished, it took like a day longer to run but we got what we wanted. This all happened a few months ago, and for this and other reasons we moved that project to Solaris.

A few days ago one of our sysadmin was investigating a complaint on why Perl on MacOS X was slow. He built the same Perl twice, one using the system’s malloc(3), the other using the malloc shipped with Perl. Using the original program computing Jaccard coefficent, with a small dataset, it used 1,220 CPU seconds with Apple’s malloc, but only 605 CPU seconds with Perl’s! I asked him to run it with the full data set. Apple’s malloc crashed after 116,700 CPU seconds and ~2.3GB of memory. With Perl’s malloc it used 65,469 CPU seconds and finished after using ~2.8GB of memory.

So happy SysAdminDay!

June 28, 2006

Mac 1:1 (1:0) PC

Filed under: — sven @ 14:50 GMT

Our Toyota Pirus has this feature that you don’t need to put your key in the car to drive it.  So when 余艾蕾 and I drove off this morning I didn’t notice that I was driving off using the key in 余艾蕾’s pocket, not mine.  When I got to work, however, I was unable to unlock my office door.  So I sat down and started working at the PC in the hall, rather then at my Mac.

Apart from figuring out how to turn on the Dvorak keyboard, and having it pop back to QWERTY for no reason that I could tell, the PC was not that bad to use.  There is just one thing to know, don’t use Microsoft software.  Once I started using software not shipped by Microsoft all went well!

So Microsoft makes a passable operating system, but really crappy software.

June 7, 2006

Kubuntu 6.06 LTS Released on a Mac G5

Filed under: — sven @ 20:46 GMT

Perhaps to Pat’s chagrin, I will make another Ubuntu post. Like I did last April, I tried Kubuntu on my PowerPC at work. It didn’t report the audio card not working. If the sound card worked or not I don’t know, the fan got too loud. Also, the mouse didn’t work, I don’t know if the mouse worked with the beta version, I was too worried about turning it off.

April 25, 2006

Kubuntu 6.06 LTS Beta Released on a Mac G5

Filed under: — sven @ 14:00 GMT

So, I bittorrented down the kubuntu-6.06-beta-live-powerpc.iso image and burned it to a CDRW. I rebooted my work’s G5 while holding down the c key and went into live 64-bit version. Unlike breezy it didn’t ask me any questions, so I told it no lies, and plopped me down at the KDE GUI in a low resolution. The fan started going, then up popped an error message that the audio didn’t work, and the fan got noisier. Audio didn’t work in breezy either, but at least this time it told me it didn’t work. The fan got louder! Then again, the fan GOT LOUDER! I HAD NEVER HEARD MY THIS MAC THIS LOUD BEFORE, AND STILL IT GOT LOUDER! I PRESSED THE POWER BUTTON ON THE MONITOR BUT NOTHING! AS THE RPM OF THE FAN INCREASED IT GOT EVEN LOUDER! MY SYSTEM IS UNDER AND BEHIND MY DESK, I HAD TO JUMP OVER THE DESK, AND AS THE PEOPLES HEADS FROM OUT IN THE HALL STARTED PEARING IN MY OFFICE THE NOISE LEVEL INCLEASED!! I’M SURE JUST SECONDS BEFORE THE FANS WHERE TO COME OF THERE BASE AND FLY AROUND LIKE LITTLE PLASTIC THROWING STARS I HIT THE POWER BUTTON, AND THINGS got quiet again.

I can’t wait until it’s out of beta.

Powered by WordPress