2011-05-08

libvirtd Kerberos

Filed under: Geekiness — iain @ 10:24:35

I had some fun getting libvirtd to work with GSSAPI. It looked like it should be easy but documentation was thin on the ground and some key points were glossed over. Eventually I did figure it out. Here’s how.

(more…)

2010-11-18

Error messages

Filed under: Geekiness,Rants — iain @ 12:51:18

The command: snapdrive storage list -all

The error message displayed to the user: Status call to SDU daemon failed

The error hidden in the Snapdrive trace log: Fatal error: Assertion detected in production code: ../sbl/StorageOperation.cpp:182: Test ‘osAssistants.size() == 1′ failed

The actual problem: /etc/redhat-release contains the string CentOS not Red Hat.

2010-08-31

Policing vs rate-limiting

Filed under: Geekiness — iain @ 06:31:51

I read some Cisco documentation recommending the use of traffic policing in a service policy over rate-limiting on an interface. I already used a policy to set DSCP values which later controlled the rate-limiting so switching to policing would cut out the middle man and be easier to understand. That being said, my goal is not to enter my router into some kind of Cisco guideline conformance competition but to get it to to what I want efficiently. The fact that Cisco recommend doing things differently is not in itself reason to switch. For that I looked at the rather harsh effects of rate-limiting.

(more…)

2010-07-13

Rate limiting stats

Filed under: Geekiness — iain @ 13:03:48

My experiment with rate limiting downloads seems to be largely successful, modulo a few typos and omissions. I accidentally set the HTTP class as a match-all rule rather than a match-any rule, meaning it would always fail to match as traffic cannot be both HTTP and HTTPS traffic simultaneously. I also forgot to add SSH to a policy class. As a result both these protocols ended up being the default (slow) group. Everything else is working well so far.

(more…)

2010-07-11

Cisco 877 download rate limiting

Filed under: Geekiness — iain @ 16:37:16

I’m in the process of migrating to a different ISP. Whereas until now I have been on a flat rate for download usage, the new provider charges significantly more for downloads between 0900 and 1800 on weekdays.

As I have a Cisco 877 router I should be able to throttle downloads during peak times and save myself money compared to the plan I’ve been using.

(more…)

2010-05-12

Automount trickery, submounts, cross-platform stuff etc

Filed under: Geekiness — iain @ 21:48:23

Hands up if your home directory is full of crap. Mine is. It has junk going back to 1999. As a measure of just how much junk I have let me tell you that at time of writing my home directory is 20Gb in size. In addition to having eleven years’ worth of files that I never got round to deleting, a large chunk of that disk usage comes from my Mac in the form of the Library subdirectory which contains pretty much everything Macs need in a user account as well as my Firefox and Thunderbird profiles. Needless to say these are huge.

In fact my home directory is only as small as it is because I moved a wodge of files to a separate storage area. The Documents directory, in which my Mac wants to save … pretty much anything … is actually a symlink to /files/iain/Documents which is automounted from somewhere else. And since my documents are the kind of things which I like to have available all over the place, that same directory is also shared by Samba and my Windows roaming profile knows to go there when I try to open (My) Documents. Some other directories are similarly shared across operating systems, including Desktop, Pictures and Movies.

I’d been thinking for a while that it might be better to move these well-known file stores into their own separate ZFS filesystems on my fileserver. Things came to a head this very evening when I downloaded Steam for Mac only to have it refuse to install because Library/Application Support/Steam wasn’t on a case-insensitive filesystem. It occurred to me that if Library were its own filesystem as I’d been considering, I could make it case-insensitive and trim the size of my home directory by a considerable margin. Although I wouldn’t advocate actually doing it in so crude a way, I believe that a home directory should be small enough that if you were given a UNIX account on a new system you should be able to get yourself up to speed by quickly transferring your entire home area from another environment. A home directory should be for dotfiles, SSH keys and the like. Everything else (real documents) should go Somewhere Else.

Since I use the automounter for everything I figured this would be pretty simple. As it turns out it actually is. The syntax works with Mac, Solaris and Linux as is documented to a greater or lesser extent in each system’s AutoFS manpages. The only potential stumbling block was getting it to work with LDAP but ended up being just as simple as you might hope.

The syntax to have the automounter mount a subdirectory of a configured mount is as follows, in auto.home for instance:

    * / files:/export/home/& /Library files:/export/library/&

So for all x /home/x will be mounted from fileserver:/export/home/x and /home/x/Library will be mounted from fileserver:/export/library/x.

On Linux I found I didn’t need the initial / by itself but both Mac and Solaris didn’t work without it. Another gotcha was that the Library directory had to actually exist in the original directory for it to be mounted from the specified location. In other words it wasn’t sufficient to export /export/home/iain and /export/library/iain from my file server. I also needed to create /export/home/iain/Library for it to be mounted.

In LDAP speak my auto.home became:

    dn: cn=/,ou=auto.home,ou=mounts,dc=iain,dc=cx
    objectClass: automount
    cn: /
    automountInformation: -fstype=nfs,tcp,rw,intr / files:/export/home/&
     /Library files:/export/library/&

