Nearly 2014

Since Xmas I’ve been busy hacking away at things. I tried to install Ubuntu on my Mac Mini and ended up screwing up the EFI pretty royally to the point where I had to remove rEFInd (which didn’t work well anyway), repartition the drive, reinstall OSX, update, and fix things like a randomly disappearing RecoveryHD partition and OSX installing an old version of Safari 5.1 instead of the current 6.1, and then never updating it. The fix for that was to delete it and then Software Update can see the new one is available:

sudo rm -rf /System/Library/StagedFrameworks/Safari/WebKit.framework

Also it seems you have to use special Mac alternate versions of the Ubuntu DVD’s as it seems the Mac’s EFI (BIOS thingy) can’t read Joliet discs, and the bootloader is 32-bit despite the kernel being 64-bit.

Next I noticed that somehow my Raspberry Pi’s weather database had a bunch of duplicate entries in it, despite me creating the database with a unique constraint on the timestamp column and a Python exception to catch it and rollback. I’m also not sure how duplicate entries happened even without the constraint, unless I had manually run the script at the same time as cron did or something odd…. So I had to go through removing the duplicates:

SELECT id,date(*) FROM rf24weather GROUP BY id HAVING count(*) > 1;

And add the unique index back:

CREATE UNIQUE INDEX date on rf24weather(date);

They weren’t tweeted as Twitter doesn’t allow duplicate posts.

I’ve also been working with the Debian package maintainers to get arduino-mk updated in their Git repo, and have also built a SPEC file to make Fedora RPM’s, which are stored here for F18 and F20 alongside my Jessie debs.

Finally, I’ve updated this blog to WordPress 3.8, time for a good sleep now!

Debian Sid on EeePC 1001P

As Debian Wheezy beta1 got released the other day I thought it was high time I updated my netbook from Fedora14.

I was pleasantly surprised how little tweaking was needed to get to Sid, even Gnome 3.4 only needed a few extensions and CSS tweaks.

For the sake of speed I only encrypted my /home partition, chosing not to bother with a swap partition, and as /tmp is on tmpfs these days, the only permanent storage that’s not encrypted is the OS like /bin, /sbin /etc and so on.

The hotkeys and powersaving work out of the box with the 3.2 kernel, no need for eeepc_laptop or Jupiter anymore.

My /etc/apt/sources.list looks like this, which gives me Debian-unstable (Sid) and some packages like Firefox/Thunderbird from Debian-experimental:

deb http://ftp.uk.debian.org/debian/ sid main non-free contrib
deb http://ftp.uk.debian.org/debian/ experimental main non-free contrib
deb http://www.deb-multimedia.org sid main non-free

I noticed that the package difference between Wheezy and Sid was only about 200Mb worth of downloads, a lot less than between Squeeze and Wheezy.

I halved the size of the icons in the Gnome Shell Dash by editing /usr/share/gnome-shell/theme/gnome-shell.css like so:

.icon-grid {
    spacing: 18px;
    -shell-grid-horizontal-item-size: 96px;
    -shell-grid-vertical-item-size: 96px;
}

.icon-grid .overview-icon {
    icon-size: 48px;
}

To get the taskbar as I like it I installed the following extensions:

Alternative Status Menu (adds suspend/poweroff)
Quit Button (replaces username/IM status with an Ubuntu-esque power button)
Remove Accesibility (removes the alternative input method icon)

To make the fonts look a bit nicer I followed this post that tweaks fontconfig. Still not sure it looks great though on very small fonts, but it is a 10″ screen I guess….

The only problem I had was that NetworkManager was not configured to control my WiFi interface for some reason, possibly as I configured that as my primary interface during install – as eth0 was set to use NetworkManager which doesn’t make much sense. Anyway, to get NetworkManager to control it I just removed all references to wlan0 from /etc/network/interfaces

The extra packages I had to install (some odd ones like gedit were missing!) are:

