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!

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.

Tunnelling on the fly

I’ve just been tweaking with SSH. One of the common things that I have to do is reconfigure my SSH tunnels while I’m working remotely to gain access to desktops and the like.

In this situation, the cumbersome but easiest way always seemed to be to disconnect and change the command line. However, having used Putty I was fairly sure that there must be an easier way.

AND THERE IS!

Changing the port forwarding in ssh is as easy, if not easier, than in Putty.

While you’re connected to the host, type a tilde (~) and an uppercase C.This will open the ssh shell. Just type in your port forwarding command like you would when you are typing in the command line option. eg:

<code>-L 3389:localhost:3389</code>

to tunnel an RDP socket to the machine that you are connected to.

And that’s it! If you’re stuck, type a question mark (?) and press ‘Enter’. This will show you the options available.

No More Lost Deleted Files in Ubuntu

I had a shocking error of judgement this morning when I accidentally deleted some of my son’s photos from his toy digital camera. They were sitting on my desktop, and I was on a cleanup… These were a casualty of my cleanup-fest and obsession with the shift key.

Thinking on a Windows vein – I thought that I should be able to backup the files easily and seamlessly. But I don’t want too much aggravation. A quick scoot around the Ubuntu forums, and I found TimeVault.

TimeVault is the equivalent project to Windows’ Shadow Copy service or Apple’s Time Machine. Basically it’s a completely transparent backup that allows you to recover files easily on the system you are working on.

I’ve downloaded the .DEB and forced the installation (there’s no binary x64 version at the moment). I’ll see how it all goes and report back!

Block Facebook Adverts in Firefox

Anyone using Facebook will know that it’s quite annoying losing a good chunk of screen real estate to the adverts on the right hand side.

Of course, many others think so and there is a nice extension that will block various adverts around the internet including Facebook’s own.

Now, I’m not going to get into the morality of blocking adverts on websites here – I’m simply showing you how to do it. If the internet goes bust, it isn’t my fault.

  1. Open Firefox
  2. Click ‘Tools’ > Add-ons
  3. Click ‘Get Add-ons’
  4. Type adblock plus into the search box
  5. Click on the Adblock Plus extension and then click Add to Firefox…
    Firefox Add-ons Window
  6. Click Install Now
  7. Click Restart Firefox

Firefox should restart – so now we can use a subscription to block the adverts. If the Welcom to Adblock Plus window doesn’t open, click on Tools > Add-ons > Adblock Plus > Preferences. Click on Filters > Add filters subscription.

Welcome to Adblock Plus Window

  1. Select the Easylist USA option and click on subscribe.
  2. Click OK

That’s it! Now that you have the ad filtering installed – Facebook should now be advert free in the right-hand side of the page.

Hurrah!

How to download BBC iPlayer programmes

I’ve found the BBC iPlayer client very frustrating to use. Even though the client is cross-platform thanks to Adobe Air – it’s slow and sometimes doesn’t allow you to download a programme when you should be able to.

Also, it doesn’t work properly on 64-bit platforms such as Ubuntu (which is what I use), so the process becomes even more difficult.

So, after getting quite fed up with iPlayer still not quite delivering – I had a scoot around the internet and found a very useful program which will download those videos very nicely.

get_iplayer boasts that it can download BBC TV, radio and ITV onto your computer. Not only this, but it can also be scheduled to download your favourite programmes just like a PVR. So it’s like Sky+ or TiVo, but better. But bear in mind the disclaimer:

Of course, to respect the content providers’ wishes and fair-use legislation, you should keep the recorded content for no longer than 30 days (in the UK), not attempt to obtain it from outside of the UK and not redistribute it. get_iplayer is not intended for use in making illegal copies of copyrighted content. Please respect the rights of the content owners when recording. get_iplayer will attempt to remove its recorded content which is more than 30 days old.

Getting Started
First thing’s first, we need to install it. I’ll assume that you’re using Ubuntu Linux for this, but you can install this on Linux, Mac or Windows.

First of all, download the get_iplayer package from the download page. You’ll also need the flvstreamer package to download the high quality videos.

Once downloaded and installed, you’ll be all set to start downloading. The first thing to do is get an up to date list of programmes. Running

<code>get_iplayer</code>

On its own will refresh the BBC feed and list all the programmes curently available. There may be a lot so you might want to search by the title of the programme:

<code>get_iplayer "Top Gear"</code>

will list all of the BBC iPlayer programmes matching the phrase “Top Gear”

Now you decide that you want to download all of the “Top Gear” series, you can download them with:

<code>get_iplayer "Top Gear" --get</code>

This will download all the available episodes of Top Gear as a .mov file. Using additional parameters, you can also download in various formats such as HD .mp4 files.

Alternatively, if you’ve got the link to a program and you want to download it without any fuss – then you just need the URL or the ID of the programme to download it instantly:

<code>get_iplayer --get --pid http://www.bbc.co.uk/iplayer/episode/b007vl20/Will_Smith_Presents_The_Tao_of_Bergerac_Episode_3/</code>

This will download the radio show The Tao of Bergerac onto  your computer without the need for searching for the programme through the get_iplayer command line tools.

There is loads more you can do, such as using get_iplayer as a PVR. The documentation covers the different commands well, and is definitely worth having a squint through. Just remember to watch how much you’re downloading if you have capped bandwidth from you internet provider.

If you feel like something a bit more graphical, the is also a get_iplayer PVR Manager available to try.

Happy downloading!