Fewer Broken Pieces

The blog of N. Dan Smith

Archive for the ‘gentoo’ tag

zsh on Gentoo and OS X

without comments

I am now a zsh man.  The key to a happy zsh experience is a good ~/.zshrc file.  Thanks to Gentoo’s docs, I have a good start:

#!/bin/zsh
# completion
autoload -U compinit
compinit
# prompt
autoload -U promptinit
promptinit
prompt adam1
# options
setopt correctall
setopt autocd
setopt extendedglob
# history
export HISTSIZE=2000
export HISTFILE="$HOME/.history"
export SAVEHIST=$HISTSIZE
setopt hist_ignore_all_dups
# zstyle
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:warnings' format '%BNo matches for: %d%b'
# color
[ -f /etc/DIR_COLORS ] && eval $(dircolors -b /etc/DIR_COLORS)
alias ls="ls --color=auto -h"
alias grep="grep --color=auto"

There are many more zsh options to play with.  For example, you can use prompt -l to see the list of available prompt templates if adam1 does not suit you.  Customized designs are doable as well.

You can also set the OS X Terminal.app to use zsh (/bin/zsh), but the color section of the file needs to be a bit different:

# color
alias ls="ls -Gh"
alias grep="grep --color=auto"

Enjoy!

Written by N. Dan Smith

November 20th, 2008 at 6:52 am

Posted in technology

Tagged with , ,

SeaMonkey: For some reason I can’t explain

without comments

For some reason I can’t explain, I decided to try out SeaMonkey on my iBook G4 running Gentoo, though only the browser and not the whole suite.  So far I am quite pleased.  All of my extensions work, and the browser feels a lot snappier than Firefox 3.  There are also some nice features like tab previews.  There are a few drawbacks - namely the lack of native-looking UI widgets, reverting to Gecko 1.8, and having to get reacquainted with the old Mozilla interface.  But I will stick with it for a while.

Written by N. Dan Smith

August 21st, 2008 at 3:00 am

Posted in technology

Tagged with , , , ,

NetworkManager and PowerPC

without comments

I started using NetworkManager on my iBook G4 running Gentoo Linux.  I was sad to find, however, that the stable version could not connect to WPA-protected networks due to an endianness bug.  Thankfully the bug has been fixed upstream and the latest version (0.6.6) works fine.  That version is still marked testing for PowerPC (~ppc keyword) in the Gentoo tree, so users will have to unmask it and a few dependencies (like HAL).  After updating, NetworkManager works like a charm.

In other news, I have finally figured out my iBooks clock issue.  It was losing its time every reboot.  At first I lamenented that the mother board’s battery was dead, but it turns out there is no onboard battery but there is a capacitor which holds a charge long enough to swap out the battery.  I have had a bad battery which went profoundly dead, so the hardware clock was wiped when the capacitor expired.  After resetting the PMU, PRAM, and NVRAM, I realized that I could just use baselayout to set the hardware clock to the system clock at shutdown to make sure it is correct.  Now, when I boot up, my clock is right on.

Written by N. Dan Smith

August 3rd, 2008 at 9:57 pm

Posted in technology

Tagged with ,

Gentoo on iBook G4: The Essentials

with 2 comments

When it comes to running Linux on an Apple iBook G4 (or any iBook or PowerBook in general), there are a few essential resources.  Here they are:

  • Gentoo Linux PPC Handbook - The installation instructions for Gentoo are among the best documentation available for Linux.
  • Gentoo PPC FAQ - This document answers all your questions about the idiosyncrasies of running Linux on PowerPC hardware.  This includes information on how to enable your soundcard as well as recommendations for laptop-specific applications (which can be installed with portage).  First and foremost of these is pbbuttonsd (”PowerBook buttons daemon”), which makes the volume, brightness, and eject keys work, along with sleep and other power managment features.  There is nothing like being able to close the lid and forget about it, just like in Mac OS X.
  • Airport Extreme Howto - This is a very clear and concise guide to getting your Airport Extreme wireless network card working.  Until these drivers came along, Linux on the iBook G4 was not very fun.  Now I can enjoy its full laptop potential.
  • Gentoo Hardware 3D Acceleration Guide - You have a Radeon Mobility video card in that iBook.  Use it!  Follow this guide to ensure that hardware rendering is enabled.  This will open the door to goodies like Compiz Fusion, which does work fairly well on the iBook G4.
  • Inputd - This program allows for right-click solutions (e.g. command + left-click = right click) and much more.  The cure to the one button mouse.  It requires some changes in the kernel and perhaps its config file, but it should not be too challenging for any user who has successfully completed the Gentoo install.

It is best to consult all of those resources during the initial installation.  That way you do not have to go back and rebuild your kernel when you add each feature.

Written by N. Dan Smith

June 30th, 2008 at 11:52 pm

Posted in technology

Tagged with , , ,

Gentoo on the iBook G4

with 2 comments

While Debian may be suitable for my Apple Powermac G3 Blue and White, nothing can beat Gentoo on my iBook G4.  I have resolved that being a Gentoo developer is not part of my future.  But I cannot stay away from Gentoo as a user, especially when it comes to my iBook.  Pure computing joy.

It was not always so.  When I first started using Gentoo there were no drivers for the Broadcom wireless card it has.  Thankfully since then free and open drivers have been developed which work great for me.  Also, all of the Mac buttons and features (including sleep) work perfectly, so it makes a great notebook.  I plan as using it as my main work horse for thesis research and writing.

Written by N. Dan Smith

June 28th, 2008 at 7:26 pm

Posted in technology

Tagged with , ,