Carrying out a hard reset of a home KVM switch

During a recent upgrade from Linux Mint 18 to Linux Mint 18.1 on a secondary machine, I ran into bother with my Startech KVM (keyboard, video, mouse and audio sharing) switch. The PC failed to recognise the attachment of my keyboard and mouse so an internet search began.

Nothing promising came from it apart from resetting the KVM switch. In other words, the solution was to turn it off and back on again. That was something that I did try without success. What I had overlooked was that there USB connections to PC’s that fed the device with a certain amount of power and that was enough to keep it on.

Unplugging those USB cables as well as the power cable was needed to completely switch off the device. That provided the reset that I needed and all was well again. Otherwise, I would have been baffled enough to resort to buying a replacement KVM switch so the extra information avoided a purchase that could have cost in the region of £100. In other words, a little research had saved me money.

Getting an Epson Pefection 4490 Photo scanner going with Ubuntu GNOME Remix 12.10

My Epson Perfection 4490 Photo scanner has been in my possession for a while now and its impossible to justify any replacement given that it both works well and digital photography has taken over from its film predecessor for me. Every time I go installing an operating system afresh, I need to reinstate it again and last year’s installation of Ubuntu GNOME Remix 12.04 only saw me do the deed recently. When I did so, it was brought back to me that I’d never gone and documented on here how this was done. Given that I sometimes use this place as a repository of stuff to which I need to refer again in the future, it seemed remiss of me so here it is for you all.

Though I had XSane and SimpleScan already installed on the system, Sane wasn’t on there so I went and added it and a few other extras using the following command:

sudo apt-get install sane sane-utils libsane-extras

Then, it was onto the Epson website for their Perfection 4490 Photo Linux drivers since Sane’s support for this scanner seemingly remains incomplete even though it pre-dates my move to Linux in 2007. Three files were needed and the following commands install them (depending on when you do this, the file names may be different so just change them to whatever they are for you; it can be done with a single command too but there is not enough girth for that here):

sudo dpkg -i iscan-data_1.22.0-1_all.deb
sudo dpkg -i iscan_2.29.1-5~usb0.1.ltdl7_i386.deb
sudo dpkg -i iscan-plugin-gt-x750_2.1.2-1_i386.deb

With those in place, there was one other task that needed doing so that scanning could be done without resorting to running scanning software using sudo privileges. To free up the access to a normal user account, I needed a HAL device information file. These normally are in /usr/share/hal/fdi/ but they change every time an installation so any modifications that you may make are going to be lost. Therefore, there is no point modifying either /usr/share/hal/fdi/preprobe/10osvendor/20-libsane.fdi or /usr/share/hal/fdi/preprobe/10osvendor/20-libsane-extras.fdi where scanner information usually is to be found.

The first task in creating an fdi file was to issue the lsusb command and look for a line corresponding to my scanner. This is the one that I got:

Bus 001 Device 004: ID 04b8:0119 Seiko Epson Corp. Perfection 4490 Photo

From this, I gleaned the manufacturer ID and model ID as 04b8 and 0119, respectively. These are needed later on. Next I needed to create the hal/fdi/preprobe/ folder structure under /etc since it was there. Then, I created epson4490photo.fdi in the bottom folder of the tree (/etc/hal/fdi/preprobe/epson4490photo.fdi) as follows:

cd /etc/hal/fdi/preprobe/ && sudo touch epson4490photo.fdi

Then, I edited the new file using the following command:

gksu gedit epson4490photo.fdi &

When open, I added in the following text:

<?xml version=”1.0″ encoding=”UTF-8″?>
<deviceinfo version=”0.2″>
<match key=”info.subsystem” string=”usb”>
<!-- Epson Perfection 4490 Photo -->
<match key=”usb.vendor_id” int=”0x04b8″>
<match key=”usb.product_id” int=”0x0119″>
<append key=”info.capabilities” type=”strlist”>scanner</append>
<merge key=”scanner.access_method” type=”string”>proprietary</merge>

It’s all in XML so the place to look is immediately beneath the scanner name comment. The int attributes of the two match elements immediately following the comment line are populated using the information from the lsusb command output with 0x prefixing both the manufacturer and model identifiers. The element with a key attribute of usb.vendor_id is the former and that with a key attribute of usb.product_id is the latter. With epson4490photo.fdi saved, I rebooted the machine to restart HAL and all was as I wanted it to be apart maybe from XSane making complaints that seemed not to be of any actual consequence. With Epson’s Image Scan! and Simple Scan on the PC, there’s no need to be bothered with those messages. Choice is good when you have it, especially when you have expended some effort to get that far.

