Ubuntu on PowerBook G4 15" (Dapper Drake, 6.06 LTS)

My notes of getting things to really work after installation of Ubuntu 6.06 LTS on Apple PowerBook G4.

Table of contents

The trackpad

Very first thing I noticed after booting up the installation CD was the retardedly slow trackpad, after making it thru the installation (no use to start tweaking there) I still wonder howcome the skin of my fingertips is still intact. So here we go for a fix.

Search out the section "InputDevice" under which Driver is set to "synaptics", comment the whole section out or delete it, and paste the following to its place:

Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "SendCoreEvents" "true" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "SHMConfig" "true" Option "MinSpeed" "0.30" Option "MaxSpeed" "1.10" Option "EdgeMotionMinSpeed" "200" Option "EdgeMotionMaxSpeed" "200" Option "FastTaps" "1" Option "MaxTapTime" "80" Option "AccelFactor" "0.030" Option "HorizScrollDelta" "0" Option "FingerLow" "1" Option "FingerHigh" "3" Option "LeftEdge" "80" Option "TopEdge" "80" Option "RightEdge" "850" Option "BottomEdge" "560" Option "TapButton1" "1" Option "TapButton2" "3" Option "TapButton3" "2" EndSection

These options are the ones you might like to modify to better suit your needs: TapButton# sets the mouse button which event will be sent when # of fingers are tapped on the trackpad. Top-, Right-, Bottom-, and LeftEgde options define the edge positions on trackpad for scrolling and yet more mouse buttons. MinSpeed, MaxSpeed and AccelFactor, well, those are pretty much self explanatory. FingerLow and FingerHigh define the pressure of finger motion to detect.

The keyboard layout

My PowerBook has finnish keyboard layout, so of course there wasn't any keyb layouts out there to use, so i proceeded to make my own. If you have finnish or swedish keyboard layout on your PB, get the the layout here: xmodmap-powerbook, and copy it to /etc/X11/Xmodmap.
Be sure to set System -> Preferences -> Layouts to "Finland". Log out, and back in.

Option key basically serves as AltGr on PC keyboards.

Something like warning: I personally don't think the default Apple layout is suitable for coding, so few chars are found from the same place as they do on default PC keyboard:
"\" at Option-?,
"|" at Option-<,
"{" at Shift-7,
"}" at Shift-0,
"" at Option-e.

Java

Few steps to get java working:

Java-plugin for firefox

Get the java plugin to work with firefox:

# mkdir ~/.mozilla/plugins
# sudo ln -s /usr/lib/j2sdk1.5-ibm/jre/bin/libjavaplugin_oji.so ~/.mozilla/plugins/libjavaplugin_oji.so

Mobile phone GPRS connection using bluetooth

Ok, now it's time to get the bluetooth to work. First, let's install few packages.

# apt-get install gnome-bluetooth obexserver bluez-utils bluez-pin pppconfig

Switch your phones bluetooth on, and set it discoverable. Now we are ready to go, so let's load up few modules.

# modprobe l2cap # modprobe rfcomm

Allright, lookup for the phone and its address.

# hcitool scan

Write the address (eg. 00:12:15:5B:DC:11) down. You should replace all the values marked as 00:12:15:5B:DC:11 with the address you just wrote down.

# sdptool browse 00:12:15:5B:DC:11

There you should see service id class "Dialup Networking", check value of Channel (eg. 2) and write it down. You should replace all the values marked as 2 with this one. So, let's get on.

# mknod /dev/rfcomm0 c 216 0

Now let's save the values for using the phone as modem.

Edit your /etc/bluetooth/rfcomm.conf and add the lines:

rfcomm0 { bind yes; device 00:12:15:5B:DC:11 channel 2; comment "My phone" }

When you are done, restart the thing.

/etc/init.d/bluez-utils restart

Now everything should be set. Time to pair your laptop with your mobile phone:

# hcitool cc 00:12:15:5B:DC:11
# hcitool auth 00:12:15:5B:DC:11

