Archive for June, 2007

Eek!

Monday, June 25th, 2007

I noticed the e-mail alerts about my backups were a lot smaller than they should be, sure enough there was a problem. Logged into my server, and the prognosis was bad.

chris@sandman:~$ ls /backup/
ls: reading directory /backup/: Input/output error
chris@sandman:~$ sudo umount /backup/
chris@sandman:~$ sudo mount /backup/
mount: /dev/hdb1: can't read superblock
chris@sandman:~$ sudo xfs_check /dev/hdb1
xfs_check: /dev/hdb1 is invalid (cannot read first 512 bytes)

By this time I was very worried, decided rather than mess around anymore I would try a reboot and see what became of that. It would appear either the kernel got confused or the IDE controller decided to sulk. a reboot solved it. :)

Another Painless Upgrade

Sunday, June 24th, 2007

I don’t get people who moan about upgrading web software, I suspect these are all fairly dumb people who do not have or know how to use terminal access to their server. I just upgraded Wordpress from 2.2 to 2.2.1 in 5 minutes, patch for anyone else like me with brains.

Grub Scripted Configuration

Tuesday, June 19th, 2007

This is a really ugly sed one liner that configures grub how I like it.

$ sudo sed --in-place 's/#\(hiddenmenu\)/\1/;s/^\(timeout[ \t]*\)[0-9]*/\12/;s/^\(# lock.*=\)false$/\1true/' /boot/grub/menu.lst
$ _GPASSWD=$(read -s -p "Enter Grub Password (note type carefully): " _GPASSWD; echo $_GPASSWD | mkpasswd --hash=md5 --stdin); echo; sudo sed --in-place "s/# password topsecret/password --md5 $_GPASSWD/" /boot/grub/menu.lst; unset _GPASSWD
$ sudo update-grub

Weird things be happening

Monday, June 18th, 2007

Ohh arr what a frog.

One Word

Saturday, June 16th, 2007

Free! Finally all three of my exams are over, a little earlier than expected but no matter still happy! Shame I felt so ill last night, didn’t go out and get smashed :( Oh well there is always tonight!

June Desktop

Monday, June 11th, 2007

Screenshot of eddie

Gstreamer Loving

Monday, June 11th, 2007

I am beginning to understand the power of gstreamer, the following snippet converts FLAC files to MP3 with a 192 kbps bitrate.

gst-launch-0.10 filesrc location="$FILE.flac" ! decodebin ! lame bitrate=192 ! filesink location="$FILE.mp3"

Ubuntu lirc Configuration

Monday, June 11th, 2007

I keep meaning to document this, the installation procedure for my MCEUSB2 remote control with lirc under Ubuntu, so here we go.

  1. $ sudo aptitude install lirc lirc-modules-source module-assistant debconf-utils
  2. $ wget http://static.cs278.org/conf/debconf/ubuntu-704_lirc-modules-source -O- | sudo debconf-set-selections
    $ sudo dpkg-reconfigure lirc-modules-source

    This was needed before but is now automated:
    Select mceusb2 and then No, and chooseInstall the package maintainer’s version if the option appears.

  3. $ sudo sed 's/MODULES=""/MODULES="lirc_mceusb2"/' /etc/lirc/hardware.conf --in-place
  4. $ sudo m-a update,prepare
    $ sudo rm /usr/src/lirc*deb
    $ sudo m-a clean lirc
    $ sudo m-a a-i lirc
    $ sudo depmod -a
  5. $ wget "https://help.ubuntu.com/community/Install_Lirc_Feisty?action=AttachFile&do=get&target=lircd.conf.mceusb" -O- | sudo tee /etc/lirc/lircd.conf
  6. $ sudo modprobe lirc_mceusb2
    $ sudo /etc/init.d/lirc start

Sources:

Mugged

Wednesday, June 6th, 2007

Clock Applet

Tuesday, June 5th, 2007
gconftool-2 --type string --set /apps/panel/applets/clock_screen0/prefs/format "12-hour"
gconftool-2 --type bool --set /apps/panel/applets/clock_screen0/prefs/show_date true
gconftool-2 --type bool --set /apps/panel/applets/clock_screen0/prefs/show_seconds true