aptitude install deb-multimedia-keyring gdebi icedove knockd rsync gstm ntpdate gnome-tweak-tool lm-sensors gkrellm gnote pidgin-plugin-pack pidgin-sipe gedit geany qgit backintime-gnome backintime-common nautilus-open-terminal nmap zenmap gftp-gtk flashplugin-nonfree gnome-mplayer mencoder ffmpeg ttf-mscorefonts-installer msttcorefonts libxml-dom-perl libspreadsheet-writeexcel-perl pyrenamer grdesktop ia32-libs openjdk-7-jdk icedtea-7-plugin enigmail file-roller

apt-get -t experimental iceweasel icedove iceowl-extension

I also manually installed Google Chrome, Talk plugin plus Opera and Nessus (4.4.1 not 5.0.1)

Disabled IPv6 using:

echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf

Finally I stopped a lot of useless servers starting at boot, for example:

update-rc.d -f avahi-daemon disable

I also updated the blog to WordPress 3.4.1

Update: I’ve upgraded my F14 desktop to Sid too, as I do compiling and stuff on that I had to install a few more packages:

aptitude install java-package fakeroot conky libxml2-utils pwgen john-data john texlive-fonts-recommended texlive-fonts-extra gcc g++ bcc iasl xsltproc uuid-dev zlib1g-dev libidl-dev libsdl1.2-dev libxcursor-dev libasound2-dev libstdc++5 libhal-dev libpulse-dev libxml2-dev libxslt1-dev python-dev libqt4-dev qt4-dev-tools libcap-dev libxmu-dev mesa-common-dev libglu1-mesa-dev linux-kernel-headers libcurl4-openssl-dev libpam0g-dev libxrandr-dev libxinerama-dev libqt4-opengl-dev makeself texlive-latex-base  libc6-dev-i386 lib32gcc1 gcc-multilib lib32stdc++6 g++-multilib ttf-mscorefonts-installer ttf-liberation ttf-linux-libertine libvncserver0 libvncserver-dev optipng

I also forgot to mention that due to a recent upgrade (OpenSSL?) pidgin-sipe is broken, the fix is to make a wrapper script:

#!/bin/sh

export NSS_SSL_CBC_RANDOM_IV=0
/usr/bin/pidgin

Then edit /usr/share/applications/pidgin.desktop to Exec=pidgin-wrapper

I also installed Sun Java 6 using these instructions, which I tweaked a little to use the /usr/lib/jvm/java-6-sun symlink which CyanogenMod expects.

Upgrades Galore

I fitted my new SSD to my fileserver yesterday as it was a rainy Sunday afternoon. Oddly enough the new 2.5″-to-3.5″ drive rails I got don’t fit in a floppy bay – well they do but the screw holes won’t line up, so I fitted it in my one remaining hard disk bay.

Anyway I was surprised how quickly I replaced the Ubuntu 9.10 setup with Debian 6.0.3 without losing any functionality. I decided to stick to Squeeze+Backports as Wheezy like on my desktop machine is way too much maintenance for a fileserver – I can’t cope with the “apt-get upgrade” fear! 😉

Speaking of backports, to replace OpenOffice.org with LibreOffice, you need to run this and answer “yes” to the dependency questions:

apt-get -t squeeze-backports install libreoffice libreoffice-gtk

Anyway the main thing I was worrying about – the printer/scanner was truly plug’n’play – I turned it on to do some scanning and CUPS automatically configured the printer part, and SANE just worked. None of the Epkowa (iscan+pips) Epson proprietary crap required.

I encrypted the boot drive using LUKS+LVM so I only need to enter the passphrase once, that seemed a lot easier than when I installed Wheezy and did multiple partitions.

I copied across the fstab and /etc/exports and all the various disks mounted and shared over NFS to the Mac seamlessly. I literally rebuilt the fileserver in two hours! Plus now it is all encrypted I can use it as a backup desktop machine for work.

Next up was the Mac Mini, currently running Leopard 10.5.8, I decided for £21 I might as well upgrade to Lion 10.7.2 as I already have 2Gb RAM and a Core2Duo, and apparently the new version of Plex doesn’t work on 10.5

Luckily I had a Snow Leopard 10.6.8 install in a virtual machine, so I bought Lion via the App Store (basically iTunes) using that. Wow the App Store is crap – I had to sign in about 6 times, I guess they’ve not heard of sessions at Apple.

