Asus A7V600-X (VIA VT8237) with SATA II Hard Drive

October 23rd, 2008

This is one of those “I spent far too long Googling and didn’t find anything useful, so I’ll post myself in the hope that it helps someone else” posts…

I’ve got an Asus A7V600-X motherboard in this here machine, and recently one of my SATA hard drives began misbehaving (it lost its partition info, although the data were all intact). Time for a new hard drive.

I bought a 250GB Western Digital drive, plugged it in, booted to a Linux live CD in order to copy the data from the old drive and… nothing. No sign of the new drive at all. I rebooted and found it wasn’t even appearing at the BIOS level.

My initial thoughts were that the drive was dead, but booting with the same Live CD and plugging the drive into an external SATA=>USB adaptor showed that the drive was available and could be formatted and used with no problems.

I started looking at BIOS updates, but none of the fixes in newer BIOS versions claimed to address any SATA or hard drive issues. I built this machine with no floppy drive, so updating the BIOS would be a pain to do - so I spent a bit more time searching in the hope that my problem didn’t lie with the BIOS at all.

I’m glad I did. It seems that the problem is actually that the Southbridge chip on the motherboard (VIA VT8237) can’t handle SATA II drive speeds (300 Mb/s) - and that they don’t auto-negotiate down to SATA I speeds (150 Mb/s) :( The answer to the problem was therefore to add a jumper to the drive to force it down to the slower speed. Actually finding a spare drive jumper in the house was another matter entirely - but when I finally did, the drive appeared in the BIOS and everything went according to plan. In fact I’m writing this post from within the Linux Live CD environment as my data is being copied in the background :)

This problem probably affects other motherboards with the VIA VT8237 chipset. There’s more information (including jumper settings for common hard drives) in the FAQs on the Asus support site, but unfortunately it’s not possible to link directly to the specific FAQ, so you’ll need to search for it yourself.

What colour is your PIN?

September 8th, 2008

I was getting some cash out of the hole-in-the-wall a while back and was presented with the usual warning about keeping my PIN safe by guarding it with one hand while blocking the view with my body and making aggressive noises at anyone that happened to pass by. Why are we still using a security system that is so easy to circumvent? Why do I need to be wary of anyone looking over my shoulder, or of the cashier whenever I use my Chip And Pin card?

I began to wonder if it might be possible for someone to see me enter my PIN, but still not actually know what it is. What if my secret code wasn’t solely tied to the numbers on the keys, but to some other variable as well? What if there was a means of entering my code, which wouldn’t require me to type in the same number twice - and would actually be likely to fail if I did?

The idea I came up with involves adding an additional parameter to each key on the keypad. For simplicity I’ve used colour. The idea is that the colours of the keys are randomised each time you have to enter a PIN - perhaps even each time you press a key - and that your “PIN” will actually consist of a combination of numbers and colours. Consider the keypad below:

1 2 3
4 5 6
7 8 9
* 0 #

On this keypad you can see the usual numbers and characters that you might expect to find, but each has a coloured background. Let’s pick a simple four-character PIN - 1234 - and see what that could actually be interpreted as:

  • 1,2,3,4
  • 1,2,3,Green
  • 1,2,Blue,4
  • 1,2,Blue,Green
  • 1,Green,3,4
  • Yellow,Green,Blue,Green

In fact there are sixteen possibilities - which means that if someone looks over your shoulder and sees you type “1234″ they would still need to know which of the sixteen combinations was the valid one, because the next time someone uses the keypad the colour coding will have changed to something else.

To set your code in the first place you simply have to enter it twice: the terminal would switch the colours between each entry so that every number is given a different colour to the one it had previously. The machine then checks each digit of your “PIN” - if the number is the same in both entries then the digit is stored as a number, if the colours are the same then the digit is stored as a colour, if neither match then there is a mismatch between the two codes.

I’ve hacked up a little script to let you try this for yourself (follow the link below). Pick a code consisting of numbers and/or colours, then punch it into the two keypads. Click on the “Reveal Code” button and you can see that the computer is able to determine your code just by entering it twice. If you reload the page you will also notice that the arrangement of colours is randomised each time, so the same “code” will probably require different numbers to be pressed.

Click here for a demonstration of setting a PIN+Colour code
(note: This works on Firefox, but I make no guarantees about any other browser)

