Lost Technologies of the Linux world

Linux (and Unix in general) has a long and (imho) interesting history. It’s always evolving, always continuing to change. However in the rush there are some interesting things that things that have been buried and all but lost. Some of these are abominations that should have never ever seen the light of day (eg, gets(3)), but many of them were a good idea that’s got lost somewhere along the way, and often naively reinvented and all the knowledge that was gained the first time around has been lost.

I’m not saying that all of these technologies should be revived wholesale, many have been buried for good reason, but there are lessons to be learnt here. I refer to Linux and glibc here since thats what I know, much of this applies equally to any Unix.

Lets start with the fact on a modern Linux system you’d be hard pressed to realise that the GUI is network transparent. There is no dialog box “Run [application [v]] on host [hostname [v]] as user [username [v]].” Yet it was very common 10 years ago to be running xterm’s on a variety of boxes, executing cpu intensive commands on machines with cycles to spare. Today people are surprised when you explain that you’re running your web browser on a machine thats seperate to the machine you’re logged into. X11 doesn’t work well over high latency links I’ll admit, but over a local network it’s nearly impossible to tell that even a heavy application like a word processor isn’t running locally. Theres none of the blocky loading like you get with VNC. Yet this is becoming less and less well known.

Thin client Xterminals would speak “XDMCP” to query for which machines were the least loaded for you to login to. You could select from a list, selecting ones that were lightly loaded, but contained the resources you needed to get your work done, and being thin clients it didn’t matter which mchine you used. The support is all still there, but mostly disabled by default because of network security issues, a story that repeats itself further through the article.

Because there were only a few of these big machines, everyone would be logged into them. Commands like “ps” and “who” would show you what other people were doing. Since there were probably multiple computers around you could use rwho(1) and rusers(1) to find out where someone was logged into. You could talk to any user that hadn’t disabled it, with write(1), or talk(1). People would write blog-like entries in their .plan which you could read with finger(1). Contrary to popular belief, Mirabilis didn’t invent “Instant Messenging” in 1996, Mirabilis just made a limited form what Unix users had been doing for years available to non-Unix users. (No possibility to be logged into multiple places, no .plan/blog, having to run a seperate program to announce your presence, no rwall(1)) Almost all of these protocols have been disabled as being insecure, and have never been reimplemented in more secure ways.

rcmd(3) is still a function in glibc which allows programmers to run a command on an another machine. While rsh(1)/rexec(1)/rlogin(1) have all been replaced with ssh(1), rcmd(3) has never been upgraded and remains a forgotten relic from when the Internet was a more trusting place.

Unix machines have always been multiuser boxes, although with the rapid increase in computing power in PC’s, this is becoming less common. Unix machines have files called utmp(5) and wtmp(5) that log who’s currently logged in and who has been logged in, in the past. These files are nearly forgotten, and rarely are even written to unless someone opens an xterm(1). The sense of community that went with using a large multiuser system has disappeared.

It’s not just the community orientated commands mentioned above that made Unix machines truely part of the network rather than boxes that just use the network. With yp/NIS/NIS+ you could trivially enable large groups of machines to share critical databases with ease. Not only were passwd(5), shadow(5) and group(5) shared, but other information like services(5), networks(5), hosts(5), ethers(5), rpc(5) and probably others were also copied. To enable this you’d edit one or two lines and everything was set, extensive customisation was possible via netgroups. Compare to a more “modern” LDAP setup which requires a lot more effort to setup and maintain. Once again yp/NIS/NIS+ were horribly insecure, and LDAP at least can deliver it’s data securely over SSL, but is LDAP really an improvement?

You could tell a well administered network, as every machine had an up to date, and useful /etc/networks and often a useful /etc/ethers too. However it’s been years since I’ve heard of anyone even mention these files. Now days hosts(5) is mostly used as a kind of weird outbound firewall to prevent software talking to hosts you don’t like.