I then used these instructions to create a bootable USB disk to do a fresh install of Lion – all within VirtualBox.

I’m actually dual booting Leopard and Lion using these instructions. Shrinking the disk so I could add a partition in the free space took the longest, installation was about 25mins. I’m glad I did it actually as although Lion runs fine (except it doesn’t like etherwake) the latest Plex 0.9.5.1 is rubbish, so I’m booting Leopard and Plex 0.9.3.4 at the moment.

PulseAudio on Debian 7

Well I finally got fed up of crackling audio and gnome-volume-control-applet crashing, so decided to install PulseAudio on my Wheezy system.

I mostly copied from these instructions, which was basically:

apt-get install pulseaudio libao4 paprefs libpulse-mainloop-glib0 \
pulseaudio-module-jack pavucontrol pulseaudio-module-x11 \
gstreamer0.10-pulseaudio pulseaudio-utils libasound2-plugins \
paman pulseaudio-module-gconf libgconfmm-2.6-1c2 libpulse-browse0 \
pavumeter libglademm-2.4-1c2a pulseaudio-esound-compat libpulse0 \
libpulse-dev pulseaudio pulseaudio-esound-compat \
pulseaudio-module-gconf  pulseaudio-module-x11  \
pulseaudio-utils lib32asound2 lib32asound2-plugins  ia32-libs-gtk 

usermod  -a -G pulse,pulse-access username

Then create a basic /etc/asound.conf

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}

That was about it. I rebooted back to 2.6.39 as I had my suspicions that its general bad behaviour before was due to it not liking ALSA, and I was right – it plays fine with PulseAudio. All of the startup daemons and applications were already setup and I removed the old mixer applet from the Gnome Panel.

Hey presto, Skype worked first time, VirtualBox is more portable with PulseAudio (I can use the same config on my Fedora box) and Flash doesn’t crackle anymore. I’ll see if UrbanTerror performance has improved in a minute.

I noticed microphone volume was lower than with Fedora, which generally liked input to be about 40%, on Wheezy 100% is pretty quiet (128% seems loud though).

My old command for muting the monitor’s speakers and running everything through my headset still works too:

amixer -c0 -q set Surround 0%

Update: UrbanTerror is miles faster with PulseAudio – back to how it was on Fedora, also helped by the Nvidia 275 graphics drivers I expect – which have an odd quirk of corrupting Firefox’s autoscroll icon.

Routing of sound is still a but unreliable – for some reason I have to fire up alsamixer and switch between 2chan and 6chan and back again before I get anything from my speakers, and Skype I seem to have to make a test sound/call before I want to make a call. I think PulseAudio must be timing out or not fully initialising or something.

Debian 7

Well I’ve almost completely rebuilt my PC trying to fix the crashing bug – PSU, motherboard, RAM, graphics card, cleaning the lot! Turns out its a Fedora bug of some sort as neither Debian Sneeze or Wheezy have the problem, so I’m sticking with Wheezy now.

I’ve ordered a couple of Yate Loon D12SL-12 fans as the one that came with my Corsair H50-1 is whining, I expect the bearings have gone. The radiator was caked in dust on the one side though! I’ve also ordered some screws so I can properly mount the two fans to the radiator, although these are slimline fans so should be thing enough anyway.

Annoyingly my new motherboard has replaced Firewire and eSATA with USB3, although I’ve bought a £2 SATA-to-eSATA bracket, the only machine I have with Firewire for the camcorder is my Mac Mini.

I’m glad to be rid of Gnome3, my productivity is much better with good old Gnome2 and Compiz Fusion. I’ve got everything working in Debian that I had in Fedora other than Seahorse-plugins which I’ve kind of replaced with an alias of:

gpg2 -se -u  -r  -r  

The 2.6.39 kernel seems to mess with my audio routing and maybe Compiz, so I’m sticking with 2.6.38 which seems rock solid. UrbanTerror is not as fast for some reason, maybe due to Alsa instead of PulseAudio – it does seem to have crackling audio artifacts and every now and then causes the volume applet to crash. Firefox 5 seems to be no difference to 4 though!

My new Conky screen with radiator/case fans and thermistor/cpu/southbridge temps:

Conky
Conky