January 2000 Column

[ Site Index] [ Linux Index] [ Feedback ]

Skeletons and closets

Linux, and the loose clade of related UNIX-type operating systems it is a member of, aren't a religion, but tend to attract enthusiasts the way -- no, I'm not going to go down that mixed metaphor. Once in a while I feel it's worth reprinting one particularly choice piece of advocacy. Sometimes it even surfaces in advertising copy -- usually a sign that the company in question has gotten seriously carried away.

Here's one I found while grubbing through a pile of mummified computer magazines:

"Learning from minicomputers: until a few years ago, minicomputers offered little of relevence to microcomputer users. With the recent rise to prominence of UNIX, one of the minicomputer world's most popular operating systems, microcomputer manufacturers are beginning to look hard at minis. Microsoft's own version of UNIX, called Xenix, is the only UNIX now available, tailored specifically for micros. Microsoft has added many basic features omitted by UNIX's manufacturers, and has announced the product with menus and mouse interfaces for example, for the micro user. Xenix also arranges its files differently from conventional micro operating systems, and it looks as though the Xenix filesystem is catching on with micro manufacturers. Apple's new ProDOS for the Apple IIe and Apple III uses a similar system, as does a forthcoming OS from Dragon. Apple and Tandy as well as UK microcomputer companies, Tycom and Plessy, have gone for Xenix on their newest machines. With the Tandy model 16 and Apple's Lisa both running Xenix, it looks like being as successful on micros as it is on minicomputers."

