Latest Publications

Quick Tagging and Renaming

Last week I recovered a friend’s mp3 library from a 2nd generation iPod. All was well except for that fact that any music put onto the iPod is given a random file name such as C00XY.mp3. Not helpful.

After scratching my head and thinking that we would have to rename most of the files manually, I started to look for re-tagging programs. A few were recommended on the internet but I found them to be too unwieldy or didn’t quite work right.

Thankfully, I discovered a lightweight tagging application called Ex Falso. A fairly simple to use tool which easily re-tags your music, or renames the files with much more ease than any others that I have come across. It only took a few minutes to read the tags of around 3500 songs and rename them all.

To install in Ubuntu, simply run the command:

sudo apt-get install exfalso

As an added bonus – it also fixed tags of .m4a audio files, meaning that preparing music to go on my iPod Touch in Linux is slightly easier. Wehey!

Getting the HP 2400c Scanner working in Linux Ubuntu Karmic

I had a tough day working on Ubuntu to get a HP 2400c Scanner working today.

A list of problems included the drivers not being included in the Sane package – and after an upgrade to karmic a normal user couldn’t access the USB device.

Here’s a quick rundown of what I did to get it working.

1 – Download the HP scanner drivers from Elcot
2 – Install the drivers as root. The instructions are in the readme file.
3 – Create a new udev rule by creating the file /lib/udev/rules.d/71-scanner.rules
4 – In the rules file, paste in the following code:

#HP ScanJet 2400c
ACTION=="add", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0a01", GROUP="scanner"

5 – Add the user to the scanners group.
6 – Run Sane or Xsane and be happy!

There was a bit of groping around as I hadn’t created my own udev file before without following the instructions or howtos for specific hardware.

The key point to know is that there are some very useful commands:
lsusb – lists info about the usb devices plugged in
udevadm monitor – outputs udev events and shows you the device paths for any devices plugged in / removed
udevadm info –query=all –path /devpath – Shows the udev properties of a specific device
udevadm info –attribute-walk –path /devpath – Shows the udev properties of a device and its parents
* devpath is the path output from udevadm monitor

Once I’d worked my head around these, I could put together the .rules file that I needed. This basically checks the vendor and device ID match, and that it is an ‘ADD’ action. Once confirmed, udev adds the group membership of the device to ’scanner’ so that the users you want to use the scanner can actually use it!

Hurrah!

Prevent Windows from Reinstalling Group Policy Programs

While Group Policy software distribution is a quick and easy way to get software around a network, it isn’t without its problems. One such problem is when a computer is attached to a new domain. If your software distribution is the same, Windows will still reinstall the MSI packages.

The simplest way is to join export a registry key from a computer that is currently joined to the new domain, and then import it into the new system.

And here it is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\AppMgmt

Simple Linux DHCP / DNS Server

I’ve just completed the first DNS and DHCP server that I’ve built for a while. This was using Ubuntu Linux 8.04.

The nice thing about the process this time around as opposed to when I set one up a couple of years ago is that I was a little more au fait with the process. The DHCP successfully updated the DNS records, and everything ticked along nicely.

It’s going into production tomorrow, so I’m hopeful that it will fix a number of network problems that a client has been having with the RM DHCP Server service that runs in Windows XP.

If it would be easy to tie the upcoming Samba 4 into the mix, then I think that you have the perfect open source server! I have another server to put together soon, so I plan to write a ‘howto’ and post it here.

Stop Sexy Bookmarks from being filtererd

I’m quite a fan of the Sexy Bookmarks Wordpress plugin. There’s clearly an element of grace in the design and the developers make no bones about how it should be perceived. Being ’sexy’ has an inexpressible appeal for anything but it can cause headaches simply because of the connotations that are also brought up with it.

For example, searching in Google for Sexy Bookmarks is innocent enough at first until you get a few pages into the results.

The other problem is that corporate firewalls like WebSense can block words such as ‘Sexy’ if they appear in filenames. This is, rather unfortunately, the plug-in’s downfall. Especially if you want your blog or site to appeal to users who likely work for larger businesses.

The key thing is to make a few filename changes to ensure that it doesn’t get blocked, so here’s a few steps to workaround that.

  1. Before uploading, rename the plugin folder to something else. I’m using “trendybookmarks”
  2. Rename the following files:
    /js/sexy-bookmarks.js > /js/trendy-bookmarks.js
    /js/sexy-bookmarks-public.js > /js/trendy-bookmarks-public.js
    /images/sexy-icon.png > /images/trendy-icon.png
    /images/sexy-logo.png > /images/trendy-logo.png
    /images/sexy-sprite.png > /images/trendy-sprite.png
    /images/sexy-trans.png > /images/trendy-trans.png
  3. Open /sexy-bookmarks.php; find and replace the following text:
    js/sexy-bookmarks.js > js/trendy-bookmarks.js
  4. Open /public.php; find and replace the following text:
    js/sexy-bookmarks-public.js > js/trendy-bookmarks-public.js
  5. Open/css/style.css; find and replace the following text:
    ../images/sexy-trans.png > ../images/trendy-trans.png
    ../images/sexy-sprite.png > ../images/trendy-sprite.png
  6. Open /css/admin-style.css; find and replace the following text:
    ../images/sexy-trans.png > ../images/trendy-trans.png
    ../images/sexy-sprite.png > ../images/trendy-sprite.png
    ../images/sexy-logo.png
    > ../images/trendy-logo.png

And that’s it! Everything should work, and I don’t think that I’ve missed anything. All you need to do now is upload the plugin and active it. Make sure that you DO NOT have a sexybookmarks folder in the plugins folder – I’m sure that the result wouldn’t be nice.

A Quick Shutdown Command

Dos Batch FileFor shutting down multiple computers on a network:

for /L %C in (1,1,30) do shutdown -f -s -t 0 -m \\ict-%C

This shuts down all Windows computers named ict-X where X is a number from 1 to 30.