Saturday, October 2, 2010

Mounting an encrypted LUKS LVM volume from a live CD

Get Luks and dm-crypt running on the live disk:
sudo apt-get install lvm2 cryptsetup
sudo modprobe dm-crypt
sudo cryptsetup luksOpen /dev/sda4 crypt1

If you LVM setup then you need to continue with:
sudo vgscan --mknodes
sudo vgchange -ay
Take note of the volume group name. 'vg0' in my case.

Mount the disk:
sudo mkdir /mnt/disk
sudo mount /dev/vg0/root /mnt/disk

Friday, July 30, 2010

Move Lucid min, max, close buttons to the right

gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close

Tuesday, June 1, 2010

Inotify

Inotify is awesome, I've used the python bindings before to good effect but just today I needed to monitor a directory for whenever a file was created.

Pretty easy:
sudo aptitude install inotify-tools
inotifywait -m -r --format '%f' -e CREATE data/

Friday, February 26, 2010

Clock Screensaver for Ubuntu

You can use the GLText screensaver to display the time whenever you lock your screen:

In the file /usr/share/applications/screensavers/gltext.desktop change

Exec=gltext -root
to
Exec=gltext -root -front -text '%l:%M:%S %p'