Tuesday, November 28, 2006

Network awareness (part I)

I wanted kopete to cleanly log me on and off when I suspend/resume like iChat does. Here's the temporary solution (in Kubuntu Edgy):

Create /etc/acpi/suspend.d/20-kopete.sh mode 0755 to read,
    #!/bin/sh
HOME=/home/myuser dcop --user myuser kopete KopeteIface disconnectAll

Create /etc/network/if-up.d/kopete mode 0755 to read,
    #!/bin/sh
HOME=/home/myuser dcop --user myuser kopete KopeteIface connectAll

Monday, November 27, 2006

Fixing hibernate on Edgy Ubuntu

After upgrading kubuntu on my Dell Inspiron 640m to Edgy, hibernate no longer worked. After living with it for several weeks and relentlessly checking for software updates, here's the solution [1]:

Edit /etc/initramfs-tools/conf.d/resume to read,
    RESUME=/dev/sda2

Edit /etc/fstab to read,
    /dev/sda2 none swap sw 0 0
(removing a similar line that started with "UUID=")


Rebuild your initramfs,
    $ sudo update-initramfs -u

Fix your corrupted swap partition,
    $ mkswap /dev/sda2
$ swapon -a

Enjoy your fully-functional linux laptop.