slef-reflections on Software
Posted by mjr 2007-11-20
HOWTO find my current RAM configuration and buy a cheap PC
Posted by mjr 2007-11-04
I'm pondering adding more RAM to my workstation. 128Mb is enough for most of my work, but OpenOffice swaps a lot. I couldn't remember what RAM is currently in it (one stick or two?) so I was very happy to find dmidecode in the comments on as days pass by, by Stuart Langridge: Memory scanner for Linux.
dmidecode says I have a free slot and another 512Mb stick is surprisingly cheap. Actually, whole Ubuntu-ready-to-use computers are surprisingly cheap, according to lkcl. I hope they don't contain toxic e-waste.
Problems with MyDNS on a Virtual Server
Posted by mjr 2007-11-02
I moved secondary DNS for one of my customers to an OpenVZ virtual server on a completely different network to their main server (which is a very good idea). The secondary DNS is MyDNS with a customised way of sync'ing from the primary nameservers.
MyDNS has been wonderful when I've used it. Using postgresql with a nice trigger to auto-update the serial whenever the zone is updated, it's reduced the most common mistake my customers make when managing their own DNS. So, I was struggling to figure out why MyDNS kept crashing with an out-of-memory error.
It seems that it was hitting two limits in the virtual server config: dgramrcvbuf and Tcprcvbuf limits. Is there a smart way to figure out how big to set these, apart from trial-and-error?
maildelayline - sending emails at a given future time
2007-09-25 (Permalink): I'm pretty sure someone in one of my syndicators was looking for software to send emails in the future from anywhere, but I'm damned if I can find the message. At the time, I was using a homebrew system involving shell scripts and mailx, so I wasn't much help.
I'll upload a proper release soon, but I'm happy to upload a second hack of maildelayline here. It requires recent bash, sed, at and a sendmail-like executable. I've deliberately kept it simple to try to make it easier to debug and I dislike needing to install too much for such a simple task.
Make a temporary directory, edit the top of the script, then install it on a pipe mail alias (I'd keep the address secret and improbable, like RUbAHy8961: "|/path/to/maildelayline" and then save the address in my address book) and send it an email. At the start of the email body, write a pseudo-header with the time, like
"X-Send-At: now + 7 hours"
and follow it with the To:, Cc:, Bcc: and any other headers. Some headers (like from, message-id and threading ones) are kept from the original message, but the Date and Received headers are among those removed. Don't put the X-Send-At in the email header unless you know what you're doing - usually, put it in the body.
The X-Send-At field can be any time that your at program understands. If you confuse it, or forget to give it a time, then you should get a bounce message that says something like "garbled time" among other errors.
maildelayline is similar to Leave A Message or FutureMe but it sends mail to anyone, autonomously on your own server, from emails instead of a web form. I think it will resend MIME attachments as long as the pseudo-header is in a plain text/plain part and not quoted-printable or base64 or something. It is named after delay lines, which I believe are mostly used in audio effects to repeat a sound after a time delay.
Please leave a comment if you find this useful, or if you have an improvement.
What I learnt this morning while installing Samba so that an out-of-ink Microsoft PC could print on a toner-full laser attached to a GNU/Linux workstation:
Firstly, the manual authors seem to prefer to document CUPS. I don't understand why. Surely if one has CUPS installed already, a Microsoft PC can print to it as a network printer without Samba? I installed Samba because I want to print without replacing lpr and breaking things that print from the workstation already.
Secondly, if you ytpo smb.conf badly enough, then smbd will sulk. Particularly passwd-related options. To persuade it to give useful error messages, smbd -F -S -i seems the magic combination. If you don't put -i, it decides that you really meant it to daemonise, despite the other options.
Thirdly, it doesn't break it if Microsoft Windows puts "unable to connect" or another strange message on its Printers window. I'm not sure what that message really means.
Finally and most importantly, if the nobody user is not allowed to print, make sure Samba is sending the print job as a different user that is allowed to print. That's the "guest account" option in the printer config.
Pete Boyd wrote:
"Surely if one has CUPS installed already, a Microsoft PC can print to it as a network printer without Samba?"
This is true but you need to know what you're doing to be able to add such a print queue on Windows, its not trivial. The procedure people using Windows will expect to use is something like point'n'print where they navigate to the print server in Windows Explorer, right-click on the print queue and choose 'Connect'. This way the drivers are copied across the network and auto installed on their system and the print connection setup."
It looked like I could add it by opening the Printers and Faxes screen, clicking "Add a new printer" selecting the right radio button and then putting the URL for the CUPS server into the box. Doesn't that work then? chithanh wrote:
"If you already have a working lpr setup, you can install Print Services for Unix via the control panel, and connect to your lpr daemon. No need for Samba at all."
Thanks for the tip. My lpr doesn't offer remote connections (it's a shell script that execs ghostscript), but I'll remember the above for future use.
Going back to connecting to CUPS directly, Sam Morris commented:
"http://www.owlfish.com/thoughts/winipp-cups-2003-07-20.html has instructions that I have used in the past.
Use "Add Printer", select "Connect to a printer on the Internet..." and enter the printer's URL (e.g., http://192.168.0.1:631/printers/someprinter).
When asked for the driver choose the Generic Manufacturer and the "MS Publisher Imagesetter" printer."
Interesting. I always used Apple LaserWriter. Is the MS Publisher one better?
Ryan Lovett commented:
"CUPS sometimes doesn't reflect accurage page counting statistics in page.log when receiving jobs from Windows clients in this manner. YMMV, however.
Another nuisance is that if you have multiple printers that use the same driver they will be hard to differentiate by name and Windows 2k/XP doesn't let you rename network printers. There is a solution, but it involves modifying the windows registry."
Wow, that's a surprisingly daft bug. I also heard at work that some versions of Windows remove network printers if the network they're on is disconnected.
Update: Howto setup a print server for Windows (and others) using CUPS and zeroconf has appeared at still don't have a title.
Anyway, enough Microsoft Windows for now. I don't have to touch it very often and then only to make sure it can connect to my servers.
Ubuntu power study and RBS-NatWest: the global warming bank
Two things I saw about today: Ubuntu's Power Consumption Tested, by Michael Larabel and 'Climate refugees' Locked-Up at the 'Oil Bank of Scotland' (So, please take action to tweak your power management and change your bank today!)
Free Software Competitions
2007-08-17 (Permalink): Georg Greve of FSFE asks people to Submit your Free Software projects for the Trophees du Libre - closing date 1 October 2007.
I also saw somewhere a link to the entry form for the New Zealand OS Awards - the event is in October, but I can't see a closing date on the form.
If you're a non-programmer and want to do something very helpful for a project like Koha, please consider writing us a nomination. Koha won a Trophee du Libre a couple of years ago. By the time the deadline hits this year, maybe 3.0 will be out.
Two Answers for All Serious Free Software Contributors
2007-08-08 (Permalink): etbe: Two Questions for All Serious Free Software Contributors asks:
"What do you think is the most important single-sentence of advice that you can offer to someone who wants to contribute to the free software community?"
He who does wins, so don't let the bastards grind you down.
"If you had the opportunity to say one sentence to someone who knows about computers and free software (EG they have used both Linux and Windows and done a small amount of programming) to convince them that they should join the free software team, what would it be?"
Imagine every bug you found could be fixed by you if you want, or a friend, or an enemy, or someone you hire, or the original developer, or whoever and that it's your choice who you ask to do it, with no veto from the copyright holder: that's free software.
The second sentence is a bit long, but I found it hard to encapsulate the power of that freedom in one. I use the bug example rather than costs or anything, because I think that's what will be most attractive to someone who has done a bit of programming: the right answer to "why can't I fix this trivial bug?"
Music Skill Share Day in Bristol
2007-07-05: Ben Green writes:
"All welcome to demo or watch, or get stuck in.
10am-4pm at the Trinity Centre Radio Studio BS2 0NW this Sunday 8th July.
Please bring laptops and pluggable linux compatible sound kit. Small sets of speakers an headphones also good. We'll have access to 3 AMD64 machines with 64Studio installed.
Please ask if you have any question, contact me through email or call Bristol Wireless to get other contact details, such as my mobile number.
Entrance to the trinity will be through the back door, please be patient once you have rung as it's a long way from the radio studio to the back door. Ooo, and it's free.
Cheers all, see you there."
(Seen on BBLUG)
Blender Tutorial in Norwich
Microsoft Office OpenXML (OOXML) - last few days
"Microsoft is currently submitting its Office Open XML (OOXML) format for endorsement as an ISO international standard using the "fast-track" procedure. BSI British Standards is accepting comments on the draft submission by 30th June
There are arguments and a petition on the <NO>OOXML website "
Go sign and comment!
While remembering that Google Code is a marketing campaign, I suggest that students try to get the money for three projects: GNUstep, KohaLib @ Lime and Debian - student applications closing date 24 March 2007.
BBC Radio 4, Wed 11 April, 21:00
Argh! It was a busy blog day (sort of catching up after the double-holiday weekend) and now a second late-notice item. (Don't get used to it - I'll be back to my usual slow rate soon.) I think someone mentioned this before:
BBC Radio 4: Wed 11 Apr, 21:00 - 21:30 30 mins
Paul Bennun finds out how Free and Open Source software is making its impact felt across the world, fuelling development and saving businesses millions of pounds. [...]"
Frequencies and more blurb are on the BBC site
Kris Marsh commented:
"Thanks for the blog, I'd never have known about the BBC4 open source slot otherwise!
Unfortunately I missed it, but I did notice that it's available on BBC's "listen again" feature "
So, what did you think of it? Post comments to my site or to fsfe-uk.
Free Free Software
Via BBLUG I've heard about
"a monthly public demonstration of Free Open Source Software (FOSS), aimed primarily at beginners. It's not specifically for Linux, as the software will be demoed on a WinXP system to lure people in ;) -- however, I will make some live linux distro CDs for the event.
Here's the details:
The second one will be on 26th May 2007 at the Cube Cinema, Dove Street South, Bristol BS2 8JS (Map), 1pm-3pm, and is hopefully a music one with a barbecue (weather permitting!).
Theora Herd Needs a Stairlift
2007-09-12 (Permalink): Trying to post the movies for Tour of Britain stage 2: Taunton left me in a whole world of pain. I'd decided to take movies rather than stills because there were lots of photographers there with considerably better cameras than mine, and my blog is far more popular for TV coverage than for photos.
My video camera is a four-year-old Nisis Pocket DV4 which appears as a usb-storage device and contains AVI files. Apparently, those AVI files contain Video as mjpeg, yuvj422p, 320x240, 9.04 fps(r) and Audio as pcm_s16le, 11025 Hz, mono, 176 kb/s.
I wanted to post the movies as Ogg Theora for various reasons, including how well it seemed to work for debconf this year. I'm a total clubie at this video stuff, but I like freedom and I've seen what I want, so I know it's possible.
First of all, I tried mplayer's mencoder. It seems that mplayer can play Ogg Theora, but mencoder can't encode it. Did I miss something? What's with that?
So, I tried installing VLC because several people had recommended it to me in the past. It seemed to have an easier interface than mplayer and had a wizard for converting files. Unfortunately, it seemed to crash on some of the AVI files and other times hang. When I upgraded from 0.8.6 to 0.8.6c (which also meant a wxWindows upgrade, which surprised me for such a seemingly-small upgrade), it crashed out with a segfault rather than hanging. I couldn't get the command-line to work either.
I tried ffmpeg, but damned if I can get that to produce a good theora (or is it libtheora?) file. Sometimes it works, but the output is much larger than I expected. It is very annoying that there are no releases, but at least there are snapshot tarballs available. I was trying export-2007-09-12 early this morning.
Finally, I tried ffmpeg2theora and (after upgrading ffmpeg), the command
"ffmpeg2theora -aq-1 -v 0 -o outfile.ogg infile.avi"
produced useful results, which I've now uploaded.
Thanks to BBLUG members for their comments. There seemed to be others who shared my confusion and frustration with video processing. Why is this still so hard? Is it, as one member suggested, the chilling effect of software patents and so on?
"Theora support has low priority in free software projects because it's simply a bad codec. It has been marketed as "patent-free" but it's questionable how true that is. The patents over trivial functionality probably cover it too, and on the other hand the real "inventiveness" and validity of the more actively enforced patents covering better codecs is also questionable. The main reason Theora users are unlikely to be sued is that limiting free alternatives to such low-quality codecs already ensures they're not a competitive threat.
If you want better free software encoding try FFmpeg or MEncoder with x264. The patent threats over that are more aggressive, but moving to Theora is not a good way to avoid them."
I'm not inclined to believe this for various reasons. In particular, I've seen good Theora results (higher quality for smaller file size than most), I've not heard of any credible patent threat to Theora and this claim was made anonymously (why?). Is anyone willing to support the above claims with their name?
Alex Hudson commented:
"Tangentially related to your Ogg woes, the issue of software patents came up recently on the WhatWG discussions for a new HTML tag called 'video':
Whether or not Apple's excuse is reasonable (submarine patents made more unlikely by existing licensing pools? Not sure about that argument....), it does seem Ogg faces an uphill struggle when you'd think supporting it is effectively no cost."
Steinar H. Gunderson commented:
"I've got no idea about the patent status of Theora, but I can agree with the technical assessment. Theora was supposed to be a superset of VP3 -- in practice it never progressed much beyond VP3. VP3 is roughly comparable to MPEG-1 in terms of sophistication, and it shows in the results.
I don't know what you've been comparing it to to get "better quality for smaller file size", but it's not my experience, and to top it off, it's really really slow, especially for the encoding part."
I was comparing it to the AVI files on the camera and doing a straight recode with the same geometry/fps settings to make it a web-sane file size.
Steinar H. Gunderson commented:
"That is a completely off comparison, for two reasons:
a) You are reencoding already encoded material, so the encoded version automatically picks up whatever artifacts were in the original. To make any sort of sane comparison, you'd have to make them from the same source.
b) The MJPEG codec in your camera is designed for low complexity and easy editing, not quality for a given bit rate.
The real competitors to Theora are codecs like MPEG-4 and H.264, not the MJPEG codec in your camera. That, and you'll probably notice Theora's slowness better the second you want to encode a DVD-like clip instead of 320x240 in 9fps. :-)"
I don't see why the re-encoding is relevant, because both the Theora and the AVI were re-encodings.
I'll try MPEG-4 and H.264 next time I upload a video clip, but it's probably going to be a long time before I'm encoding a DVD-like clip. My only probable source of one is a DVB card and then I might as well just save the stream directly, unless I really want to watch over the internet or something.
"Haha. Theora does not look good compared to other modern codecs, I am sorry. I've been to doom9 and saw side by side comparisions of video quality on a large number of codecs and theora came in dead last.
Here you can find some videos. In the action sequences it's pretty obvious that x264 and mpeg4 codecs do a better job. http://se2006.free.fr/Fun/Files/Compression_Video/test_codecs_videos.html
Anyways. If your interested in promoting free codecs there are two projects that deserve a lot of attention... Snow, which is a experimental 'play' codec from ffmpeg that's been around for a few years but has stagnated.. and then the Dirac codec from the BBC, which they are hoping to end up a Internet standard for streaming HD content.
Both are experimental with Dirac aiming for a real-world release.
Both are completely free software. Both have the potential to be higher quality then even the most modern codecs used in HD film.
If Dirac works out then it would be quit a big win for Free software.
That's not to say that Theora isn't any good. The reason it's good is because there is no company making money on it by restricting access through patents. That's a huge plus. But for adoption for people outside of the very pro-free software crowd it's just not going to happen.
Oh and I don't know jack shit about codecs.
ffmpeg folks kick ass also. They deserve a hell of a more credit then they get.. they are the ones that are making multimedia work on Linux! Without them we'd be screwed. Badly screwed."
ffmpeg have done well, but it's disappointing that they don't finish the job and ship. Real artists ship.
Fon goes wrong
2007-07-04: Last month, I looked at running a Fon Access Point. I've not done anything more because of debconf and work, and I've since discovered how to access another firmware upload interface on my F5D7630uk4A (double-click the reset button).
I see that some Fon users are moving their routers into lakes in protest at the 15-minute anonymous access offers from Fon.
Fon know their sales figures better than I do, but it seems like bad business to introduce that 15 minute free access. 3-euro for 24-hours was already far cheaper than competitors like The Cloud. Message board posters already noticed the loss of sales as people exploit the anonymous access. There's over 300 in the protest lake today.
I can't blame them - if your network gets abused for bad things like kiddie porn, the possible problems are terrible. I've seen innocent people punished for running insecure systems in the past.
One of the most disappointing things is that the Fon workers seem to be near-silent on this. A few sympathetic posts to the boards, but no official statement yet, as far as I can see.
So, I'll not be getting a Fon access point while this problem continues and it worries me for the future, but do you know of any alternatives?
Wondering about Fon Rangers
While I was in Paris, I used a FON WiFi Access Point a couple of times. The rate seemed very reasonable - EUR 3 for a day's access compared to £10 (EUR 15) per day for The Cloud - and I paid with some money that's currently trapped by paypal's incompetence (they wouldn't accept letters in a UK Companies House registration number).
I'm wondering whether to run a FON point. I've line-of-sight down the hill to a holiday park less than 400m away. If I aim a 6dBi directional antenna at it from inside a window, will it reach? Would the 2dBi built-in antenna reach the pub and shops 100m away? I used wifi while on a city break, but do people want internet while on a seaside holiday?
Fon has adopted Ubuntu as its preferred operating system and the CEO also wrote:
"Fon already is an Open Source company and our software is an Open Source project called http://www.openwrt.org and we should support other Open Source movements/companies"
which is a good cooperative viewpoint, in my opinion. I'm a bit troubled by its Skype, Paypal and Google promotions, BBC Panorama: Wi-Fi: a warning signal and Andrew Savory's Fon not so much fun but it seems like a good idea at the moment because it would save or make money and I'd finally have OpenWRT on a router. Are those good enough reasons?
Are there other options? What are they?
First look at OpenWRT
2007-03: Now, more on those network problems I mentioned - it looks like one device on our inbound route is hiccoughing and dropping packets. That royally screwed up a suboptimal OpenVPN and all VoIP traffic. I've changed some settings on the OpenVPN (made the various MTUs fit neatly, for example), but I'm still waiting for a response from the network engineers about the broken device.
While I was investigating, I discovered that the router really doesn't tell me much useful information, but it should be able to run OpenWRT - I think I'll try it because being able to sit on the edge of my network and watch the traffic going past would be helpful for debugging things
So, has anyone got tips/tricks/warnings about OpenWRT they'd like to share?
Part 2: OK, it's taking longer to find time to do this. The network is holding up this week and customers have work that needs doing urgently, so I've not risked bricking the router.
"i would try dd-wrt (dd-wrt.de) instead..."
"Install OpenWRT 0.9 (not "Kamikaze", which is a ground-up rewrite in pre-alpha). Install X-WRT to get webinf^2 (better web interface for configuration). Read the OpenWRT documentation on how to backup/restore your firmware. Make a backup once after you get everything configured, again before installing any major new packages, and again just before a firmware upgrade. The IRC channel is hit-or-miss but the forums are well-attended by knowledgeable people. Hope this helps."
Thanks. That's a great help. sebastian commented:
"Just saw your blog entry, you could have a look at X-WRT, which is an enhanced web configuration frontend to OpenWRT. ( http://x-wrt.org/ ) otherwise, they just plain rock (my opinion) ;-)"
Ben Finney commented:
"One warning I'd give is to make clear that OpenWRT happily sets up a 'non-free' repository source for its 'ipkg' package manager. This is necessary to get the Linux 2.4.3x module for most Broadcom wireless chips, and for 'nas' which is apparently needed for WPA encryption.
I vaguely recall someone announcing recently that free-software drivers were now available for most Broadcom chipsets, but that's likely only in Linux 2.6.x and may take quite some time to appear in OpenWRT."
I'm aware that I'm pretty screwed by the Broadcom chipset, but it's a step forwards from where I am. The reply:
"I'm not sure whether to hope for an improvement. Do you know if the Broadcom chipset on these devices is one that now has free drivers available? If so, possibly we could agitate for those drivers to be backported to the kernel used in OpenWRT."
I don't know, but I guess I'll find out soon.
Thanks for all the great comments so far, but now I'm not sure whether I want OpenWRT, X-WRT or dd-wrt!
Part 3: More comments, which I think help to narrow my choice to OpenWRT or FreeWRT. Kris Marsh commented:
"I can't comment on dd-wrt, as I've never tried it. I can, however, say that OpenWRT is great. Personally, I don't see the point in X-WRT, as I use vi and /etc/ to modify configs.
Assuming you're handy with Debian (;-)), then you should be just fine without X-WRT.
Tip: If you want to use WPA, you need to install the "nas" package: "ipkg install nas". I believe this non-free package is what a previous commenter was referring to."
Yes, I want to use WPA (I think some of the machines here can't do IPSec and WEP just isn't good enough) so I guess I have another freedom problem.
I'd be happy with ed, but I might try X-WRT just to see how it copes with my web browser (I expect badly, like many embedded web apps, but then I could file bugs or fix it up).
"There is also a OpenWRT fork named FreeWRT ."
Argh, another candidate! Seriously, thanks for the tip. I'm not sure what it offers me over OpenWRT, as FreeWRT doesn't list either my router (Belkin POS) or my office host system (gobo) as supported and I don't intend to install svn any time soon. I'll probably try its Web Image Builder.
"I believe Kamikaze has open source broadcom drivers (it's using 2.6). No idea if backport exists, but I'd venture no. Using Kamikaze sounds quite dangerous, but I haven't tried."
"Hi there. A few comments on your blog post:
The main reason why the free Broadcom drivers haven't been included yet is because they're simply not ready. The Broadcom SoC needs to be handled differently than the MiniPCI cards and I'm working with the bcm43xx on that. Actually the new 2.6 based port is almost complete.
As to which Firmware you want: As an OpenWrt developer I very much recommend installing X-Wrt on OpenWrt :)
Anyways... Have fun!"
Yes, this is definitely a "fun" choice! I guess I won't know what works until I JFDI and pick up the pieces.
Glad to hear the Broadcom drivers are still being worked on: I've met a lot of Broadcom cards and some of them can only be coerced with ndiswrapper, which isn't good. I wish I knew enough about network hardware to hack sensibly, but I don't know where to start and there's so much else to do.
"X-WRT is just an easier UI that installs over OpenWRT. DD-WRT is a competing project to OpenWRT, based on the OpenWRT code, but using such "free" software techniques as product activation, and per-seat licencing to stop you "misusing" your GPL rights.
I'd recommend OpenWRT/X-WRT, just because they tend to be more respectful of licences, and less prone to demanding money with menances."
I've no problem with commercialism itself, but I dislike broken promises and playing fast-and-loose with copyright. If there's evidence the other way, please let me know!
Belkin, I hate you so much right now
Reading up on the similar 7230 made it seem like it shouldn't be too hard, although the web interface won't take the firmware image, but I'm damned if I can persuade it to take a tftp upload of anything. I can see it bring the link up and down while rebooting. Anyone know how to get OpenWRT on one of these?
While messing about, I uploaded the latest Belkin firmware and that's improved network stability, but added a new problem. After the router has been up a few hours, I see a problem similar to this ipw bug and this madwifi bug but I'm using a bcm43xx (terrible card, by the way). The only way out seems to be reboot the router, rinse and repeat.
As I've noted before, I'm never buying Belkin again unless something changes. I've filed a technical support query - let's see if they can save themselves. Or can anyone help me get OpenWRT on it?
See also: OpenWRT Forum post.
I wrote sxw2text as a 5-minute email-helper hack some years ago.
Now I notice that there's also a version of sxw2txt in python on a French site, but it doesn't seem to do any checking at all, not even the minimal bit of my script.
Update: following more links, I found odt2txt.py which outputs markdown and is probably a better choice if you have python installed.
Comments are moderated (damn spammers) but almost anything sensible gets approved (albeit eventually). If you give a web address, I'll link it. I won't publish your email address unless you ask me to, but I'll email you a link when the comment is posted, or the reason why it's not posted.