Booting from external drives

Sticking with older hardware may mean that you miss out on the possibilities offered by later kit and being able to boot from external optical and hard disk drives was something of which I learned only recently. Like many things, a compatible motherboard and my enforced summer upgrade means that I have one with the requisite capabilities.

There is usually an external DVD drive attached to my main PC so that allowed the prospect of a test. A bit of poking around in the BIOS settings for the Foxconn motherboard was sufficient to get it looking at the external drive at boot time. Popping in a CrunchBang Linux live DVD was all that was needed to prove that booting from a USB drive was a goer. That CrunchBang is a minimalist variant of Ubuntu helped for acceptable speed at system startup and afterwards.

Having lived off them while in home PC limbo, the temptation to test out the idea of installing an operating system on an external HD and booting from that is definitely there though I think that I’ll be keeping mine as backup drives for now. Still, there’s nothing to stop me installing an operating system onto of them and giving that a whirl sometime. Of course, speed constraints mean that any use of such an arrangement would be occasional but, in the event of an emergency, such a setup could have its uses and tide you over for longer than a Live CD or DVD. Having the chance to poke around with an alternative operating system as it might exist on a real PC has its appeal too and avoids the need for any partitioning and other chores that dual booting would require. After all, there’s only so much testing that can be done in a virtual machine.

On keyboards

There cannot be too many Linux users who go out and partner a Microsoft keyboard with their system but my recent cable-induced mishap has resulted in exactly that outcome. Keyboards are such standard items that it is not so possible to generate any excitement about them, apart from RSI-related concerns. While I wasn’t about to go for something cheap and nasty that would do me an injury, going for something too elaborate wasn’t part of the plan either, even if examples of that ilk from Microsoft and Logitech were sorely tempting.

Shopping in a bricks and mortar store like I was has its pluses and its minuses. The main plus points are that you see and feel what you are buying with the main drawback being that the selection on offer isn’t likely to be as extensive as you’d find on the web, even if I was in a superstore. Despite the latter, there was still a good deal available. There were PS/2 keyboards for anyone needing them but USB ones seemed to be the main offer with wireless examples showcased too. Strangely, the latter were only available as kits with mice included, further adding to the cost of an already none too cheap item. The result was that I wasn’t lured away from the wired option.

I didn’t emerge with what would have been my first choice because that was out of stock but that’s not to say that what I have doesn’t do the job for me. Key action is soft and cushioned rather than clicky like that to which I am accustomed; some keyboards feel like they belong on a laptop but not this one. There are other bells and whistles too with a surprising number of them working. The calculator and email buttons number among these along with the play/pause, back and forward ones for a media player; I am not so convinced about the volume controls though an on-screen indicator does pop up. You’d expect a Microsoft item to be more Windows specific than others but mine works as well as anything else in the Ubuntu world and I have no reason to suspect that other Linux distros would spurn it either. Keyboards are one of those “buy-it-and-forget-it” items and the new arrival should be no different.

A very silly mishap

Last night, something very stupid happened to me: I tripped up in my main PC’s cables and brought the behemoth crashing about the place. There was some resulting damage with the keyboard PS/2 socket being put out of action and a busted USB port and mouse. When this happens, thoughts take on the form of a runaway train and the prospect of acquiring a new motherboard and assorted expensive paraphernalia trot into your mind; there are other things that more need my cash. Of course, the last time to be making such big decisions on computer components is when a mental maelstrom has descended upon you.

Eventually, I got myself away from the brink and lateral thinking began to take over. What helped was that most of the system seems unaffected and I am using it right now to write this post. While a spare will work for now, a new ergonomic mouse is on order but cheaper alternatives to the keyboard conundrum have come into play. If PS/2 wasn’t an option, then USB remained one and that was the line of attack that was taken. It involved a visit to the nearest branch of PC World after work but I came away with a new USB hub and a USB-compatible keyboard for less than the price of a new AM2+ Gigabyte motherboard that would have served my needs. An otherwise functional Trust keyboard may have been retired but that was a less expensive option than a full PC rebuild, something that I may still need to do but it can be left for a whole lot longer than the immediacy that flashed before my eyes within the last 24 hours. In fact, acquiring some cable ties should be higher on the acquisition wish list so as to avoid cable-induced tumbles in the future. It really does pay to able to step back and see things from a wider perspective.