You will be prompted to enter the PIN code (which you can just make up your own) first on your laptop, then on your mobile phone automatically. Do it.

Next, it's time to create the modem scripts by using pppconfig.

# pppconfig

Proceed by the following steps:

Almost done, we still need to edit the config just created.
Open up /etc/chatscripts/gprs in your favorite editor and comment out the lines starting with "ogin" and "ssword", and save the file.

Now you should be able to get online by issuing command:

# pon GPRS

And offline by commanding:

# poff GPRS

Mac on Linux

Using the same OSX you use to dual boot with linux is pretty easy, even without booting at all. Just install MOL.

apt-get install mol mol-drivers-macosx mol-drivers-macos

Next, edit /etc/mol/molrc.osx and set the amount of RAM you want to give OSX by modifying ram_size variable to suitable value. I have ram_size 768. Save the file, and start OSX as root:

# sudo startmol --osx

Aaaaaaand, you are done!

Networking in MOL

Override root privileges:

sudo dpkg-statoverride --update --add root root 4755 /usr/lib/mol/bin/mol

If you want to be able to go online, install ipmasq, dnsmasq, and dhcpd. Then edit your /etc/default/dhcp and enable tun0 or just add:

netdev: tun0 -tun

In /etc/mol/tunconfig add the lines

/etc/init.d/ipmasq restart
/etc/init.d/dnsmasq restart

just before exit 0.

Install sysv-rc-conf if you haven't done so and invoke it in a terminal window:

sudo sysv-rc-conf -s 2S

Go down to the two ipmasq entries and turn them off (startup scripts). MOL will automatically start them up when called. If you don't turn off those scripts, you won't have a working internet connection when you start up (as I found out the hard way).

If you prefer, you can shorthand the command to start MOL by adding an alias to your ~/.bashrc. I called mine "osx."

alias osx='startmol --osx'

Now close any current terminal windows, open a new terminal window, and type "osx." You're all set.

Full screen: CTRL+ALT+F8
Escape full screen: CTRL+APPLE+F7

And don't forget to install the ethernet driver package when you log in to OS X.

Airport Extreme

Install the bcm43xx-fwcutter:

apt-get install bcm43xx-fwcutter

Download Airport Extreme firmware here: wl_apsta.o

Extract the firmware:

sudo bcm43xx-fwcutter -w /lib/firmware /path/to/wl_apsta.o

Reload the module.

sudo modprobe -r bcm43xx
sudo modprobe bcm43xx

WPA with wpasupplicant

First install wpa_supplicant:

sudo apt-get install wpasupplicant

Next, create entry for your wpa_suppplicant.conf

wpa_passphrase NETWORK-SSID NETWORK_PASSPHRASE

And you'll get something like following:

joona@joona-pb:~$ wpa_passphrase Testnetwork testpassword network={ ssid="Testnetwork" #psk="testpassword" psk=ad1b0027d025072e20e5b554229290a61b9d5547f3644324f5af61ab66b5d5f9 }

Now, create file /etc/wpa_supplicant.conf and paste the lines from wpa_passphrase there, and add few arguments, after the operation, your wpa_supplicant.conf should look something like this:

network={ ssid="Testnetwork" #psk="testpassword" psk=ad1b0027d025072e20e5b554229290a61b9d5547f3644324f5af61ab66b5d5f9 scan_ssid=1 proto=WPA key_mgmt=WPA-PSK }

Next, create file /etc/default/wpasupplicant with lines as follows:

ENABLED=1 OPTIONS="-i#### -Dwext -c/etc/wpa_supplicant.conf -w"

The #### should be your AE interface (mine was eth1)

Next, open up your /etc/network/interfaces , and edit iface #### (again, your interface id) to look like this; mine as example:

auto eth1
iface eth1 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

Now you should be ready to go! /etc/init.d/networking restart should bring your WLAN interface up, and fetch IP from DHCP thru it.


Copy-all-you-want-right by Joona Hoikkala (joona@remove_this_part_before_sending.kuori.org) 2006