To automount more subdirectories it suffices to add more bits to the automount entry.

    dn: cn=/,ou=auto.home,ou=mounts,dc=iain,dc=cx
    objectClass: automount
    cn: /
    automountInformation: -fstype=nfs,tcp,rw,intr / files:/export/home/&
     /Library files:/export/library/& /Documents files:/export/documents/&

And by redirecting my Windows shell folders to point to these filesystems in their CIFS form I can share them between operating systems.

2010-04-21

NSSM 2.3

Filed under: Geekiness — iain @ 23:15:42

I’m running final tests on, and will soon release, NSSM 2.3. NSSM – the Non-Sucking Service Manager – was originally written as a replacement for the venerable srvany, a tool which allows you to install any application as a Windows NT service.

(more…)

2010-04-19

xorg-x11-drv-wacom deferred pain

Filed under: Geekiness — iain @ 18:44:36

Some weeks ago Fedora 12 obsoleted linuxwacom and replaced it with xorg-x11-drv-wacom which apparently is a brand new XInput-based driver for Wacom tablets.

Immediately this caused me great pain and suffering as TPCButton mode, ie the thing where you hold a side button and tap the pen to do a click, stopped working and my side buttons were swapped round.

Rather than take the time to figure out what had happened I simply removed the xorg-x11-drv-wacom RPM and force installed the old linuxwacom to restore the status quo.

Last week, however, I forgot to exclude xorg-x11-drv-wacom from the list of packages NOT to be updated by YUM and lo and behold the RPM was installed again. This time I decided to get it working properly by reading the documentation about the transition.

Ha! Only kidding. There isn’t any documentation. So by trial and error – which is usually how these thing work – I managed to figure out what was going on.

With the old driver you added InputDevice sections to xorg.conf to declare the tablet devices and map them to /dev/input entries in the filesystem. You could then add options to these sections or use xsetwacom to set them on the fly.

Turns out you can still use xsetwacom. It’s just that the device names in your xorg.conf aren’t used any longer. I used xinput --list to enumerate the XInput devices on my display and found that four Wacom devices were present of which the most important was Wacom Intuos3 6×11. Since xsetwacom still works I was able to get my button swapping back by doing

    xsetwacom --set 'Wacom Intuos3 6x11' Button2 3
    xsetwacom --set 'Wacom Intuos3 6x11' Button3 2

The "correct" way to do so, however, is to run xinput --get-button-map 'Wacom Intuos3 6x11' and note that the buttons are interpreted as 1 2 3 4 5 6 7 and, since I wanted to swap 2 and 3, do

    xinput --set-button-map 'Wacom Intuos3 6x11' 1 3 2

TPCButton mode was previously set by doing xsetwacom --set <device> TPCButton on and at first I thought this was broken as I ran xsetwacom --set 'Wacom Intuos3 6x11' TPCButton on and nothing happened. A bit more digging (with xinput --list-props 'Wacom Intuos3 6x11') revealed why: the property has been renamed Wacom Hover Click and defaults to on. In other words when hover click is on you don’t need to tap in order to do a click with the side buttons. So to get the mode I wanted I could do either of the following:

    xsetwacom --set 'Wacom Intuos3 6x11' TPCButton off
    xinput --set-prop 'Wacom Intuos3 6x11' 'Wacom Hover Click' 0

Running xinput --list-props 'Wacom Intuos3 6x11' reveals the other editable properties, some of which have also been renamed.

If you’re following along from home remember that your device won’t be called Wacom Intuos3 6×11 unless it is, in fact, a Wacom Intuos3 6×11 (and maybe not even then).

Happy tabletting.

2009-03-21

Logitech G13 Gamepad

Filed under: Geekiness — iain @ 19:06:04

Logitech’s G13 is their much-hyped answer to the Nostromo SpeedPad and competitors. It was released in December to great fanfare so although I have been very happy with my SpeedPad n52 for many years now I was intrigued enough by the G13′s feature list that I decided I was prepared to pay the not-inconsiderable asking price to check it out.

The G13 is certainly not cheap. With an RRP of £79.99 it is unlikely to appeal much to people who don’t already own a similar device. In order to justify the expense it needed to be a significant improvement over the n52 and really deliver on its promised features.

Instead I found it to be a spectacular disappointment.

(more…)

2008-12-26

iPhone backup and upgrade

Filed under: Geekiness — iain @ 17:10:33

The iPhone 2.2 firmware has been available for a while now but I’d thus far resisted the urge to upgrade because I’d heavily customised my jailbroken phone with my own sound effects, ringtones and Winterboard settings.

Official Apple stuff is backed up and restored after an upgrade but I knew I’d lose the personalised changes.

I decided to use Subversion to archive my tweaks and restore them after the upgrade. The exact steps I used aren’t precisely the same as I’ll describe here. I’ll change the description to be easier to follow along for people with no experience using Subversion before.

(more…)

Next Page »

Powered by WordPress