The Best Use For A Cat And A Balloon



I Have A Great Idea!, originally uploaded by vanRijn.

I don’t know why I didn’t think of this like 10 years ago, but tying a helium-filled balloon to your pet (I’ve tried the cat and the dog and can vouch for the brilliance of this plan for them, but your fish I cannot recommend trying this on) is absolutely the most brilliant thing I’ve ever done in my life.

As an added touch, rub the balloon like a fiend all over the cat’s back so that it makes his hair stand up on end and also so that the balloon is so static-electricity-charged that it will attach itself to said cat’s body, or anything else that is close enough (like the wall that the cat is trying to stand next to to regain his dignity).

Oh, the brilliance of me!!!

This Just In: Linux Is Better Than OS X

Well, at least it is for me. And it’s taken me $1500 to figure it out the hard way.

How much is it to ask for to be able to {alt,command}-tab through ALL bloody open windows in OS X? You know… ALL of them. Like, ALL of them–including the X11 windows that all get bunched up underneath one stinking X icon. Or the 2 Firefox windows. Not just one of them. ALL of them. And yes, I do know about Witch. And no, it doesn’t work with X11 windows. And why would I want to use X11 to begin with? Because sometimes Free applications are much, much better than the ones you have to pay for. For example, kontact is MUCH much better an integrated mail/PIM environment than Mail.app could ever dream of being.
I realize that some people (mostly Mac-only people) don’t bother their pretty little heads about such things. OS X is pretty, after all, and it’s sooooo much better than OS 9, etc. And if you stay in the Apple box, it truly is a really nice and functional and pretty environment.
Blah.

I now realize that what I have is a really pretty, sexy, sleek, expensive computer (again, they all suck) that is completely incompatible with me. I’m not saying it’s not compatible with others–obviously that’s not the case, and I wish them all the best of luck. But it sucks for me.

I realize this, but it comes down to what you’re used to and what you can be most-productive with. And for me, I’m used to working the way that I’m used to working for the last 10+ years on Linux, and be it “better”, “worse”, “ugly”, or “whatever”, it’s what I’m comfortable with and what I’m most-productive with.

As I’ve blogged about previously, I cannot just use Linux on the powerbook (Linux works absolutely great, persay, but the proprietary applications that I need to run on it I cannot since they’re not made for Linux-PPC, but only Linux-x86). Let this be a lesson to all those who come behind…. Yes, Linux (the Kernel and distribution) works wonderfully on the PPC platform. But do the apps you need? Realize up front that you cannot use Flash (like 50+% of the websites on the WWW use these days?!?), Moneydance (forget OFX because Moneydance is proprietary, as is Java, and the only “complete” JVM you can use decently is IBM’s JDK, which doesn’t work with Moneydance’s SSL layer or something… blah), Win32-based multimedia codecs (.mov, .avi, .asf, etc…. any of the codecs that work in Linux-x86 that are based on windows32 will NOT work in Linux PPC), and others you may not realize you really need to have until you’re stuck with a powerbook running Linux and can’t have them.

I also cannot just use OS X. This is partly because of comfort/what-I’m-used-to, as well as some practical things, like having to jump through some really screwy hoops to be able to develop for the KDE environment.
And how bloody difficult is it to have the “end” key mean “End of Line” to OS X????? Or the “Home” key mean “beginning of Line”, not “top of page”????
And why not put the to-the-rest-of-the-world standard keys (ever heard of insert? single-key delete/page down/page up/home/end?????) as single keys on the Mac keyboard, Steve???

Bloody BLAH.

Converting a CVS Repository to Subversion

I had thought that this would be a straight-forward mission, but it was not. While the front-end tools look and feel very much the same between CVS and Subversion, the back ends are VERY different. Honestly, I much-prefer the CVS approach (all flat-files, predictably placed in $CVSROOT), but since that’s probably part of the problem of CVS’s lack of flexibility with file/directory moves, etc., it’s understandable that Subversion does it differently.

Anyway, in using cvs2svn to convert my existing CVS repositories, I faced a problem that was covered in cvs2svn’s FAQ: (more…)

After All That, Back to OS X

