Archive for the 'OS/Software' Category

Terminal features wishlist: #1: Paste Intercept

Thursday 10th July 2008
A terminal program should have sufficient intelligence to recognise that, when (a) it is at a shell prompt, and (b) the user has just middle-clicked and sent hundreds of lines from the copy-paste buffer hurtling towards the shell prompt, the user may have made a mistake, the user’s mouse inadvertantly striking some object perhaps… and it should ask him whether he really wants to do that.

This was part of a much larger post which got killed by a bug in Wordpress… “Are you sure you want to edit this post?” it asked. Yes, quoth I. And it was gone. 2 hours of scribbles, vanished, and even going back in the browser doesn’t recover it.

Related wishlist item: Anyone know of a little program that can sit on the desktop, probably always on top (so SMALL) and on all desks, which will show the current contents of the (Unix) copy-paste buffer, and provide a button to clear it? Even better if it can save a few of them too, even just 2 or 3. I like the Unix system. Left click and drag to select. Left click and right click to select by marking start and end points. Middle click to paste. It’s simple, it’s fast, it avoids faffing with menus. But there’s always a slight frisson of doubt which sets in as time passes between cut and paste. Currently the only way to find out is to paste somewhere. I’d like to just be able to look at the corner of the screen, see a tiny rendering of the contents, and know.

M-Audio Xponent + Linux + mixxx

Tuesday 3rd July 2007

Updated: 2007/07/27 - New section on LEDs. Update on mixxx SVN.

In case any of you who have read my review of the M-Audio Xponent are thinking of getting one and wondering “but will it work under Linux?”, the short answer is a resounding Yes!… except for the LEDs, so far. More on that later.

I use Debian unstable with a hand-rolled kernel. YMMV, of course, but the chances are that if you’re using any modern distro you’ll be fine. In fact you may not even have to manually insert the kernel modules if you have a working udev setup, you might just be able to plug’n'play.

Full details below the cut, as they say…

(more…)

Zen console messages

Monday 25th September 2006

It’s a shame that console messages from GUI apps usually go unread. I just discovered the following profound koan in an xterm from which I’d run Firefox:


Warning: more than one line!
Warning: more than one line!
Warning: more than one line!
This should only happen once
Warning: Attempt to remove nonexistent passive grab

Backuppc woe

Wednesday 26th July 2006

I’ve been using BackupPC to take offsite backups of all my machines over the network for over a year. It seemed to work well enough and, it seemed, would always email me if it hadn’t been able to backup a certain machine for a few days.

Yesterday I discovered that it has not done a successful backup of one of my machines since March! I just suddenly noticed on the status screen that instead of a table of 8 backups (2 full and 6 incr), only 3 were shown — 2 full, both dating back to March, and 1 “partial” from the day before yesterday. Looking at the logs I see this:


2006-07-24 06:00:05 full backup started for directory /data/work; updating partial 678
2006-07-24 06:20:28 full backup started for directory /home; updating partial 678
2006-07-24 06:20:34 Got fatal error during xfer (fileListReceive failed)
2006-07-24 06:20:39 Backup aborted (fileListReceive failed)
2006-07-24 06:20:39 Saved partial dump 678

Exactly the same thing has been happening every day for the past 4 months. Backuppc didn’t email to tell me. It’s email system was definitely working because during that time it did mail me about a machine that was offline for a while. So it appears it doesn’t bother to send mail to notify you of a failed backup!

I had no idea what might be causing this. It just started out of the blue, having worked flawlessly before March. It only affected one machine. The configuration had not changed. It always failed on /home but was apparently ok with /data/work.

Something weird in /home? To find out, I set tar loose on it:

$ cd /home; tar cf - . >/dev/null
tar: ./jammin/.gxine/socket: socket ignored
tar: ./jammin/.kde/kdeinit-\:0: socket ignored
tar: ./sarah/.totem.sarah: socket ignored
tar: ./sarah/.xine/session.0: socket ignored
$

Surely not. Surely it couldn’t be something as trivial as a couple of stale socket files causing my backup to fail? Well, I’m not using any of those programs, so I deleted the sockets, and told backuppc to start a full backup. What do you know — it worked.

So is it that it doesn’t like sockets? Or has the poor thing got confused by the funny characters in the filename of that KDE one? I’ll test this out at a later date when my backups have recovered.

There are three major failings by BackupPC here. One, failing over a simple socket or dodgy filename, and not giving much clue why. The second, not bothering to email when a backup fails halfway through. But most concerning of all is that it kept trying to add to the same partial backup, instead of starting a new one — so I no longer have 2 weeks’ worth of incrementals even for the part of the backup that succeeded. Every day, yesterday’s backup was being overwritten by today’s. If I needed to recover a version of a file in /data/work from 2 days ago, I couldn’t. That sucks.

This has made me realise something. Quis custodiet ipsos custodes?. Why am I relying on *one* backup solution? It’s a SPOF, and it has quite spectacularly F’d. I still want to find out why, and ideally fix it, but I’m also going to start setting up something else alongside. Since backuppc is server-driven, the alternative should be client-driven. All recommendations welcome. The two major requirements are that it must support ssh, and be bandwidth-efficient because I’m backing up over ADSL.
All the client machines run Linux.

Sony Ericsson K750i and Linux

Friday 10th June 2005

I just had a very strange experience. I hooked up my new Sony Ericsson K750i mobile phone via USB to my PC (running Linux 2.6.11 Debian unstable). And it just worked. I didn’t have to faff around with the USB driver as I’d had to for my Treo 600 a year ago. It just thought for a while, dumped several KB of its thoughts into syslog (I probably selected a debugging option when I built the kernel), and *ping* the memory stick in the phone appeared as /dev/sda. I just had to mount /dev/sda1 (vfat), and there it was.

Almost disappointing.

The phone is very nice, btw. Screen is good, mp3 playback is very good (even with the supplied earbuds — even through the speaker is not bad), camera is alright (for a phone). Organiser is rubbish: you can’t set up events without a time, or recurring events like birthdays, and the bold font used to identify dates with appointments in calendar view is barely different from the normal font. Sometimes I think I should just go back to a paper diary…

Mozilla Firefox tips

Monday 14th March 2005

For ages I’ve been wishing it were possible to highlight part of a webpage and just view the source for that part, rather than scouring the whole page’s source for the relevant section. Now I discover, to my annoyance and delight, that Firefox can do this… sort of…

If you hold down the CTRL key and left click on part of a web page, that section of the page will be highlighted. If you right click on the selection and choose ‘View selection source’, the source code for that part of the page will be displayed.

That comes from a tips & tricks article on the MozillaZine Forums, which is crammed full of useful snippets like this. Many of them have been sorted into this knowledge base article, but I didn’t see the above one in there.

It’s not quite accurate. ctrl-click actually selects a table cell, not any arbitrary block. So this limits its usefulness. But it’s helpful for sites that are still using masses of nested tables for layout.

The two extensions I cannot live without are Web Developer and Session Saver.