So how would this idea manifest itself in the real world? Cashpoints are relatively easy as most of them have a colour screen these days - their code simply needs to be updated to display a coloured version of the keypad on-screen for reference. Chip And Pin terminals would be harder, but using illuminated pushbuttons, or buttons with integrated LEDs could do the job.

For people with colour-vision deficiencies this is no worse than the current system as they can always pick a number-only PIN. That said, through careful choice of colours (after all, only three are used in the demonstrations) it should be possible to cater even for the majority of people with such issues.

There’s no reason why this idea should be limited to numeric keypads and PINs. With an on-screen keyboard (or an Optimus Maximus) showing the key colours, this could be expanded to work with your computer’s login screen as well. The secondary part of the code doesn’t have to be colour, either - it could be a shape, an image, a movement or something else. So long as the locations of the secondary part(s) are randomised between login attempts, or between keypresses, it becomes harder for an attacker to simply re-use the “password” they saw you type in earlier.

Why is there no AND for regular expressions?

July 31st, 2008

Here’s a Javascript regular expression which will match a string which contains at least one lower case letter:

/[a-z]/

And another which will match a string with at least one upper case character:

/[A-Z]/

I can even stick these together in at least two ways to create the equivalent of a logical OR - in other words a string will match if it contains at least one lower case letter OR at least one upper case letter:

/[a-zA-Z]/
/([a-z]|[A-Z])/

What seems to be missing is a simple way of concatenating two regular expressions (and, by extension, more than two) such that the target string has to match every sub-expression for the result to be a match. Other than calling regex.test() once for each sub-expression, I can’t see any simple way to AND several regular expressions together like this.

It’s a shame really, because I’d love to be able to do something like this, to make sure that the user has selected a password of between 8 and 16 characters, which must contain at least one numeral, and which may optionally contain some punctuation characters (using the & character to AND together the terms):