Networked file systems are also another interesting part of the story. NFS is remarkably easy to setup under Unix, it integrates well. It supports the unix semantics well, and with newer versions (eg NFSv4) supports running over a single easily (un?) firewalled port and avoiding the reliance on UIDs being identical between multiple machines.

Then there are other really interesting things that have gone on in the space like Kerberos and AFS/Coda. It’s a pity that they’re not quite so nicely integrated as YP/NIS/NIS+/NFS etc.

Old command line applications such as ftp(1) and the various r* tools supported netrc(5), a file that could contain usernames and passwords as well as aliases for machines and even would support macros to run. Programs such as curl(1) and wget(1) still support this, but this feature is rarely if ever used, and I’d doubt would be implemented in many new applications.

In fact, most config files were executable, or scriptable in some way. When you logged into a machine various scripts would run which could determine based on all kinds of criteria how to configure your setup. You could decide not to use the high colour wallpaper on the old machine that only had 256 colours (oooh! flashies! remember them?), you could dim the colours your window manager used if you logged in after dark. Your $PATH could be setup based on hardware platform, OS version or even if directories existed or not. Window manager menus would be tweaked based on if this computer had a two or three button mouse, or may decide between several different programs depending on what was installed. A “Run Xterm on…” menu might be populated from /etc/hosts.equiv. Because the majority of users prefer not to program a lot of this kind of functionality has been removed. Now if you use the same config from multiple computers you’d better aim for the lowest common denominator.

You used to be able rely on every machine being able to store mail locally, all kinds of programs still look in $MAIL to check if you have new mail. Programs used to assume they can send you email if they had something non urgent to tell you. Mail clients would check the local mail spool for your messages. Anyone remember having bash(1) tell you that you had new mail?

The current trend with SOAP and XMLRPC is also amusing, given that glibc still contains all the sunrpc xdr encoding systems. These are solved problems. ASN.1 is another encoding scheme thats been around for ages. Neither appears to have any real problems (other than they don’t have standardised methods of passing them over HTTP, although that’s perhaps more a feature than a bug). Yet people still insist on reinventing them.

There are other weird features in libc that are there for one reason or another strfry(3) and memfrob(3) being amusing examples. Other examples include hsearch(3), lsearch(3), tsearch(3), insque(3), dbopen(3) etc… None of these as far as I’m aware are part of any standard.

X11 has had several other interesting ideas that have been often overlooked. Window managers were always extremely extensible, and supported all kinds of interesting features. Virtual Desktops and Workspaces are something that everyone has needed to support to be even considered (and I really wish the other OS’s would pick up. I really feel cramped without my virtual workspaces!). Lots of interesting things have been done with window managers that are being slowly forgotten. Focus follows mouse is about as close to “focus follow eyes” as you can get vs Click to focus’s “is it safe to click on that part of the window right now or will that cause something to execute now?” issues. Meta-LeftClick to raise, Meta-RightClick to bury, Meta-RightDrag to resize, and Meta-LeftClick to move all being fairly standard, but modern window managers are starting to ignore. Window Manages

X has a “resource database” which has a standard config for everything. Want to change the font size of some random little bit of text? Easy. Want to change the colour of something? Simple. Want to make all your xterms use visual bells? These are per X server (”Display”), and thus applications running remotely will pick up the local styling, even if your /home is not shared between the two. However modern toolkits ignore that,

On the flipside modern desktop “environments” are doing really well at looking really pretty (ooh! cubes!). however you can find lots of people using window managers that are eye burningly highlighter blue because they support the way they work.

There have been some great ideas in unix that have been discarded for one reason or another, and often even “reinvented” with all the lessons of the past doomed to be reinvented.

(Postscript: In editing this post to link all the stuff I wanted to link I realised I could have used a regex(5) to link all the manpages, but my browser doesn’t do regex searches let alone regex search and replace! Why the hell not?!)

Leave a Reply