So I’m a little disgruntled right now.  I’ve rebooted back into OS X and I’ll likely stay here for a while.  As it turns out, the show-stopper for me to be able to run Linux (which I’d much prefer) on this powerbook is not anything to do with Linux itself, but rather with the commercial/proprietary software that I find myself needing to run.  I need to be able to use Moneydance to do my family’s financial account management and bill paying.  Moneydance runs on Java.  Apparently, the only full version of Java for Linux PPC is IBM’s JRE.  That’s right, Sun doesn’t provide Linux-PPC users a JRE, how nice of them.  And yes, I did spend a couple of hours trying to get cacao, sablevm, and kaffe working with Moneydance and they didn’t work at all.  IBM’s JRE does actually get the program started and working up to a point.  It poops all over itself, however, when it tries to download online bank transaction information:

There was an error communicating with your financial institution. The details of this error are below.
A communication or parsing error occurred. This could be the result of a network problem, a proxy error, or misconfigured server.
Error Description: java.io.IOException: java.security.NoSuchAlgorithmException: Class com.ibm.jsse2.cc configured for SSLContext not a SSLContext

Oh joy.  I’ve opened a bug report with the Moneydance folks, but have not heard back from them yet.

And, of course, I can’t get any of the non-open stuff to work in Linux PPC.  This includes Flash, win32 codecs (can’t play .mov, .avi, .wma), etc., etc.  So, I need to figure out how to either replace Moneydance with something better that will work in Linux PPC (GNUcash maybe??) and live with the stuff that doesn’t work, or I need to figure out how to start being able to be productive and code for KDE in OS X.

Crap.  Again… what the heck did I do to myself???

[Update] Oh, I almost forgot… The other really big reason I had to sound the retreat is that I kept getting kernel panics whenever I’d go to hotsync my Palm device (Treo 650).  I’ve opened a bug with the ubuntu folks, and haven’t heard back on it yet.  My guess would be something related to the appletouch driver, since it’s a sort-of-usb device thingey, but I’ve not had time (nor will I most probably) to look into it further. Blech!

Ubuntu Linux, External Speakers, Your Powerbook, and You

Yet another small blip from the life and times of a powerbook owner and Linux glutton-for-pain… I think this issue has been fixed in the Alsa 1.0.11-rc4 snd-powermac modules, but since I haven’t taken the time to recompile the kernel yet and since Ubuntu Dapper Drake still only comes with 1.0.10, I’m stuck with a workaround for a time being.

So, I have a 15″ 1.5G powerbook, and I just bought some really nice Altec Lansing speakers from the local Target and would like to use them with my powerbook in Linux. Sounds simple enough of a request, no? Well, believe it or not, it doesn’t work out of the box. I plug my headphones/external speakers in and sound still comes out of my powerbook’s internal speakers. I’m using kmix here (KDE > * =;) ), so what I’ve found is that I have to manually go into kmix’s full mixer window (right-click on the tray icon and click “Show Mixer Window”. Go to the “Switches” tab. Note that “PC Speaker” is selected. “Headphone” may or may not be selected also if you have your external speaker/headphones plugged in, but no sound is coming out of your headphones/external speakers–that is the problem, after all. Also, “Auto Mute” is selected by default on mine (probably should do exactly what I need it to do by default, but methinks it’s broken). So, anyway, unselect “Auto Mute”, then click “Headhpone”. Beautiful. Music now comes out of all 4 of my speakers. =:) Flippin’ sweet!! At first, I had to keep playing with the “Headphone” and “PC Speaker” selections–turning one off, then the other, etc., but now it seems to be working perfectly well.

HTH some other glutton-for-pain Linux powerbook user…. =:)

Trouble in the land of Linux-on-powerbook

Stink. I am starting to question my sanity in buying a powerbook. There’s just some things that aren’t working and most probably are not ever going to work:

