KVM options

I’ve been totally “back to the concrete” refitting my study over the last couple of months (things like this take longer at the moment!) and one of the things I wanted was to add a 4-port KVM to allow me to hook my laptops and key servers to a single common screen, keyboard and mouse.

In the end I decided a USB-based device was best for future-proofing, and would support all my existing systems once I’d fiddled a little with their BIOS settings. So I opted for the Edimax EK-UAK4, as it was on offer from Amazon, and had good reviews.

Sadly, despite support for Linux, hot-swapping etc etc, it turns out that Edimax don’t support laptops. Go figure. And actually, “don’t support” means “doesn’t work”. Which means that it’s no use to me at all. Thank goodness for Amazon’s impressive returns policy.

So now I’m looking for suggestions for a USB 4-port KVM that works with Linux, and laptops, and hot-swaps connections, and can be controlled via keyboard shortcuts. Audio switching a bonus. Sensible price preferred!

RIP, old friend

My second ever laptop, my old Thinkpad 600, has finally died.

It replaced my original 760CD, and like that machine, I carried it with me on numerous business trips all over the world. It survived being dropped, splashed with coffee, slung into bags, and then crammed into overhead luggage racks or under seats where it invariably got stood on. Despite all this abuse it still worked faultlessly in temperatures as varied as -20c in the Scandinavian winter, through to +40c in the humid summers of the US Deep South.

When IBM supplied me with an upgrade I bought my 600 off the company. For a time it was my personal system. Then it ran my home network, 24×7 until I could afford the parts to build a proper server. It was my wife’s main machine for a time, and lately my youngest daughter has been doing all her homework on it. Even in retirement it worked hard for it’s living.

I figure it must be 12 years old, and when it finally failed it was still running Ubuntu 11.04, which is a sophisticated and current operating system. Ok, the bizarre hybrid sound card wasn’t recognised (the 600 used a custom DSP to implement the modem and the sound system – a great idea, badly executed) and it wasn’t the fastest system on the block, but the overall experience was still pretty good.

At the end of the day it’s just a pile of electronics attached to a magnesium alloy chassis with some rather drab composite plastic covers, that no longer works. I should just recycle it. But there is an emotional attachment; I can’t bring myself to just take it to the recycling centre and dump it. But given that the motherboard has failed, the best I can offer it is the chance to donate some spare parts to new projects. So for now it’s going into my spare parts box; hopefully the screen, memory, disk and perhaps keyboard will show up in some future projects.

It may yet live again!

The search for a new desktop still continues

Back in my last post I described how I attempted to customise the Unity desktop environment to better suit my needs within my admittedly commercial setting. The results weren’t too bad, but exposed a series of issues, some of which were purely personal and subjective, and some I felt to be genuine bugs, which I raised against the Unity interface.

This post is all about the same attempt, but this time with the Gnome 3 Shell.

So, having freshly installed Ubuntu 11.10, we need to install Gnome Shell. It’s in the repositories, so it’s a simple matter of opening a terminal and issuing the command:
sudo apt-get install gnome-shell