var bIsComplexPass = /(.{8,16})&([0-9])&([!"£$%^@~#]*)/.test(”p@ssw0rd”);

colorToRGBA()

July 30th, 2008

I’ve recently been working on a XUL application, and needed to fade gracefully from one colour to another. One of the stumbling blocks was trying to work out what my start and end colours actually are - or more to the point, provide some flexibility in specifying them. Ideally I wanted to allow all the colour definitions that are allowed in CSS (at least those that are allowed in Firefox 3 - the target environment for this application). That means allowing the following definitions for the colour white, for example:

white
#ffffff
#fff
rgb(255, 255, 255)
rgba(255, 255, 255, 1.0)
rgb(100%, 100%, 100%)
rgba(100%, 100%, 100%, 1.0)
hsl(0, 0%, 100%)
hsla(0, 0%, 100%, 1.0)

… plus a few variations to allow for different whitespace and so on.

I found numerous bits of code to convert between hex and decimal triplets, and one bit of code that tries to be more comprehensive. Even that code fails with hsl() and hsla() values, not to mention the fact that it’s a large chunk of code with a huge lookup table to handle the various colour names that could be used.

I decided to approach the problem in a different way - I’d let the browser do the hard work. It already knows how to deal with CSS colour names, and all the various other quirks of CSS colours, so why not use that to my advantage. Why not try to parse a few common colour definitions, but get the browser to parse the rest?

The result of this insight is linked below. It implicitly understands the “transparent” keyword (which it treats as white with an opacity of 0), as well as decimal rgb() and rgba() values. If you pass anything else to it, it creates a temporary document, inserts an HTML DIV, sets the DIV’s style.color attribute to the value you passed, then tries to read it back again using window.getComputedStyle(). The colorToRGBA() function is then called again using this computed colour as its parameter - and because (in Firefox) that value is a decimal rgb() or rgba() value, the function returns the four channels back to the caller. Neat, eh?

Note that it’s been coded specifically for Firefox 3 and hasn’t been tested on anything else. It makes assumptions about the way in which colours are returned from window.getComputedStyle() which would prevent it working as-is on any browser which doesn’t return the values as a decimal rgb() or rgba() string. It’s also limited to whatever CSS the browser itself understands. Finally it returns multiple values at once - a Javascript 1.7 addition called a “Destructuring Assignment” - though it could easily be modified to return a single array instead.

All of which is a long-winded way to say that this is an example of an idea for you to build on and run with, and definitely isn’t going to work across browsers without some extra work.

If all that still hasn’t put you off, you can find the code here: colorToRGBA.js

And some examples as to its use:


var R, G, B, A;
[R, G, B, A] = colorToRGBA(”khaki”);
// Returns [240, 230, 140, 1]

var R, G, B, A;
[R, G, B, A] = colorToRGBA(”#ddfecd”);
// Returns [221, 254, 205, 1]

var R, G, B, A;
[R, G, B, A] = colorToRGBA(”#fcf”);
// Returns [255, 204, 255, 1]

var R, G, B, A;
[R, G, B, A] = colorToRGBA(”TRANSpareNT”);
// Returns [255, 255, 255, 0]

var R, G, B, A;
[R, G, B, A] = colorToRGBA(”hsla(120,50%,50%,0.5)”);
// Returns [63, 191, 63, 0.5]

Transparently stupid

July 25th, 2008

For a long time now it’s been possible to specify CSS colours as RGB triplets, using hexadecimal, decimal, or percentage notation. These all represent the colour white:

#ffffff
#fff
rgb(255, 255, 255)
rgb(100%, 100%, 100%)

Lots of flexibility - perhaps too much - and three different numbering systems to deal with. So when the W3C CSS working group decided to add an alpha channel option to RGB colours, clearly it would have made sense to allow the following (for a semi-opaque RGB colour):

#ffffff99
#fff9
rgba(255, 255, 255, 127)
rgba(100%, 100%, 100%, 50%)

But it seems that sense was in short supply at the time. Instead they opted to allow these:

rgba(255, 255, 255, 0.5)
rgba(100%, 100%, 100%, 0.5)

Note that there is no hexadecimal representation at all - an omission which, though a little arbitrary, shouldn’t cause too many problems. Perhaps more strange is that the two representations that are allowed can only use a floating point representation for the opacity - a number from 0.0 to 1.0.

I’m guessing that this was done for compatibility with the older CSS opacity definition - but if you’re adding new colour mappings to the spec anyway, why not expand it to allow for other representations? Surely if your R, G and B are represented as decimal numbers in the range 0-255, it’s only sensible to also allow your opacity to sit in the same range. Similarly with the percentage representation.

This may seem a little esoteric, but it can have real effects. For example I’m currently writing some code which interpolates from one colour to another, gradually changing between them so that some button, text or other object on screen can be made to gently (or not so gently) pulse with colour. The start and end colours get mapped to decimal rgba values, and interpolating any of the first three colour channels is quite easy. However for the alpha channel I’ve had to implement a separate code path to interpolate between two floating point numbers, rather than just being able to use the simpler code that I’d already written.

Perhaps there was a good reason for not allowing hexadecimal, decimal or percentage values for the alpha channel - but if so, I haven’t worked out what it is yet.

Rootless Linux on a Windows machine

March 4th, 2008

I have to work on a Windows machine at work every day. It’s okay, I suppose, but it’s Windows with all that implies. I’m more of a Linux person - I find that I am far more productive in a Linux environment simply due to a user interface that works the way I want to. Because of this I also spend much of my working day using Linux - even going so far as to sometimes shuffle files over the network to the Linux box so that I can work on them in that environment rather than in Windows. Whilst I may occasionally shuffle files around, though, I don’t really want to spend all day shuffling myself back and forth between two machines. So I just connect to the Linux box remotely, and work with all my normal Linux tools from my Windows machine.

There are several ways to remotely connect to a Linux box and I don’t profess that this approach is any better or worse than any other - it’s just the one that I happen to use, and that works well for me. Please note, however, that the method I use (XDMCP) uses an insecure protocol - whilst it’s fine to use it within an internal network with a good firewall between you and the internet at large, it’s not at all safe to use when your machines are directly connected to the internet, or where your network may not be secure (e.g. a typical wifi connection, or you just don’t trust your co-workers). Don’t say I didn’t warn you.

Step 1: Get yourself a Linux box
It goes without saying that you’ll need a Linux machine to connect to - but I’ll say it anyway. It doesn’t have to be a real Linux box - a virtual machine running in VMWare Player or Virtual Box will do (other virtualisation products are available). In any case you need to ensure that you’ve got a network connection between the Windows machine and the Linux box (the venerable “ping” command should suffice).

If you are setting up a Linux box from scratch - whether real or virtualised - then I recommend Ubuntu, at least in part because that’s what the rest of this post is based on.

Step 2: Enable Remote Login
• On the Ubuntu box log in with an administrator account and go to System=>Administration=>Login Window
• Go to the “Remote” tab and from the “Style” popup select something other than “Remote Login Disabled”. I use “Plain” to cut down on the amount of data going over the network and because it works better with the rootless option I’ll be using later. I also turn off the Logo option, again to keep things simple and plain
• Close the dialogue

Remote Login Window Preferences

(click on the image for a larger version)

• While you’re logged into the Linux box you need to find out its IP address. There are several ways to do this, but in Ubuntu you can get this from the System=>Administration=>Network Tools application. You’ll need to select your Network Device from the popup menu near the top of the “Devices” tab - for a physical machine it’s probably eth0 or eth1, but for a virtual machine you might need a bit of trial and error. Once you’ve got an IP you should be able to ping it from the Windows machine to confirm that it’s the right value

Finding the IP address in the Network Tools application

Finally you’ll need to restart GDM for the changes in the “Login Window” dialogue to take effect. Rebooting the Linux box will do the trick.

Step 3
• Download a copy of Xming onto the Windows machine and install it
• Dig down in your Windows Start menu until you find the “Xming” option. Don’t launch it - you want to right click and select “Create Shortcut”. This will add an extra item to the menu, probably called “Xming (2)”
• Right-click on the new menu item and select “Properties”
• In the properties dialogue select the “General” tab and give the shortcut a more descriptive name. Then go to the “Shortcut” tab and edit the “Target” field to look something like this (all on one line, including the quotes - I’d copy and paste it if I were you):

"C:\Program Files\Xming\Xming.exe" :0 -clipboard -lesspointer -notrayicon -rootless -once -query 192.168.213.131

- The path should point to the real location of Xming.exe.
- Edit the IP after “-query” to be the IP of the Linux box you’re connecting to

• Apply the changes and close the Properties dialogue

Step 4: Your first remote connection

You should now be able to select the shortcut to launch Xming and connect to your Linux box. With luck you’ll be presented with a login screen, and should be able to log in.

Remote login screen

If you don’t get a login screen then there’s clearly a problem. In my experience it’s likely to be one of two things:

1) The changes to enable remote login on the Linux box haven’t been applied properly. Check the settings in the dialogue, then reboot the machine to make sure that GDM gets restarted.

2) A firewall is blocking the connection. Temporarily disable any firewalls to see if that fixes the issue. If it does then you’ll need to open ports in your firewall to let the XDMCP connection through - but that’s outside the scope of this article (hint: at the least you’ll probably need to let UDP port 177 and TCP port 6000 through, search for “XDMCP firewall” or something similar for more details)

If you are having problems, make sure you quit any existing copy of Xming that may be running before trying again (right click on the taskbar entry and select “Close”). If you’re still having problems, bring up the task manager to ensure that there are no rogue XMing processes running which aren’t present on the task bar.

Step 5: Going rootless

If you’ve got this far then well done. You should now be able to log into your Linux box and use it as if you were sitting in front of it - with the exception of any fancy 3D or composited stuff (wobbly windows, spinning cubes, 3D games and so on) which unfortunately don’t work over a remote connection like this.

A full Ubuntu desktop via a Windows machine

As you can see in the image above we’ve now got a full Linux desktop running, with the Windows taskbar at the bottom. Just above the Windows taskbar is the Ubuntu taskbar, showing the three Linux windows that are open. Conversely the Windows taskbar has just a single entry for Xming - all of the Linux windows live within a single “layer”. If you minimize Xming then all of the Linux windows go with it. Conversely if you bring Xming to the top of the window stack, all of the Linux windows come to the top as well.

For many people who just need a way to remotely access a Linux box, this will be good enough. But there are a some extra steps that you can take to make it a bit easier to switch between Linux and Windows.

• In Ubuntu press ALT-F2, type “gconf-editor” into the dialogue then press the RETURN key

The Run Application dialogue

• This should have launched Gnome’s registry-alike system
- Drill down to Apps=>Nautilus=>Preferences in the panel on the left
- Uncheck “show_desktop” in the panel on the right
- Close the window

Hiding the desktop in gconf-editor

• You should now find that your Linux desktop background has vanished. This is the result of using the “-rootless” parameter when launching Xming, and telling Nautilus not to draw the desktop via the gconf-editor setting in Linux. If you want the desktop back again, just re-check the option in gconf-editor.

A rootless Linux desktop via a Windows machine

In the screenshot above you can see the effect of disabling the Linux desktop - the Xming layer becomes transparent and your other Windows applications show through beneath your Linux windows. This means that you can easily bring a Windows application to the top of the window stack just by clicking on it. It also makes it easier to arrange your windows so that you can refer to the content of a Windows window whilst working in a Linux application.

The downside to this rootless approach is that you can no longer access any icons or mounted drives that appear on the Linux desktop. It’s not too bad, however, as the desktop folder is available from the “Places” menu, as are any mounted drives. For icons in particular you can always drag them to one of the Gnome panels if you want to have quick access to them.

On the subject of the Gnome panels it’s worth noting that they are highly customisable. With the default Ubuntu settings you’ll get two Gnome panels in addition to your Windows taskbar, but if this is too distracting you can remove one of the Gnome panels (or add others), move them around, or add various launchers and applications to them. A common option is to tweak it to a point where you have one Windows bar at the bottom of the screen, and one Linux bar at the top, making it easy to switch mental contexts between the two enviroments.

Step 6: Sharing a clipboard

Using the “-clipboard” parameter in XMing should allow the X-server’s clipboard (i.e. the Linux clipboard) to integrate with the Windows clipboard. Unfortunately this doesn’t work when you’re using GDM on the Linux end - i.e. the standard case for Gnome-based distros such as Ubuntu.

To fix this, edit the /etc/gdm/gdm.conf-custom file to include the following line just below the “[daemon]” line:

KillInitClients=false

(you’ll need to edit this file as an administrator - press ALT-F2 then type “gksudo gedit /etc/gdm/gdm.conf-custom” into the box, without the quotes)

You’ll need to restart GDM for the change to take effect (e.g. reboot the machine), but thereafter you should have an integrated clipboard between the two environments. It only works for copying and pasting text, but it’s still pretty handy.

In case you’re not aware, Linux systems have two clipboards. There’s a Windows-style clipboard that you can use via menu entries or the usual CTRL-C/V/X keyboard shortcuts. But there’s also a “quick clipboard” - if you highlight some text, then middle-click somewhere else, the highlighted text gets inserted. This can be very useful when you get used to it, but does pose some problems for clipboard integration between Windows and Linux, so here are the basic rules:

• If you highlight some text in Linux you can then switch to the Windows environment and paste it using the menu option or CTRL-V
• If you copy/cut some text to the clipboard in Linux, using the menu option or CTRL-C/X, you can then switch to the Windows environment and paste it using the menu option or CTRL-V
• If you copy/cut some text to the clipboard in Windows, using the menu option or CTRL-C/X, you can switch to the Linux environment and paste it by middle-clicking with the mouse
• If you copy/cut some text to the clipboard in Windows, using the menu option or CTRL-C/X, you can switch to the Linux environment and paste it using the menu option or CTRL-V
• When pasting into Linux make sure that you don’t highlight any text first - if you do, that text will become the new clipboard contents, as per the first bullet point. In other words, you can’t highlight the text that you want to replace then paste the clipboard contents in because the clipboard contents will have been changed by the action of highlighting. If you want to replace some text, delete it first then do the copy and paste.

Extra bonus tips

In the instructions above, where you edit the properties for the shortcut, there’s a “:0″ string. You can run more than one X server (i.e. more than one copy of Xming) on a single machine, by giving each one a separate screen number - “:1″, “:2″… (you’ll need to open ports 6001, 6002… on your firewall if you do this)

This lets you have more than one Linux desktop co-existing on your Windows desktop, which can be useful if you need to access multiple Linux machines for some reason. If you do this, then I recommend moving the taskbars to different locations and using different window themes for clarity - that makes it easier to keep track of which windows belong to which server.


You might want to consider putting SAMBA on the Linux box to allow your Windows machine to access files from it. Alternatively you could access a share on the Windows machine via the Ubuntu “Places” options (”Network” or “Connect to Server”), or by mounting the share with the SAMBA client tools. With the Gnome UI I’ve had most luck using the “Network” browser, then dragging my shared folder to the list of shortcuts on the left. Unfortunately not all applications like working with files that are accessed this way, but it is quick and convenient if you just want to be able to copy files between the two environments. Mounting a Windows share using the SAMBA client tools is a more widely supported means of accessing your Windows files from Linux, but requires more technical expertise to set up (see this page, for example).


Ubuntu has the ability to connect to an XDMCP server built-in. If you’ve enabled remote login on your Linux server as described above, then on another Ubuntu machine on your network press F10 at the login screen and select the XDMCP option. It will automatically scan for any XDMCP servers on your network and let you choose which one to use to log in.

You can even do this from the Live CD. Boot into it, then when the desktop comes up, log out (not shutdown) to get to the login screen, then press F10 as above. This can be very useful if you need to temporarily give people access to a Linux desktop but don’t want to install Xming on their Windows machines.


When you come to shut down the server you’ll find that there’s no option to do so via the XDMCP connection. You’ll need to shut down on the Linux server (or in the virtual environment) itself - use the “Options” (F10) menu on the Ubuntu login screen. Alternatively you can remotely log into the server’s command line using “ssh” and shutdown that way, if you know what you’re doing.

Removing bookmark favicons from your toolbar

February 11th, 2008

Yesterday I stumbled across this post about showing favicons for bookmarks which appear on the bookmarks toolbar of a Mac version of Firefox. This reminded me of a long-standing bugbear I’ve had with the bookmarks toolbar: sometimes I want to create a bookmark without a favicon.

This may seem like a strange thing to want - after all, the presence of a favicon makes it easier to identify specific bookmarks by sight so is, in general, an improvement to the user interface. However there are a couple of possible reasons for wanting the favicons gone:

  1. Sometimes they don’t actually help you to recognise the bookmark
  2. They take up space in the toolbar that could be better used by an additional bookmark

The first problem is usually a result of bookmarking a site that doesn’t provide its own favicon. Firefox simply uses a generic favicon for these bookmarks, which does nothing to help you uniquely identify the bookmark in amongst a sea of similarly generic icons. You also get the generic icon if your bookmark isn’t to a site, but rather to a bookmarklet.

The second problem is simply one of space. The space on the bookmarks toolbar is limited, and using it to display favicons that aren’t useful is just wasteful.

My particular issue is a combination of both of these problems: I have a few bookmarklets on my toolbar which I’ve taken from the Pornzilla website. The site itself contains no pornography, just a collection of bookmarklets and links to extensions which make it easier to surf the web for porn - however what works well for porn also works well for images and links in general, so I find that some of the bookmarklets there are handy for day-to-day browsing as well. In particular I have the following five bookmarklets on the left of my bookmarks toolbar:

Bookmarklet Label on the toolbar
Zoom images out -
Zoom images in +
Decrement URL <
Increment URL >
Make a Numbered List of links NL

Look at the labels I use. Short and to the point. So short, in fact, that the addition of a favicon causes the bookmark buttons to be twice the size they need to be. Here’s what the left-hand end of my toolbar looks like by default:

Default bookmarklet styling, complete with favicons

For those of you that don’t know, the user interface of Firefox - including the bookmarks toolbar - is specified using a language that is similar to HTML, the language used to write web pages. It’s also possible to style it using CSS, the same language that is used to add styling to HTML. So if you know how to write CSS (which I do), it’s possible to override the default Firefox user interface quite easily. In fact they even provide an official way for you to do this: the userChrome.css file.

I won’t go into a lot of detail about the userChrome.css file, but suffice to say that any CSS in that file can be used to override the default Firefox styling. The file doesn’t exist by default, but there’s an example file provided with Firefox which lives in the correct place on your hard drive: details of finding that file can be found here.

Once you’ve found the right place on your hard drive, and created a userChrome.css file, simply put the following CSS in there to get rid of those pesky favicons:


@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

.bookmark-item[label="+"] > .toolbarbutton-icon,
.bookmark-item[label="-"] > .toolbarbutton-icon,
.bookmark-item[label="< "] > .toolbarbutton-icon,
.bookmark-item[label=">"] > .toolbarbutton-icon,
.bookmark-item[label="NL"] > .toolbarbutton-icon
{
display: none !important;
border: 1px solid red !important;
}

The main thing to note is that the label that you provide for a bookmark in Firefox is actually applied to the “label” attribute of the bookmark - which is a fancy HTML way of saying that you can make your CSS match particular bookmarks by using code like that above, where the “label” parts of the first few lines are populated with the actual labels you’re using in your bookmarks.

The result of this jiggery pokery, after restarting Firefox, is a bookmarks toolbar that looks something like this:

Modified bookmarklet styling, without favicons

Much better :)

That took longer than planned

November 14th, 2007

I haven’t posted anything in this blog for a few weeks now for one reason: I decided to move the domain to a new ISP.

Now you might think that this should be a simple task - taking a few days at most. And you would be right, it should be a simple task. Unfortunately in this case it wasn’t.

So here I am, 18 emails and 6 weeks later, finally able to report that the domain has moved and that usual service can now be resumed. Of course, “usual service” still doesn’t mean that I’ll be writing very regularly - but at least now it will be due to laziness rather than technical issues.

Hmm… that backup seems to be running slowly

September 13th, 2007

Many years ago one of my colleagues purchased a Dell server complete with an expensive SCSI-based tape backup system. About a year ago we began to have recurring problems with the tapes, and the drive itself started to get very fussy about which tapes it would actually use. Due to the age of the drive it also only supported relatively small capacity tapes, compared with current hard drive sizes. There was much discussion about whether or not to replace the drive with a newer model, but one thing quickly became clear: a new drive, plus a new collection of tapes, was going to be very expensive.

So I suggested that we simply buy a number of external hard drives instead. They all connected via USB, so could be hot-swapped as needed - and because all of the drives were identical we only needed to have one power supply and one USB cable available. Everything worked well, the capacity of each drive was far in excess of the old tapes, and the backups completed more quickly than before.

A few days ago one of the SCSI hard drives in the server died - not one of our USB backup drives, but one of the drives in the machine itself. The server was pulled out from our collection of servers (not an easy task - it’s a heavy box in an awkward location), and attempts were made to recover what data we could from the drive. In practice there wasn’t much on there worth saving, so we decided to ignore it.

Then the problems began. We plugged in a USB drive for our nightly backup, but by the morning the backup was still going. We restarted the backup process and tried again… the backup was running very, very, very slowly. Wild theories and speculation began: perhaps the network connection in the server’s current location was problematic, causing the data throughput to be throttled. We moved the big, heavy server back to its awkward location alongside the other servers and tried again. Still the backup was slow.

Perhaps the dead SCSI drive was somehow to blame. Could it be putting erronous data on the bus, causing the processor to be so burdened with error messages that everything was being slowed down? We removed the big, heavy server from its awkward location and removed the errant drive. We even cleaned out the dust bunnies (though they were so large that perhaps “dirt pookas” would be a better description). Still the backup ran slowly.

We were about to boot from a Knoppix CD to rule out Windows configuration issues when someone spotted the problem. As I mentioned at the start, this machine was purchased many years ago. So many years, in fact, that the USB ports were all USB1, which has a maximum data rate of about 12 Mbit/s (1.5 MB/s) - i.e. very, very, very slow.

When we first switched to using the USB drives for backups we were aware of this limitation, so bought a USB2 card for the server. USB2 allows for a theoretical data rate of 480 Mbit/s - i.e. about 40 times as fast as USB1. The underlying cause of our problem was quite simply that someone had plugged the backup drive into the wrong socket.

Ignoring the embarrassment of three otherwise technically-competent men taking several hours (and two unnecessary moves of a heavy server) to spot the problem, I’d like to focus on how this problem occurred in the first place. You see, in their wisdom, the designers of USB2 decided that it should use identical sockets to USB1. I wouldn’t mind this if the two systems were similar - perhaps with USB2 being twice as fast as USB1 - but we’re talking about radically different things here. Yes, they might share some technical details, but to all intents and purposes USB1 is for slow devices - mice and keyboards - whereas USB2 is for much faster devices - hard drives. Up to 40 times faster.

When two sockets offer such radically different levels of performance then I, for one, would rather see a break from the old standard with the introduction of a new socket. They could be made electrically compatible, so that a small and cheap adaptor would suffice for those people who really do want to plug their USB1 mouse into a USB2 port, but a slight mechanical difference would have saved us many man-hours of work.

Better still, they should have abandoned the idea of USB2 before it ever really got off the ground. USB for mice and keyboards, Firewire for hard drives and other fast connections. Two different standards for two radically different requirements. But I guess that would have made too much sense.

WordPress Update

August 31st, 2007

I’ve finally got around to upgrading the copy of WordPress that powers this blog from the rather ancient version 1.5x that I had been using, to the latest stable release. The main improvement, from my perspective, is that it now comes with a plugin to automatically filter out the hundreds of spam comments that I was having to deal with each week.

With less time spent on spam fighting, maybe I’ll find the time to actually post here more frequently. Then again, knowing how much of a procrastinator I am… maybe not ;)