This advert ran in the now-defunct magazine Practical Computing on page 149 of their January 1984 issue (Volume 7 issue 1). I think it's rather sweet and, like those embarrassing baby photos that parents always feel compelled to show off to their children's fiances, I felt it deserved to be passed around. (Back then Microsoft was a baby too: they only had about fifty employees, and were so poor they couldn't afford to hire a PR company to write their advertising copy.)

Actually, this little piece of history probably bears some responsibility for Linux existing. Barely a year after this advert was published, Microsoft were becoming increasingly disillusioned with Xenix. They had to pay AT&T a royalty on every copy that they sold: not a huge royalty, but nearly as much as the retail price on a copy of MS-DOS. With the administrative overheads involved, it meant they couldn't price it cheap. So Microsoft sold the rights to Xenix to a small, starving consultancy company called The Santa Cruz Operation along with a promise that they'd never compete in the UNIX market, in return for some shares in SCO. (This was probably the worst deal Bill Gates ever made.)

SCO mushroomed rapidly, becoming the main vendor of UNIX operating systems on Intel hardware. But they couldn't break into the desktop market (where Microsoft remained dominant) because of those horrible royalties, which meant they ended up paying AT&T and Microsoft and other companies US $100 out of the retail price of $3-400 on anything they sold. Simply put, they couldn't sell it cheaply enough to compete.

It was just this pricing problem that led an impecunious student called Linus Torvalds to write a UNIX-like kernel on his PC back in 1992. As a result of writing that kernel, Linus became famous and was headhunted by TransMeta Corporation, for whom he now works. (TransMeta is owned by Paul Allen, Bill Gates's partner in founding Microsoft: but I am not James Burke, I'm not going to follow this connection any further, and anyone writing in with ingenious explanations of why Linux was really the fault of the Bavarian Illuminati will be ignored.)

Anyway, I find it amusing to recall this early example of UNIX-for-the-masses advocacy whenever I see Microsoft desperately trying to explain why you shouldn't trust that wobbly, unreliable, unsupported Linux stuff. As they are doing now, for example, with a web page devoted to countering myths about Linux -- and by extension UNIX, for Linux is the fastest- growing sector of the UNIX industry today. Microsoft are quite correct in most of their assertions; for example, Linux indeed doesn't have an industrial- grade journaling filesystem. It will have one with the release of kernel 2.4, some time later this year, probably before Windows 2000 goes on general distribution -- and this overlooks the fact that NT doesn't come with a journaling filesystem as standard -- but Microsoft are quite right to highlight this important deficiency. At least, for the next two or three months ...

Trusting Applications

Getting away from Microsoft (no! really!), this month we bring you a honking great whistle-stop tour of applications packages that run on Linux. One thing that's conspicuous by its absence from that feature, however, is politics. Politics? Yup. Applications like spreadsheets and word processors are actually a deeply political issue in the Linux world.

Thing is, most computers aren't purchased on the basis of the operating system they run: they're purchased to run applications. These may be bespoke in-house custom-written stuff, but more often it's something like a word processor, spreadsheet, or web browser. To a small company or individual, the preferred package will be whatever the user is familiar with: and they've got purchasing power. To a big company, however, the preferred package will be whatever the managers of the IT division are familiar with. Marketing muscle sells: if your IT director thinks company X is the bee's knees, they'll pay through the nose for company X's products even though company Y makes something better and cheaper. That's because the cost of commercial software doesn't relate to its usefulness (as anyone who's paid a pound for a copy of a formerly- expensive package developed by a company that's gone bust knows), but to the purchaser's perception of the company's ability to deliver support and add value in future. If the IT director has heard of company X because they're big, the IT director expects them to deliver support in future -- and companies have to worry about maintaining their systems in the long term.

Now we come to the goat in the yard full of sheep: Star Office. Star Office, developed by a German concern called Star Division, is a Microsoft Office clone. Microsoft Office is the #1 integrated office package, period: regardless of how it got to that spot, or whether it's a good thing that it's in that spot, everyone has to be able to read and write Office files and interoperate with it to some extent. Star Office lets a Linux, or Solaris, or OS/2 system do pretty much all of that, and it did it cheaper than Microsoft Office, too. Then Sun bought Star Division and released Star Office as "community source" freeware -- not true open source (Sun retain control of it and you're not allowed to make money off it without paying them a cut), but open enough that you can patch bugs for them or port it to new systems.

Sun's purchase of Star Office seems to have been motivated by two urges: to give UNIX (and Linux) users one less reason to boot a Microsoft OS, and more importantly, to get their hands on the Star Portal technology. Since 1997, Star Division have been muttering about (and even demoing) a Java-based implementation of Star Office. The idea is that you can point your network computer (or other Java-enabled gadget) at a server with a copy of StarOffice on it, load the Java application, and run locally, saving your files on the server. Star Portal may or may not turn out to be Java-based, but it's certainly designed to deliver the second half of this promise -- saving files on a central server. Sun are in the server business, hence Star Portal looks like a good bet for their future. Other people are doing this: Microsoft have taken fright and announced their own product, and meanwhile Applix have got Applix Anywhere, and meanwhile (if you have a PC running Windows) you can get an interesting glimpse of the future at www.desktop.com.

Is it such a good bet for Linux users, though? I'd say yes -- with some very strong caveats. Star Office is a very handly tool to have around, especially if you work in an environment where people keep mailing you Microsoft Office documents. Having it for free is a bonus. But there are drawbacks. Firstly, Star Office is not free software within the strict meaning of the Open Source definition. You can't do anything you want with it; Sun released it under their Community Source license and retain, ultimately, all rights to it. Sun could, if they wanted, tell you to stop using it, or change the license terms to a commercial basis. Get too dependent on StarOffice and you may be vulnerable to Sun's moods -- exactly the same trap people who use proprietary software are caught in. Secondly, open source alternatives such as KOffice should be turning up very soon, providing an excellent, functional alternative to what is basically a clone of a very bloated product. Do you really want to become dependent on a product which is being promoted by Sun because it is a tool for hurting Microsoft's market dominance, rather than on the basis of its own merits?

This is a bit of a puzzler, and I don't have any firm answers. In the meantime, though, I'm using StarOffice -- but then, I paid for a licensed copy back before Sun decided to release it as freeware. In effect, I got caught in a variation on that post-bankruptcy price crash ...

Pocket fun

A few months ago I spent some column inches talking about PDAs, personal digital assistants, and how they work with Linux. Here's a much closer look at one PDA in particular -- the Psion Series 5MX (and its close relatives the Psion Revo, the Series 7, and the NetBook).

When it launched back in 1997, the Psion Series 5 was pretty useless to the hardcore Linuxer. Its connectivity options all assumed you were running Windows 95, there was no way of exchanging files with applications running on Linux, and so on. But things have changed since then, and the 5MX (or its younger sibling, the Revo) is already a handy peripheral for a Linux system. Here's a Linux-centric look at the Psion ...

For starters, the Series 5MX has double the memory and is twice as fast as the Series 5. It has a smooth, non-peeling case. There are other changes under the hood; notably a new operating system version, better power management, and extras the original needed badly. In addition, there's a lot more useful software for it these days.


Back when the Series 5 was new, the only ways to get data on or off the beast was via serial cable and Xmodem/Ymodem transfer, or via a CF card and PCMCIA adapter if you had a laptop or a desktop PC with PCMCIA reader.

Today, things go a lot more smoothly. For starters, CF cards are cheaper. A 32Mb card costs well under seventy pounds, including postage and tax; and with a PCMCIA adapter you can slot one into any laptop with PCMCIA support and mount it as an MSDOS filesystem. A CF card looks just like an IDE hard disk to the Linux PCMCIA drivers. This is just about the fastest, most convenient transfer technique between a Series 5/5MX and a laptop; but even if you can't get PCMCIA support working or don't have a CF card, it's possible to move files about.

The first solution is the NCP protocol stack for UNIX. NCP is the Psion networking protocol. (See: web site). The NCP server user interface is rudimentary but workable and includes an ftp-like client that you can run on a UNIX system and connect to your Psion and get/put files.

A second solution is to use p3nfs by Rudolf Koenig. Originally written for the Series 3, p3nfs provides a "fake" NFS server on the UNIX side and a simple file transfer application on the Psion; this makes the Psion look like an NFS-mounted filesystem to your local UNIX system. It's designed to integrate with the excellent NFSD terminal application on the Psion 3 -- there's no equivalent for this on the Series 5, just a rudimentary OPL program to handle the file transfer requests.

If I had to argue the toss I'd say that the NCP kit for UNIX is better; you don't have to install extra software on the Psion, and sustained throughput at 115200 baud is quite achievable. (However, P3NFS is the better tool for use with older Psion Series 3 machines.)

File formats

Two years ago, Psion seemed to think that everybody who could possibly be interested in the Series 5 would have easy access to a machine running Windows. For this reason, they didn't release native file format translators; all the import/export filters are built into PsiWin, the Psion-supplied comms system (which provides NCP support under Windows).

The situation today is, however, better than it was in 1997.

Firstly, a project is under way to reverse-engineer the Psion file formats. For a number of reasons this isn't a simple job; notably, EPOC/32 doesn't have files as such, but a mechanism for persistently storing objects containing a mixture of code and data -- with other objects embedded in them.

The first fruits of the PSICONV reverse engineering project can be found at http://huizen.dds.nl/~frodol/psiconv/. There's a UNIX-based tool for converting Psion Word files into HTML, and documentation on the Word and Notepad file formats. The converter has a separate front-end and back-end; it may well be possible to build a Word-to-RTF export filter using this code. In addition, another freeware file format converter is being developed by Neuon. Going the other way will be a bit harder, but in principle it should now be possible to write a library for generating Psion documents on UNIX.

Secondly, Psion have released the whole EPOC-32 development kit via their EPOC World developer's website. Included in the release is a whole slew of documentation and utilities, including the source to Word and documentation and methods for manipulating the EPOC/32 RichText object. You need a Windows box running Visual C++ to use this kit, but the materials are now available to write native import/export filters for Psion Word. Meanwhile, work is in progress on building a Linux- hosted development toolchain for the EPOC-32 system. As EPOC-32 relies on gcc (the GNU C++ compiler), this isn't quite as impossible as it may sound.

All of this means that my earlier criticisms of the Series 5 as being a closed box, designed as an appendage for Windows, are partially invalidated. It's still not easy to move documents from the Series 5 to a UNIX system and back, but it is at least in principle possible.

Text Editors

One thing I depend on is a text editor -- it's the one application I use 90% of the time. To this end, two useable editors are available: DSTEdit and Vim.

DSTEdit (from Makesure Services) is an unassuming programmers' text editor that has the unique feature of being native to the Psion Series 5. It has another rare feature: rather than operating on individual files, it works on groups of files, bundled together as a textgroup. You create a textgroup document, add files to the group, then switch between files in the group freely. This isn't a true project or make replacement, but it does have some advantages insofar as it lets you treat a group of files as a related project. DSTEdit supports all the basic file editing options and integrates with the Psion's spell checker; my only disappointment with it is that it lacks support for regular expressions and there's no automatic word wrap setting.

Vim needs no introduction; it's the granddaddy implementation of the vi text editor. A preliminary port of Vim to EPOC/32 can be found here; it has none of the GUI accessories and built-in language interpreters of the main Vim ports, but it does the job. (Vi is hard-wired into my fingertips -- I wrote a vi user's guide more than eight years ago -- and if this port was finished it would be my automatic #1 choice of text editor.)

Of the two editors, DSTEdit is commercial -- you'll need to register it in order to use it -- but complete. The Vim port is promising and is free, but is not yet fully usable; it works, but isn't integrated with the Psion OS at all (you'll need a command-line shell to start it up), and relies on a development release of the CURSES library port which is extremely slow. When the Vim port is finished it will be my editor of choice (of course!), but until then I'll have to rely on a registered copy of DSTEdit for my day to day work.


One thing that Psion Software has done right recently is to release the EPOC32 development kits for free download from EPOC World (http://developer.epocworld.com/). It's still tied to a Windows NT 4.0 or Windows 95 development host (with Microsoft Visual C++ as an environment), but they now seem to view fostering third-party developers as an important strategic move rather than a profit centre -- rightly so.

Even if you don't have access to a Windows system, it's worth downloading the OPL developer's kit. The documentation is provided in PDF and HTML formats, and there are copious examples and some OPX's. I'm currently working my way through the book "Programming Psion Computers" (available from the publishers, EMCC) with an eye to writing something useful, sooner or later.

I'm not really an OPL programmer; I'm a Perl mangler. If you're into Perl, too, you may want to look at Perl 5 for the Psion 5 (and the port of the Psion C++ development toolkit to Linux). Perl for the Psion is still a work in progress, lacking support for a whole range of useful things (some of which, like sockets, should be possible). Coupled with a decent shell and the port of Vim, it should be possible to port most of Tom Christiansen's PPT project to the Series 5. PPT is a cool idea; re-implement most of BSD UNIX's command-line utilities in pure Perl, so that you can have a UNIX-like command line environment with text editor, perl, and the usual utilities -- while enjoying full access to all the EPOC/32 applications at the same time (which you simply can't do when you're running Linux). Alternatively, something like PPT would be a handy add-on for the Shell5 command-line shell; this shell lets you implement external commands in OPL, and a bunch of common UNIX utilities would come in handy.

Miscelaneous utilities

EPOC/32 on the Series 5MX comes with a fair bundle of utilities. However, there's always something else you find yourself needing. My list of indispensible tools (not already mentioned above) looks like this:

About the only thing not on this list yet is Linux for the Psion Series 5. Psion made some fairly extensive changes under the hood when they brought out the 5Mx, Netbook, Series 7, and Revo machines. In particular, the ARLO boot loader (needed to boot Linux-7110) doesn't work any more. In due course, Psion are expected to release a new development kit and the necessary documentation to let the Psion Linux team get the boot loader working again; in the meantime, if you want to run Linux itself on your Psion, you need to have an old Series 5 or Geofox One (a Psion clone). A shame. I was kind of looking forward to running the world's smallest Apache-hosted web site ...

[ Site Index] [ Linux Index] [ Feedback ]