The steps I then followed were:

  1. Getting to a shell prompt with Alt + F2 has been disabled by default in Gnome Shell under Ubuntu 11.10. This is annoying, as it means you can’t (trivially) restart or debug the desktop environment without it. To fix it, open “System Settings” and under the Keyboard settings, go to Shortcuts, then System, and then click the “Disabled” next to “Show the run command prompt” and press Alt + F2 to re-enable the command prompt.
  2. Next I added some Gnome Shell customisations from http://extensions.gnome.org, which make Gnome Shell look a lot more like Gnome 2. Heretical? Perhaps. So shoot me.
    1. Frippery Applications Menu – puts an old-school applications menu on the left side of the top menu
    2. Frippery Bottom Panel – adds a taskbar to the bottom of every workspace
    3. Frippery Move Clock – moves the clock back to where it used to be in Gnome 2.xx
    4. Frippery Panel Favorite – adds a copy of the launcher into the top panel
  3. Next, I wanted to remove the accessibility icon from the top panel. Last time I looked, I didn’t need any of those settings, so I certainly don’t need the icon there all the time. To get rid of it, I downloaded an extension from the website of the author of all the previous extensions:

    This needs to be unpacked into ~/.local/share/gnome-shell/extensions/ by cd’ing to that directory and running something like:
    tar xvf ~/Downloads/noa11y-2.0.tar.gz.

    You then need to install Gnome Tweak to be able to enable the extension:
    sudo apt-get install gnome-tweak-tool
    and then run it with gnome-tweak-tool and choose to enable or disable whatever extensions you have loaded.

  4. As with Unity, I wanted to disable the overlay scrollbars:
    sudo su
    echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

    Sadly the scrollbars still don’t have scroll buttons on them – which reinforces my thought that this is simply an issue with themes, and hence can probably be resolved once I’ve learned how themes work.

  5. Next, move my preferred set of three window buttons back to the top right of each window titlebar by running the command:

    gconftool-2 --set --type str /desktop/gnome/shell/windows/button_layout ":minimize,maximize,close"

  6. Around now it’s probably worthwhile to logout and back in again, or even reboot.

  7. Next I configured the general settings:

    1. Screen:
      Turn off at “30 minutes”
      Set screen lock “on” after “screen turns off”
    2. Power:
      Do nothing when lid closed (battery or AC)
      Don’t suspend when inactive (battery or AC)
      Shutdown if power critical on battery
    3. Time and Date:
      Panel clock to show 12hour format
    4. Removable Media:
      Tick “Never prompt or start programs on media insertion”
  8. Next I added the date to the clock:
    gsettings set org.gnome.shell.clock show-date true

  9. As with Unity, I configured the terminal by opening terminal preferences, and set the font to “Monospace 9”, the default terminal size to 100×40, and the scrollback to 10000 lines.

  10. As with Unity, I changed the default fonts throughout:

    gsettings set org.gnome.desktop.interface document-font-name 'Sans 10'
    gsettings set org.gnome.desktop.interface font-name 'Ubuntu 9'
    gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 10'
    gsettings set org.gnome.nautilus.desktop font 'Ubuntu 10'
    gconftool --set /apps/metacity/general/titlebar_font 'Ubuntu Bold 9' --type STRING

  11. I also removed the guest account:

    sudo gedit /etc/lightdm/lightdm.conf

    Make it read:


  12. At this point I found I had a desktop that had almost all the features of my current Gnome 2 setup, plus access to the new metaphor of the Gnome Shell when I wanted it. The only problem is that when mousing to the newly added Applications menu, it’s far too easy to hit the “hot spot”, triggering the Overview Mode.

    There are extensions to move that hotspot elsewhere, but I’d prefer to change the way it works, so it takes a more conscious effort to engage it. Unfortunately there is no configuration for this, so for this exercise I took a quick hack at the base code, which is a real cludge. I’m hopeful that it may be possible to do something cleaner with Monkey patching, but for now my change proves the concept, and makes it necessary to click on the hotspot to engage it, or use the super key (as now). To do this, edit:
    /usr/share/gnome-shell/js/ui/layout.js, and change the _onCornerEntered method so it reads:

    _onCornerEntered : function() {
    // if (!this._entered) {
    // Patched this to prevent the hot corner from engaging on cursor entering zone.
    if (this._entered) {
    this._entered = true;
    if (!Main.overview.animationInProgress) {
    this._activationTime = Date.now() / 1000;

    return false;

    Now just entering the hotspot will not trigger the Overview Mode – but you can still click on the hotspot (which is the top left pixel), or just use the Super key.

  13. Since I was messing around in the source code I also decided to get rid of the “currently running application name” in the top panel, which again cannot be configured away. Quite why I’d need to be reminded of the name of the application I’m using is beyond me, and it takes up precious menubar space. This time, edit:

    /usr/share/gnome-shell/js/ui/panel.js, and find the AppMenuButton function prototype. Then scroll down to the “_sync” method, and make the first few lines read:

    _sync: function() {
    let tracker = Shell.WindowTracker.get_default();
    let lastStartedApp = null;
    let workspace = global.screen.get_active_workspace();
    // Add the following line to never show the button (application name)
    for (let i = 0; i < this._startingApps.length; i++)
    if (this._startingApps[i].is_on_workspace(workspace))
    lastStartedApp = this._startingApps[i];

    This works perfectly, but like the previous code change, the problem is that whenever Gnome Shell gets updated, I would need to re-hack these changes manually. Which is not good. But as I mentioned before, I’m hopeful that Monkey Patching will come to the rescue and allow me to create a proper extension for this.

And the conclusion? Well, since it’s all written in Javascript and CSS, Gnome Shell is much easier to customise, and its extension system allows (in theory) for a robust and user-friendly mechanism to change anything that one wishes. I now have a DE that has all the features I like from an “old” Gnome 2 desktop, as well as access to all the new features of Gnome Shell. See below:

There are still rough edges, some of which are probably bugs too, but overall I can get closer to what I want (which may not be what you, or the Gnome Shell developers want) with Gnome Shell than Unity.

So when I upgrade my work “production” laptop over Christmas, it will be to a Gnome Shell based desktop.

The search for a new desktop continues

So the fight to find a workable productive solution continues. Lubuntu and Xubuntu both ended up having problems with some of IBM’s productivity applications. Not an issue for the majority of users, but critical for me. And I also discovered that IBM and Canonical have committed to work together to ensure that we “internal” IBM users of Ubuntu will get the support to ensure that our internal productivity tools do work under Unity.

Which gives me a pretty strong push back towards finding a way to make Unity somewhat more palatable and productive. So I’ve set about trying to turn Unity into something that I can live with for work. I’d not say I’ve completely achieved that yet, but a couple of (long) evenings have got me a fair way forward, and revealed a few problems that I probably need to raise as bugs against Unity – though given the non-standard way that I’ve exposed them, it’s debatable whether they’ll ever be addressed or not. Anyway, here are the results so far:

My normal desktop

Customised Oneiric, with the launcher open

Customised Oneiric, with application selector open

And this is what I did to a freshly installed Ubuntu 11.10 system to get there:

  1. Add back a menu of applications that can act as a launcher, and a taskbar where I can see what I have running. I came across this post describing how to resolve these issues, and merely followed the directions.

    First the menu launcher:

    sudo add-apt-repository ppa:diesch/testing
    sudo apt-get update
    sudo apt-get install classicmenu-indicator

    Once installed, run it by pressing Alt-F2 and typing classicmenu-indicator.

    Now install the taskbar:

    sudo apt-get install tint2

    Once installed, set it to auto-run on system start, by adding an entry to the Startup Applications. The executable is at /usr/bin/tint2. Then configure the resulting bottom panel (in ~/.config/tint2/tint2rc) so it only has a taskbar, removing the clock and battery indicators, by adding:
    panel_items = T
    and adjust its size to avoid interference with the unity launcher (when it’s on screen) by making sure:
    panel_size = 90% 30
    and finally (a personal choice) remove the ability to close applications from the taskbar by setting:
    mouse_right = none

  2. Next, get rid of the ugly Unity launcher by making it autohide. This is done by altering some parameters in the Unity plugin in compiz. You need to install Compiz Config Settings Manager (CCSM) first, by:

    sudo apt-get install compizconfig-settings-manager

    Then run it with ccsm, and find and select the Unity plugin. Then on the Behaviour tab:

    Set “Hide Launcher” to “Autohide”

    Set “Edge Reveal Timeout” to 100

    On the Experimental tab:

    Set “Backlight mode” to “Edge Illumination Toggles”

    Set “Launcher Icon Size” to 32

    Set “Launcher Opacity” to “0.8000”

    I still think it looks like it was designed by a child with a set of blunt crayons, but this makes it a bit more professional-looking, and since it’s now going to be hidden most of the time (and rarely used) I can live with it. I do wish there was an option to completely disable it though.

  3. Next I fixed the window buttons, by re-enabling the standard minimise, maximise, close triple, and moving them to the right side of the window title bar. Do this by entering:

    gconftool-2 --set /apps/metacity/general/button_layout --type string ":minimize,maximize,close"

  4. Then I disabled the ridiculous Overlay Scrollbars, and the Global Menu; together this moves the window buttons and menus back onto the windows where they belong, and gives us working scrollbars on all applications again, including those that are built on Eclipse:

    sudo su
    echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars
    echo "export UBUNTU_MENUPROXY=0" > /etc/X11/Xsession.d/81ubuntumenuproxy

    Sadly the scrollbars lack scroll buttons; I’ve not worked out how to resolve this yet, which can make fine positioning difficult. But it’s orders of magnitude easier than fighting with the overlay scrollbars.

  5. Firefox has an extension to separately move its menus to Unitys top panel, and this needs to be disabled too. Access it from Firefox’s Tools->AddOns menu. It seems to require that Firefox be restarted, and a logout/login sequence to be followed before it fully takes effect.
  6. Next I took back control of the workspaces, by adding an indicator applet into the notification area of the top panel, that also functions as a workspace switcher. The indicator is in a PPA, but unfortunately only for Natty rather than Oneiric. The Natty version works just fine under Oneiric, and installing it is straightforward, if a little fiddly, by following these instructions.

  7. At this point I rebooted to make sure everything was working, and noticed that the classic menu indicator was not the leftmost of my indicators any more. However, it is possible to specify the exact ordering of indicators, so I reordered mine by:

    mkdir -p ~/.local/share/indicators/application
    cp /usr/share/indicator-application/ordering-override.keyfile ~/.local/share/indicators/application/

    Editing the new local ordering-override.keyfile allows the exact order of the indicators to be specified. Lowest numbers are to the right of the panel. To find the id of unknown indicators, use:

    dbus-send --type=method_call --print-reply \
    --dest=com.canonical.indicator.application \
    /com/canonical/indicator/application/service \
    com.canonical.indicator.application.service.GetApplications | grep "object path"

    This results in lines like:
    object path "/org/ayatana/NotificationItem/gnome_power_manager/Menu"
    In this case, the id is gnome-power-manager, but note that the command output contains underscores which need to be changed to dashes to be valid in the ordering-override.keyfile.

  8. Next I installed dconf-editor, which allows a few additional tweaks to be make to Unity:

    sudo apt-get install dconf-tools

  9. I then did some configuration of general settings around the operating system. First, I configured the terminal look and feel by opening terminal preferences:

    Set font to "Monospace 9"
    Set default size to 100x40
    Set scrollback to 10000

    Next I changed all the fonts throughout the system, as the defaults seem far too large:

    gsettings set org.gnome.desktop.interface document-font-name 'Sans 10'
    gsettings set org.gnome.desktop.interface font-name 'Ubuntu 9'
    gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 10'
    gsettings set org.gnome.nautilus.desktop font 'Ubuntu 10'
    gconftool --set /apps/metacity/general/titlebar_font 'Ubuntu Bold 9' --type STRING

    Then, in the “Screen” settings, I configured the screen to turn off at “30 minutes”, and set the screen lock “on” after the “screen turns off”. In the “Power” settings I set the system to “Do nothing” when the lid is closed (on battery or AC), and not to suspend when inactive (on battery or AC), but to shutdown when power is critically short on battery. In the Time and Date settings I set the Panel clock to show the Date and Month, and the clock in 12 hour format. Finally, in “Removable Media” I set the system to never prompt or start programs on media insertion.

  10. To add a quick list of locations to the Launcher “files” icon, I ran the following as a single command:

    echo "[Desktop Entry]

    Name=Home Folder
    Comment=Open your personal folder
    Exec=nautilus --no-desktop

    [Videos Shortcut Group]
    Exec=nautilus Videos

    [Documents Shortcut Group]
    Exec=nautilus Documents

    [Music Shortcut Group]
    Exec=nautilus Music

    [Pictures Shortcut Group]
    Exec=nautilus Pictures

    [Downloads Shortcut Group]
    Exec=nautilus Downloads
    TargetEnvironment=Unity" | sudo tee /usr/share/applications/nautilus-home.desktop

  11. Next I disabled the guest account in LightDM. This prevents someone from logging into my machine (albeit with very limited privileges) when I’m away from the machine. I suspect our security people would not be comfortable with this feature left enabled. To do this, edit /etc/lightdm/lightdm.conf, and make it read:


  12. Next I wanted to change the Alt-PrtSc capability, so I can capture a specific area if the screen rather than the active window. I want to retain the default PrtSc functionality. To do this, I started ccsm, and in the Gnome Compatibility plugin I changed the command “gnome-screenshot -w” (active window) to “gnome-screenshot –area”.

    While I was in ccsm I also disabled the “Snapping Windows” plugin, as it was driving me nuts. I also set a key combination (Ctl-Alt-g) on the “Toggle Handles” option of the Unity MT Grab Handles plugin, to allow easier screen grabbing & manipulation, as the default theme has quite small borders to its windows.

  13. By default, Oneiric doesn’t come with any screensavers. It simply fades to black. Which is efficient, but rather boring. So I removed the default screensaver (which does nothing) and reenabled all the pretty screensavers:

    sudo apt-get remove --purge gnome-screensaver
    sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

    It’s then necessary to add “xscreensaver -nosplash” to the startup applications. This is the server portion of the screensaver which does the actual displaying of the animations, the locking of the screen, and any power management. It’s configured with “xscreensaver-demo”, which allows graphical selection of screensaver animations etc. Finally, to keep the ctl-alt-L key combination to manually start the screensaver, it’s necessary to:

    sudo ln -s /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command

  14. Getting Conky installed (to create the animated desktop) was simple, once I’d realised that the key to making it work under Unity is to change the .conkyrc configuration stanza to own_window_type normal. However, Unity does something odd with painting itself into a different window than the root, so Conky cannot do transparent without help from something like feh, but that can only work with static images, not my preferred gradient fill. I resolved the issue by adopting an image for my desktop background.

  15. Finally, I mentioned a few issues that I’d not resolved yet:

    It seems impossible to stop the Unity top panel showing the name of the active applicaton.

    It seems impossible to move the classicmenu_indicator to the left of the Unity top panel.

    Having disabled the overlay scrollbars, the remaining scrollbars lack scroll buttons

    It seems impossible to remove the workplace switcher icon from the Unity Dash (hard-coded) Raised as Bug 898230.

    It seems impossible to remove the Dash Home icon from the Unity Dash (Hard-coded) Raised as Bug 898230.

    When maximising a window, Unity still steals the window buttons, and places them in its top panel Raised as Bug 898250.

    When stealing the window buttons, it doesn’t adhere to the setting in gconf for how to display them, but uses a hardcoded default Raised as Bug 898250.

    Seems to be impossible to completely disable the Unity Launcher Raised as Bug 898260.

    Help with any of the above would be much appreciated!

The search for a new desktop

As I mentioned here, I’m less than happy with the move Ubuntu have made towards adopting new desktop environments that seem to be more suited to touchscreen devices than desktop computers. So I’ve been test-driving a few of the alternatives to try to find something that will let me get on with my work, without getting in the way all the time.

So far I’m very impressed with LXDE, which is available pre-packaged onto the underlying Ubuntu 11.10 base as “Lubuntu”. Admittedly it’s very basic out the box (or off the USB key), but that seems to be because it’s been designed for very low-powered or old computers. All the default applications have also been selected to keep memory and CPU usage to a minimum. Nothing wrong with that, but in my case, I have a ridiculously powerful laptop with lashings of disk and memory to run it on – so all I want is the good old fashioned desktop metaphor back. Lowered system requirements are simply an added benefit.

So I’ve gone about hacking Lubuntu into something better suited for me. So far I’ve removed sylpheed sylpheed-doc sylpheed-i18n sylpheed-plugins mtpaint osmo xpad ace-of-penguins abiword abiword-common libabiword-2.8 gnumeric and gnumeric-common. That got rid of most of the default applications, and makes way for me to replace them with something fuller-featured.

I then added thunderbird xscreensaver-data-extra xscreensaver-gl-extra recoll inkscape scribus gimp gimp-data gimp-data-extras gimp-help-en gimp-help-common dia shotwell libreoffice aisleriot gnome-sudoku freemind audacity musescore easytag pitivi and conky-all. That adds most of the applications that I would expect to need from the standard Ubuntu repositories.

I then reconfigured the panels. Lubuntu comes with one panel on the bottom of the screen, a la Windows XP, but I’m used to the Gnome approach. So I moved the original panel to the top of the screen and added a second panel to the bottom. I then reconfigured the panels to match what I’m used to in a Gnome 2.x environment by moving around the various panel items – which was far easier than configuring the Gnome panels. So far so good.

Interesting to note that at this point, my test laptop (which is “only” a dual core 2Ghz machine with 2GB of ram) absolutely flies. But I still have a lot of things to try:

I know it’s just eye-candy for the sake of it, but I tried to add a simple Conky installation, showing some key facts and figures to the desktop – date/time, CPU, RAM & disk monitoring etc. It turns out that Conky and LXDE’s FilemanPC (which manages the desktop) don’t play well together out the box. You can get Conky scripts roughly working by altering them to contain “own_window_type normal” rather than “own_window_type overlay” or “own_window_type desktop”. However, the window can easily get minimised, with no way to recover it. Low priority, but more research required on that.

Currently most of the Thinkpad Fn-F1-12 key combinations aren’t recognised. The only one I really care about is Fn-F4 for suspend, which I can workaround using the menus, but I’d like to get at least that one enabled.

Next I need to test all the IBM-specific software that I normally use. I suspect that there may be some issues around the support of some of the Lotus products, which are built on top of an Eclipse base, and hence may not play well with my different desktop environment. Time will tell on that, but its critical for me.

Finally, assuming I can get all these basics working, I think I’ll be looking into producing a custom theme, as the standard Lubuntu (cold) blue isn’t at all to my taste.

Ubuntu losing its way?

As you can probably tell, I’ve been a fairly ardent supporter of Ubuntu Linux for several years now. I run it on all my machines here at home, and on several machines at work, including my primary workstation, a Lenovo X201 laptop.

It’s served me really well; every six months a new release has brought me a better, more reliable alternative to Microsoft’s Windows, with better support for my hardware, better pre-installed applications, and better usability.

It’s been so good that I’ve been able to eschew the IBM standard Windows software stack, and avoid the rather slow-to-evolve Redhat-based desktop that IBM has been promoting amongst it’s more technical community. Living on the bleeding edge with Ubuntu has been surprisingly easy.

Sadly, with the last couple of releases, that has been changing. Ubuntu seems to be going it’s own way, with a new graphical user interface (GUI) called Unity. Adopting it seems to have involved a lot of changes for changes sake. We’ve suddenly had the window controls moved from the right to the left. Now the window controls aren’t on the window at all – they’re on the top panel. And it’s design looks like something designed by a 6-year old with a set of crayons.

It might work well for people on a touchscreen netbook or smartphone who want to do nothing more challenging than check their email, but on my laptop, which is often docked to multiple high-resolution monitors, where I want to have a couple of dozen windows open at once, well, frankly it’s an unproductive mess.

I’ve tried to change my way of working. To adapt. But it just isn’t possible to do what I need productively. It just doesn’t work. I’ve also tried Gnome Shell, which is the other readily available GUI in Ubuntu 11.10. And it’s just as bad, probably because it’s very similar to Unity.

So with a heavy heart I’m getting ready to move on. The trouble is, what to? Gnome and KDE are both mired in the same “innovative new desktop metaphor” game as Unity. Which only leaves me with some of the niche desktop environments like LXDE, XFCE, CDE or maybe even Enlightenment. LXDE or XFCE are my most likely choices – they’re both similar to the old Gnome 2 desktop in ethos, but nowhere near as polished in their implementation.

Or my other option is switch back to Microsoft Windows 7, or to move on to Apple.

It’s not my preferred option, but I need my computer to work. It’s a tool, not a philosophical or religious debate; I need to be productive, to satisfy my customers, to earn money to pay the bills.

Building a wireless sensor hub (part iv)

Having got everything pulled back together and wired back up, I can now report that it doesn’t work. Since I don’t own an oscilloscope (yet!) debugging it is going to prove difficult. However, I can’t see anything obvious wrong with my little circuit, so I now rather suspect that I may have blown the UART in the router.

Ideally I should now test that, but again, without an oscilloscope to hand, that’s going to be awkward. If anyone reading this is an electonics wiz, feel free to comment on any issues I may have overlooked in the design of my circuit.

In the meantime I’m going to see about acquiring some test tools to help me debug it further. Drat.

Building a wireless sensor hub (part iii)

I rebuilt my little circuit board, and all now seems OK. Now I just need to test it. So I reattached it to the router, and wanted to check that I could communicate with it via the (second) serial port that it is connected to, called /dev/tts/1

To check the serial line configuration, I needed stty, which is not installed in the BusyBox implementation supplied with OpenWRT, so I needed to install the standalone version. It’s in the coreutils package, which has lots of things in it that I don’t need, and is frankly huge. The solution to this is to extract just the stty program from the package, and install that manually. This is done as follows:

  1. Download coreutils from the repository manually (e.g. wget http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages/coreutils_6.9-1_mipsel.ipk for the WRT54GL). Make sure you are using the right architecture/platform.
  2. Rename the file so that it ends in .tar.gz
  3. Uncompress the file using tar/gzip
  4. This will reveal a data.tar.gz (and other files). Uncompress this file, unpacking the usr directory.
  5. Copy usr/bin/stty to /usr/bin on the WRT54GL.

Green printing?

This week my trusty old Canon IP4000 inkjet stopped working. Changing the cartridges and running deep cleaning cycles make no difference. The print quality has been slowly falling off for some time now, so my suspicion was that the print head had finally died. I suspect the printer must be something like four or five years old now, so it’s not perhaps not unexpected.

What was unexpected was the cost of a replacement print head; the cheapest I could find was nearly £70. Add in another set of cartridges at £30, and it becomes significantly less expensive to just buy the new replacement model printer from Canon (the IP4850) at about £75 delivered. Which is just completely ridiculous.

In addition I’ve always been frustrated that the inkjet cartridges always seem to run out at an alarming rate. The manufacturers quote the capacity in pages of 5% coverage (340 pages, apparently), which may be representative of average business use, but decidedly unrealistic when you have three children printing lots of full-colour diagrams as part of their homework. I doubt that I got more than a hundred pages before one or another of the colour cartridges started running dry. Keeping the printer supplied involved the frequent advance purchase & stockpiling of cartridges.

Of course, printing technology has moved on in the intervening years, so I decided to do a proper examination of the options available against my expected printing requirements over the next few years. This is heavily influenced by the needs of my daughters who are entering the stage where they will be doing a lot more homework as part of their GCSE and A levels, and my need to produce the occasional “customer ready” document at home.

My requirements; Linux support, excellent black and white performance, automatic duplex (saves so much paper!), the ability to print colour diagrams, and a volume of approximately 200 pages per month. Long term cost of ownership is more of a factor than the purchase price, and we have no requirement for photographic printing, as we print photographs via a bureau.

To my surprise, the latest generation of SOHO colour laser printers compete very favourably with inkjets on total cost of ownership. There is no doubt that they are still more expensive, but to compensate for that, you get better print quality, faster throughput, and the convenience of much longer between (more expensive) toner cartridge changes.

In the end I narrowed the choice down to either the Canon IP4850 inkjet, or a Lexmark C543dn laser printer. Both had excellent reviews and represented the best fit for my expected needs for their respective technologies. However, finding a supplier offering the Lexmark with a 50% discount pretty much decided the issue; £150 delivered, with full capacity toner cartridges installed is hard to beat.

I took my old Canon IP4000 down to the recycling centre yesterday. It felt really wrong to be “throwing away” something that with a little maintenance is basically capable of continuing to provide good service. But economically it just didn’t make sense. I felt very un-green.

Meanwhile the Lexmark is installed on my home network and working beautifully. I spent some time fiddling with the printer settings to reduce the toner intensity levels and the timeout period before the printer drops into its lowest power-saving mode, both of which ought to help me save money. It does mean a twenty second delay before the first page is printed while the printer warms back up, but once running it churns out paper at 20 pages a minute, so overall it’s a lot faster than the old inkjet we were used to.

Server drive failure

In other news, I received a barrage of emails from my home server the other day, each complaining about a degraded raid array. A swift check through the emails indicates that every array on the machine had been degraded, and a little more investigation leads to the simple conclusion that one of the hard drives has completely failed.

So far I’ve not had time to check if this is a failure of the drive, the controller, or perhaps even just a cable coming loose, but it’s nice to see the server continuing to function completely normally despite this failure. Lots of kudos for the software raid functionality in Linux.

My job for tomorrow morning is to find out what has actually failed, replace it, and then reinstate the degraded raid arrays. One thing I’ll look into is getting SMART monitoring of the hard drives enabled. Currently it isn’t, and it would have been nice to have had some advance warning of this so I could have had the new drive ordered and waiting.

Still, hopefully the whole thing is not more than a couple of hours work.

Update: Initially it seemed like a cabling problem; simply replugging all the drives seemed to resolve the problem. However, putting it all back together again caused it to stop working again. After quite a lot of swapping of cables, and then finally wiggling of cables, it became clear that the problem was the drive after all. Ultimately it looks like the circuit-board attached to the drive has failed. Flexing the cables causes a little bit of movement of the circuit-board, which I suspect over time has caused it to fail.

A new drive seems to have completely resolved the problem. Having got that installed, it took about 5 minutes to partition it up, another 5 minutes to add the partitions to the raid sets, and about 4 hours for the linux software raid system to rebuild the raid sets.

And all is now working perfectly again.