Tuesday, July 7, 2009

Steps

* Chunk by DOC tag
* Strip DOCHDR data
* convert to plaintext

Saturday, July 4, 2009

Compacting VirtualBox image - Ubuntu edition

It is well documented among the VirtualBox community that 'dd' is not enough to zero out a disk image for compacting. The preferred tool to do so is 'zerofree'. Now, the issue is that it requires the disk to be mounted as readonly. This is fine and dandy, except when you only have one partition to work with. My workaround is to use the Ubuntu minimal CD. The steps necessary are:

* Before booting the minimal CD, make sure you've got zerofree installed
'sudo aptitude install zerofree'
* Boot the minimal image.
* Enter recovery mode.
* In the language selection screen, select "Go Back" instead of picking a language.
* Start a new shell.
* Make a mountpoint, e.g.
'mkdir /mnt/r'
* Mount the disk image,
'mount -n -o ro -t ext2 /dev/sda1 /mnt/r'
* Copy zerofree and the necessary libraries to the tmpfs:
'cp /mnt/r/usr/sbin/zerofree /bin/; cp /mnt/r/lib/libext2fs.so.2 /lib/; cp /mnt/r/lib/libcom_err.so.2 /lib/'
* Run zerofree
'zerofree /dev/sda1'
* Profit!

XMonad compositing

Enabling compositing in XMonad is easy.

Setting an image as the background is a little bit more difficult. Normal methods like 'qiv' will not work with compositing. Fortunately there's 'hsetroot'. One donwside though is that it does not let you set an offset for the image. This is annoying when your virtual screen is taller than the image's resolution, as I found out when using it on my dual-display machine. I have yet to find a good solution for that.

Thursday, July 2, 2009

Installing Ubuntu in VirtualBox

These steps are for OSX Leopard as a host, Ubuntu Jaunty (9.04) netinstall.

* Don't use the default network adapter. Use the Intel one instead.
* I set the partition manually to just have one big partition, ext2. No swap partition was set up because a) I have enough memory allocated, b) I can always set up a swapfile, c) having a swap partition increases the disk image file size,
* gksu, make, and linux-headers-generic are required to install guest additions.
* The video driver was giving me problems. Installing the guest additions with xserver-xorg-video-vesa alone did not work for me. I've narrowed it down to either xserver-xorg-video-vmware, xserver-xorg-video-fbdev, linux-headers-virtual, or a combination thereof. Afterwards I've removed all but xserver-xorg-video-fbdev and things are still working.
* localepurge and debfoster are your friends when minimizing the disk image size.

.xsession and XRandR

Note to self: check spelling of lines in the .xsession file.
xrandr --output VGA --mode 1280z1024
is not
xrandr --output VGA --mode 1280x1024

Sixty Symbols

http://www.sixtysymbols.com/