Java. Duh. It’s the thing that your mom (and RMS) have been warning you about for the last 10 years. Non-free (open source) software is a problem. Why? Because if you want to run it on something that isn’t supported by the owner of said proprietary software, you CANNOT. Case in point…. I need to be able to run my financial software (Moneydance). I use Linux on a Powerbook (PPC) machine. I can’t download the Java JRE from Sun, since they only provide Java for x86 and ia64 platforms. I could use blackdown’s JRE, but they only have version 1.3 available for PPC linux. Yeah, right. That’s only… like… 4 years out of date now?? So the only java that I can find for Linux PPC is IBM’s java. And surprise, surprise, when I go to download my financial transactions with Moneydance using IBM’s JDK 1.5 for PPC Linux, I get this:

There was an error communicating with your financial institution. The details of this error are below.
A communication or parsing error occurred. This could be the result of a network problem, a proxy error, or misconfigured server.
Error Description: java.io.IOException: java.security.NoSuchAlgorithmException: Class com.ibm.jsse2.cc configured for SSLContext not a SSLContext

Riiiiight.

And then, of course, along a similar vein is my complete inability to run Flash on my Linux PPC machine. Why? Well, it’s quite simple, really… Flash is a proprietary piece of software and Macromedia/Adobe only allows you to use it on Linux if you use an x86 machine. Stink!!

What the crap was I thinking? Anyone want to buy a 5-month old 15″ powerbook??? =:/

Kubuntu On A Powerbook

So, in an attempt to get back to hacking/programming again (since I’m definitely not getting it at work), I’ve installed Linux on my Powerbook. Actually, I’d installed SuSE 10 on it the day after I bought the powerbook 5+ months ago, but I’d never really done anything with it–partly because I really wanted to see what OS X was really like (it is REALLY, REALLY cool, but not conducive to feeling like I can start improving things/hacking/programming) and partly because neither the trackpad nor the wireless ethernet worked. But recently, the folks at the Broadcom 43xx Linux Driver project have made GREAT strides in getting the proprietary Broadcom wireless network card working in Linux. And, the kind folks with the kubuntuproject (probably also the core ubuntu project as well, but I much prefer KDE…) have made almost everything work out of the box for Linux running on the Powerbook.

There are a few things that I had to do to get things working as well as I wanted them to. This, then, is some notes on what I’ve done….

First, the trackpad. By default, the latest kubuntu (Dapper Drake, at time of writing) comes with the driver for the apple trackpad. The kernel module for this is “appletouch.” To get it to play nicely with X, I’ve replaced kubuntu’s default section for the Synaptics mouse in /etc/X11/xorg.conf with this:

Section “InputDevice”
Identifier “Synaptics Touchpad”
Driver “synaptics”
Option “SendCoreEvents” “true”
Option “Device” “/dev/input/mice”
Option “Protocol” “auto-dev”
Option “LeftEdge” “0″
Option “RightEdge” “850″
Option “TopEdge” “0″
Option “BottomEdge” “645″
Option “MinSpeed” “0.4″
Option “MaxSpeed” “1″
Option “AccelFactor” “0.04″
Option “FingerLow” “0″
Option “FingerHigh” “30″
Option “MaxTapMove” “20″
Option “MaxTapTime” “100″
Option “HorizScrollDelta” “0″
Option “VertScrollDelta” “30″
Option “SHMConfig” “on”
EndSection

And to be honest, after getting used to the Synaptics driver, I really do like the vertical and horizontal scrolling it can do, as well as the right-click and middle-click you can do by tapping with two or three fingers. I do really miss OS X’s two-finger scrolling feature, but I think I can get used to this and do just fine. The one thing I still need to spend a little time tweaking is the sensitivity. It seems that I have to tap a little bit harder than I do in OS X to initiate a scroll or a mouse move.

One more mouse-related thing… By default, kubuntu/ubuntu comes with 3 lines in /etc/sysctl.conf that cause the F11 and F12 keys to fire middle/right mouse clicks. I am used to using F11 and F12 for other keybindings, so I’ve commented these out as such:

# Emulate the middle mouse button with F11 and the right with F12.
#dev/mac_hid/mouse_button_emulation = 1
#dev/mac_hid/mouse_button2_keycode = 87
#dev/mac_hid/mouse_button3_keycode = 88

Secondly, those crazy apple keyboards on the powermacs aren’t exactly what you’re used to if you’ve been using x86 Linux for the last 12+ years as I have. It goes “control, alt/option, command (open apple)” on the left side of the space bar. My fingers want to naturally go to the button immediately to the left of the space bar for the “alt” key, and as mentioned, on the apple keyboard, this is the “command” or “open apple” key. So, to map things the way I’m used to working, I have this in a file I’ve called ~/.xmodmap-powermac:

keycode 115 = Meta_L
keycode 116 = Meta_R
clear mod4
clear mod1
add mod1 = Alt_L Meta_L Alt_R Meta_R

I then call “xmodmap ~/.xmodmap-powermac” from either KDE’s Autostart directory or ~/.xsession . This causes both the “alt/option” key and the “open apple/command” key to be treated as the “alt” key in X. Happiness.

Now, on to the wireless network… As stated above, kubuntu nicely comes with the kernel drivers for this to work. But there is a little bit of work that is left for the user, because of legal reasons. In short, you need to use the bcm43xx-fwcutter utility from the broadcom 43xx project page to extract the firmware from Apple’s drivers. Having done this (read that page for the specifics) copy all resultant bcm43xx*.fw files to /lib/firmware. You’ll then need to either reboot (simplest) or reload the bcm43xx kernel module. This will allow the driver to actually use the wireless card.

From there, there’s a little bit of a timing issue around getting the card to associate with an AP and subsequently get connected and DHCP’d onto a wireless LAN. But to sum it up, I’ve added eth0 (the wireless card) to /etc/network/interfaces as so:

auto eth0
iface eth0 inet dhcp
pre-up /home/me/bin/eth0-wireless-pre-up.sh

That tells debian/kubuntu to start the wireless card automatically and how to load it (man interfaces) by running my custom eth0-wireless-pre-up.sh script, which is as follows:

#!/bin/bash
ifconfig eth0 down
ifconfig eth0 up
iwconfig eth0 channel 6
iwconfig eth0 rate 11M
iwconfig eth0 essid MYESSID
sleep 2
iwconfig eth0 key MYKEY
sleep 2

As you can see, the tricks are that you need to limit the rate for the card to 11M, give it your SID, wait for it to associate to your AP, then give it your key (if you have one), and then after that all works, kubuntu will automatically kick off dhcp (dhclient3, to be precise).

So, that gets my wireless card working at boot. But what about suspending/resuming? Well, there’s probably more official ways, but here’s what I’ve done…. I’ve created a file called /etc/apm/scripts.d/vR-apm and symlinked it into the /etc/apm/resume.d/ and /etc/apm/suspend.d/ directories. That file is as follows:

#!/bin/sh -x
#
# apmd proxy script for vR–custom stuffies
# — from apmd_proxy…
# Here are the possible arguments:
#
# start - APM daemon has started
# stop - APM daemon is shutting down
# suspend critical - APM system indicates critical suspend (++)
# suspend system - APM system has requested suspend mode
# suspend user - User has requested suspend mode
# standby system - APM system has requested standby mode
# standby user - User has requested standby mode
# resume suspend - System has resumed from suspend mode
# resume standby - System has resumed from standby mode
# resume critical - System has resumed from critical suspend
# change battery - APM system reported low battery
# change power - APM system reported AC/battery change
# change time - APM system reported time change (*)
# change capability - APM system reported config. change (+)
#
# (*) - APM daemon may be configured to not call these sequences
# (+) - Available if APM kernel supports it.
# (++) - “suspend critical” is never passed to apmd from the kernel,
# so we will never see it here. Scripts that process “resume
# critical” events need to take this into account.

echo “`date`: got here, 1->$1< -, 2->$2< -" >> /tmp/apm-debug.log

case “${1},${2}” in
(suspend,*)
echo “`date`: doing suspend stuff” >> /tmp/apm-debug.log
ifdown eth0
;;
(resume,suspend)
echo “`date`: doing resume stuff” >> /tmp/apm-debug.log
modprobe -r appletouch
modprobe appletouch
ifup eth0
;;
esac

And with that, my Linux powerbook correctly restarts the wireless network whenever I suspend and resume (which works perfectly well out of the box too, by the way).

Okay, bye.