At the console At the console

t’s hard to argue that Unix is anything other than a textual caring if they live on the console, within a A GROWING NUMBER OF RENEGADE GEEKS ARE environment. Commands are text-based and manipulate “ such as Ion2, or even on the information primarily as text. Human and machine readability wire serial-wise dialled through to some remote overlap with a clarity unknown to users of other OSes. So how is my user. Multiplexors such as GNU Screen and CHOOSING TO SHUN THE FULL-BLOWN GUI IN well do GUI “desktops” or desktop environments play with OS and managers of monitor real estate such as SplitVT this fundamental Unix approach? One could well envisage are less obvious examples here. Editors such as Isome kind of GUI which could follow the Unix model of pipes and Vi are clearer candidates, but GNU Emacs does FAVOUR OF APPS SUCH AS GNU SCREEN, GNU information flow, and there may well be such a project buried deep exhibit different behaviour under X. Lynx, , beneath the sludge of abandoned projects on SourceForge, but the its w3 and other such text-based, ubiquitous end result would still rely heavily on textual selection. browsers are essential items within the EMACS AND IN RARE INSTANCES A TINY WINDOW Unix-based OSes, particularly with an overwrought and in some device renegade text pistols bag of tools. Beneath ways elegant GUI such as Mac OS X do have a tough time integrating these can be found generic text and data the two approaches, and the command line is very much treated as a driver” manipulation tools such as sed and awk and MANAGER. MARTIN HOWSE CHECKS INTO THE tolerated, yet rather distant older relative. The default terminal app more domain specific and development biased seems clunky and washed out in comparison with the brighter, tools. scripts and the shell itself could also broader desktop. be blocked in at this level, and though under WORLD OF THE STRIPPED DOWN INTERFACE Thankfully GNU/Linux users do have a choice and a good many popular distros with KDE or GNOME defaults it geeks would rather exercise their command line chops at a healthy may be easy to forget such facts, text rules distance from the rodent infested world of the desktop GUI. Some throughout our hierarchy. Code is text, have even gone so far as to pay homage to the green screened days commands are text and information primarily is of their forebears, picking up an elegantly designed DEC terminal (see and should be textual in a human readable and DECed Out) and coding strictly from this revered beast over a serial thus open networked environment. line. Indeed, working in what some may see as a highly restricted manner, say straight from the console, can readily and quickly hone CONSOLING THOUGHTS Unix skills and familiarise users with the richness of the shell. Whilst ultra minimal window managers, such as THE Nevertheless, which ever way you pan it, and command line the appropriately titled , do offer the advocates can do a good job at selling even the most spartan app, best of both worlds for text pistols who may life at the console can get pretty claustrophobic with little wallpaper want to fire up the odd GIMP session once in a to brighten matters and a rather tiresome ctrl, alt and function key while, running barefoot with the plain old finger three step to further induce melancholia. Even comic fonts a console does appeal to purists preferring a totally la early Slackware, which could well be selected during one of the distraction free environment. Yet, unless you most exciting install moments, soon become tiresome. The GREEN SCREENED TERMINALS ARE THE STUFF OF MYTH AND HISTORY WITHIN HACKER CULTURE, AND MANY A DESCRIPTION OF MARATHON HACKING SESSIONS COMMENCES WITH A REFERENCE TO THEIR UNHEALTHY GLOW

advent of full framebuffer support for a range of graphics cards does change matters and can readily be Text pistols by way of the GIMP, tweaked , less and Ion2 window manager determined as a deciding factor in a stand off between console and ultra minimal desktop as environment of choice. With such a decision at the top of the tree in a hierarchy of components selected prefer a decidedly old school feel, handwritten to please the contemporary text pistol, we can begin to assemble a style font included, chances are you’ll wish to full roster of tools and tips. Choosing the role of X pistol or text console around in frame-buffer mode which pistol is a tough call. At the next stage down the hierarchy, this allows for smaller text sizes at higher resolutions. choice will impact on our toolset. Terminal emulators such as xterm Support for this essential mode, offering direct GOD SAVE GNU SCREEN. and rxvt make little sense on a real terminal. And framebuffer tweaks access to the graphics card memory, is enabled and minute console display apps are hardly at home on top of on most modern distros booting binary kernels, AND THE EMACS REGIME mighty X. Further down the line apps are reasonably generic, little or can be compiled into the kernel if you’re

44 LinuxUser & Developer LinuxUser & Developer 45 At the console At the console

It may not be pretty but such a sample does give a good idea of what mayhem the Mrxvt terminal emulator is capable of tiled and conventional floating windows are all available, and, in A good Far from being purely anecdotal, such common with a raft of other such hardcore projects, a rather novel historical considerations do impact on our architecture is implemented. In this instance, inter-process many humble eterms and . Unknown to many communication between heavily modularised window manager users the more or less ubiquitous xterm truly components is tackled by way of the authors own libixp, a virtual file geeks emulates a green screened forebear such as the system based intriguingly on the 9P protocol from Plan 9 OS. DEC VT220, VT102 or Tektronix 4014 models. Of course some would argue that wmii, with features such as would Thus to any text-based app such as Vi, the lowly fading through virtual desktops, and , particularly with the Ion2 xterm will appear and behave as if you had one iteration, go too far, and the developer of evilwm in rather double rather of these pleasant to use relics right at hand. edged terms does describe Ion as a less bigoted project. Ratpoison, Xterms rich history is readily apparent both ASCII Rocks. God save the Queen performance and Lisp-based brother Stumpwm boil the window manager recipe exercise across the vast man pages for this seemingly tiny video courtesy of artist group C505 strictly down to key bindings and tiling. Of course a logical next step their tool, and if you attempt to configure an xterm would be to run bare and naked without window manager support, by holding down ctrl and pressing one of the Ion2’s flexibility lies in tiling and tabbing, though few users will enjoy enough screen real estate to make the most of this example by way of an .xinitrc script or plain old command. command mouse buttons. A vast array of command line Yet even with such a stripped down, almost non-environment options control all aspects of an xterm’s look, feel dealing strictly with the source. which well rounds out an array of graphical console apps. Of course, choices do abound and this ever present attribute of free software is line chops and behaviour. The more or less identical Plentiful howtos exist for such a common operation, yet it’s old school and hardcore crews will already spurn such approaches, in both a blessing and a curse. A vast array of terminals, or, more .Xresources and .Xdefaults files can further worth remembering that both colour depth and resolution data must be favour of aalib, which can equally wrap up SVGAlib innocuously or correctly, terminal emulators are on offer under X, many boasting an at a override such settings, and the first file is used passed to the relevant bootloader by way of a decimal frame-buffer itself be wrapped as backend by ubiquitous libSDL. AVIs will never often confusing mix of legacy features and bloated novelties. You can when the window manager is fired up. Ironically code. A common option would be to specify vga=791 which allows the look the same, courtesy of the crack team of aalib and MPlayer. select an xterm, an eterm, an aterm, or even rxvt, a plain old healthy the xterm’s development dates back pre-Linux console to kick in at 1024x768 with a 16 bit depth. Some graphics apps, Classic films of certain genres rendered as high res colour ascii art are terminal, which is far from simple, and under KDE and GNOME and even pre X. The Xterm has spawned all such as basic image viewer fbview, or masterful multimedia tool MPlayer, well worth a second viewing. And just to put a new spin on the old feature packed offerings are also up for grabs. Terminal characteristics distance manner of progeny from both its code-base and can make full use of frame-buffer support, and Links, a pleasant web X11 versus console debate, why not confuse matters altogether by can be specified from the command line, menu bars and in some from the its feature set, and the authors of xterm do stress browser, which lives further down our tree of components, can render running an ascii aalib-based X server on top of GGI, XGGI running on cases floating arrays of icons. The range of contemporary terminal its emulation capabilities above all else. Other images direct to the frame-buffer. A range of libraries exist for an SVGATextmode tweaked good old console. KDE has never looked emulators on offer mirrors the sheer diversity of hardware terminals rodent terminals are not so exacting and few apps programmers to make full use of the frame-buffer without rehashing so good. abounding in the 70s which Unix and application developers had to demand such a high level of attention to detail. low-level code. Well documented for libraries such as DirectFB or attack. It was Bill Joy, creator of the Vi editor, who provided a long infested If you have little need for Tektronix emulation, oFBis, from the respected NoCrew team, should ensure a steady stream LESSER EVIL running solution, abstracting away the differing features and control you can always use an eterm, or one of its of apps. And, given that the very popular and incredibly easy to use SDL Such a preponderance of graphics-based apps on the console may codes of such creatures, with a generic interface plugged into a world of predecessors such as rxvt or xvt. Other terminals (Simple DirectMedia Layer) library, libSDL, can throw data at our lowly well have our text junkies running for cover, and quite possibly into database of terminal drivers known as termcap. It’s a single text file of note include Blurt (Bloody Lame Useless framebuffer, many apps which abstract graphics by way of this API the hands of a merciful window manager such as the well titled which is found under /etc on all GNU Linux systems today and this the Redundant Terminal), if only for its name, and should run well without a single thought of X11. evilwm, part of a large family of stripped down environments running vast catalogue does make for fascinating bedtime reading. Mrxvt, which packs in both the pseudo- Although true text pistols may frown on such distractions, a nevertheless on the dreaded X. Though GNU Screen and SplitVT, desktop transparency of aterms, and the tabbed terminal graphical login is possible at the framebuffer thanks to our flexible grappled with in DECed Out, decently multiplex screen space, the GUI capabilities of GNOME and KDE-based terms friend Qingy, which stands for Qingy is not getty. Various gettys overhead of X is not so great these days and such window managers without the need for library bloat or annoying unrelated to that famous family pop up with reference to the serial do afford a measure of transparency and elegance. Simple tiling of widget sets. Indeed, such a contemporary console (see DECed Out), but for now we can think of getty as sole windows is one bonus, minimal contextual information another, and terminal as Mrxvt, formerly known as Materm, handler of the login prompt. Qingy replaces getty with a pleasant under some environments floating windows can be used to good does put the humble xterm to shame, particularly graphical login screen which can thence fire up a customised console effect. Evilwm is a hot favourite in the latter instance with an absolute when it comes down to ease of configuration. Yet, which can even be altered across each tty or terminal. lack of window decorations perhaps pushing it ahead of fellow one patch worth applying if you do have the If frame-buffer support is unavailable, perhaps due to hardware or traveller Ion2 in the text pistols stakes. Indeed, Py-EvilWM, a port of xterm source does offer a moderate update. The compilation issues, there’s still little to stop our graphics hungry text this beast to highly extensible Python, could well be seen as going xterm-hyperlink-patch allows for double-clicked pistol getting a quick image fix. It may well be old and crusty, and head to head with Ion2’s flexible use of Lua. In either instance, text to be sent to any command. In this instance pack in a raft of demos which would well suit any retro ‘puter party, customisation, as with most smaller apps, is a breeze and customary the authors of the patch direct the text to a shell but SVGAlib is fast and fun to use. Plenty of old school apps make use key clobberings can be fixed with a few seconds effort. Ion2, which script which can sift out requests to all manner of of this easy to learn graphics display library which chucks data at a shares a certain text or type based and distinctly mouse unfriendly networked service. It’s a getty thing. Strangely titled Qingy offers graphical logins VGA card with wild abandon and a healthy disregard for local approach with evilwm and ratpoison, is a hot favourite, purely in right at the console, and can further customise terminals security. If you’re a fan of the instant hang or glitchy display crash terms of flexibility. By default, Ion2 within both tiled and floating ENOUGH OF X then a mis-configured SVGAlib really is a surefire hit. Nevertheless, window modes does offer some window decoration by way of a Once past the vexing X question it’s high time to configuration under /etc is not so tricky and a good number of cards contextual indicator such as xterm<1> and the like. Such behaviour tackle more carefree apps which little care where are supported. With the right options supplied to ./configure at can readily be altered, or indeed apps and xterms can be full screened they do their thing. And ed presents one such compile time, apps such as MPlayer will play well with SVGAlib. And with a simple alt and return two step. Ion2 is also highly configurable app which bothers even less about the user and compiling support into libSDL again means that graphical apps when it comes down to a vast army of keystrokes or shortcuts has strictly no idea about who or what is running exploiting this library should do fine on the console. GGI is another manipulating behaviour. And a grammar of tiles and frames which LIFE AT THE CONSOLE WITH CAN LITTLE GET PRETTYWALLPAPER TO it and in which environment it is called. Ed well option, aiming to unify access to graphics hardware. It started life as can attain some level of persistence with apps does make for flexible introduces the text pistols roll call of text editors an alternative to SVGAlib, but now floats above such backends or screen configurations. Wmii (Window Manager Improved 2) CLAUSTROPHOBIC and if anything can be relied on when targets, including the frame-buffer, and abstracts details of represents a recent addition to the family of minimal window administering a remote and unknown system, it’s implementation. On the SVGAlib side it’s worth mentioning zgv, managers with a feature set very much approximating Ion’s and BRIGHTEN MATTERS AND A RATHER TIRESOME that tiny ed is on board. Ed is also unusual in originally a neat SVGAlib only image viewer, but now supporting SDL, much touted as allowing for Vim, or Vi improved, interaction. Tabbed, CTRL, ALT AND FUNCTION KEY FINGER THREE being one of only two commands which feature STEP TO FURTHER INDUCE MELANCHOLIA 46 LinuxUser & Developer LinuxUser & Developer 47 At the console At the console

Newcomer, and highly experimental minimal window manager wmii may well outputting a rather blank ? to signal nearly every error. The give Ion2 a run for its money in the text pistol stakes mock man page lovingly reproduces a question mark and The sheer elegance of a flexible tiled and tab approach is aptly demonstrated by wmii expletive ridden sample user session and any newbie will be able to attest to the veracity of this example. Ed’s use of modes, which must be remembered and which change the functionality of commands is one such cause for cursing. Yet, ed is still firmly ensconced within the text pistols historic hall of fame. Indeed, our good friend grep is named after the command sequence used to similar effect under ed. Emacs users can well use ed as a stick to beat Vi or Vim (Vi improved) proponents, who in olden days would refer to that mega-meta-editor with a whole list of acronym standins. These included “Eight Megs And Constantly Swapping,” and “Eventually Munches All Computer Storage,” referring to the sheer binary and source size and memory footprint of that beast, and which really would have meant a good deal back in the day. In a fun way there was little love lost between the two as spoof man Text, text and yet warring camps, and it’s a commonplace these days to replace such more text. Free pages within the GNU collection software stresses flamefests with often ill thought out diplomacy. Vi, which is aliased to of hacker humour. As well as giving an idea of readable text above Vim on most GNU/Linux systems, is commonly considered as being all else, with code as ed’s extreme user friendliness, this witty fake truer to the Unix way of doing things in being good at one thing and Key Links text outrunning the man page exquisitely takes off all manner of bland executable one thing only. In this instance, that task is editing text with an ASCII Rock editor evangelism, with both Vi and Emacs emphasis on coding. On the other hand GNU Emacs does more projects.c505.com/projects/ascii_rock/mov/SP-godsavethequeen.mov camps well parodied. Yet, alongside the mooted things than you’d care to name and is wonderfully extensible and GNU Screen ubiquity, ed does have some things going for it, configurable. It’s a monstrous environment which can be quite www..org/software/screen SplitVT though describing ed as “the true path to overwhelming for new users. Yet integration is the name of the game www.devolution.com/~slouken/projects/splitvt nirvana” is far from the truth. Those who mock here and there’s little thus in contradiction with the way of Unix. The , WHICH DirectFB the bloat of Emacs would also do well to argument should rather be that Emacs takes away some if not all of a A GRAPHICAL LOGIN IS POSSIBLE AT QINGY www..org compare ed to their own chosen editor. Being a Unix-like OS’s functionality by offering pluggability with greater Qingy line-based, totally non-WYSIWYG editor which control. Indeed, a common hacker email signature file reads “Emacs is THE FRAMEBUFFER THANKS TO OUR qingy.sourceforge.net works with a buffer one line at a time using my OS and Linux its device driver.” There’s a lot of truth behind this SVGAlib simple keystroke commands, ed is easy to brazen cliche. The shell is perhaps too brittle, fine grained and with FLEXIBLE FRIEND www..org automate and does support complex text little in the way of state. Emacs is the non plus ultra of the true text- aalib substitution commands. It’s minimal to the point pistols hacking tools. Ignoring graphical versions such as default GNU STANDS FOR QINGY IS NOT GETTY aa-project.sourceforge.net/index.html of autism, with separate commands for showing, Emacs under X, or the XEmacs fork, Emacs is keyboard and text based aalib-based X server www.meow.org.uk/stan/xserver moving around in and replacing text, and in the extreme. Extendibility and customisation is by way of suitably Ion2 modeemi.cs.tut.fi/~tuomov/ion self documenting Emacs Lisp. Text formatting operates primarily evilwm under the expressive TeX text processing language. And all manner of God save GNU Screen. And the Emacs providing sufficiently low level access. multiplex multiple screens, or sessions, evilwm.sourceforge.net regime. Green screened terminals may well Yet as well as often proving troublesome onto the one terminal and it even allows text, more text and yet more text is available and processable ratpoison be the stuff of myth and history within to set up, with much getty grappling and for logging and advanced copying and through built-in browsing and mail capabilities, advanced information ratpoison.sourceforge.net hacker culture, and many a description of many minicom sessions involved, the sole pasting functionalities. You can even mangling facilities, directory editing functionalities, calendering and wmii marathon hacking sessions commences console approach of the serial terminal monitor plexed out and thus hidden wmi.modprobe.de with a reference to their unhealthy glow, does prove more than restrictive, and windows for activity. Heck, GNU Screen diary upkeep tools and much, much more. You’ll even be able to Mrxvt but the decent build quality of keyboard simply cries out for multiplexing, or at even lives a double life as a terminal check in with Eliza, the classic computerised shrink and ascii art materm.sourceforge.net and somewhat tranquil aura do make of least some tiling. GNU Emacs, packing in emulator of the good old VT100 variety, receives good attention. Advanced hypertext, rolodexing and ed such oft junked beasts a useful interface for frames, buffers and splitting of windows, and this does further complicate matters indexing functionalities extend GNU Emacs and such packages, which coders. DECs VT series, particularly the well does offer some escape from our as it must itself run under a terminal. www.gnu.org/fun/jokes/ed.msg.html featured VT550, is a particular favourite claustrophobic single screen, but in wider Screen is by now means easy to learn, with may now appear old-fashioned in the light of impending web Vim sporting Digital’s legendary minimal cream instances GNU Screen and SplitVT are somewhat terse documentation. With an technologies, still provide room for both productive use and satisfying www.vim.org DECed out styling. And in addition to the lure of this always on hand. GNU Screen is a hot exit route at hand, simply fire up Screen, experimentation. Hyperbole and the Remembrance Agent (Remem) GNU Emacs aesthetic, and a pleasantly quiet and pared favourite, even in combination with GNU hit control and the a key, Screen’s generic are two such intriguing apps. Remem is particularly unique in actively www.gnu.org/software/emacs/emacs.html down environment which makes for good Emacs for serious power users. GNU command combination, and then ? to see concentration, serial terminals do offer Screen well earns the title of window what’s on offer. Online tutorials can readily sifting through a user’s data, and suggesting within an Emacs buffer Remembrance Agent other benefits. With little configuration of a manager, and advanced functionality can be found for this incredibly versatile tool. coincidental or perhaps relevant material. Both are old school apps www.remem.org kernel build, and even some tweaking of readily be used to manage multiple And finally, if a junked serial terminal which well demonstrate the power of open text. In a future Hyperbole modern server BIOS, key messages which processes, attaching and re-attaching proves hard to find, you can run with plain www.gnu.org/software/hyperbole/hyperbole.html installment we’ll check out lower level apps for the text pistol’s toolkit, can readily assist in debugging can be these to specific windows. Sessions at the old Minicom, as emulator, on a Linux box, LTSP with particular attention to Unix power tools, and contemporary gleaned from the green screen. And terminal can well be detached, tucked or check out the LTSP (Linux Terminal www.ltsp.org plugging a long serial cable into racked up away and preserved for any number of Server Project) for larger deployments technologies which boost the green screen with a hotwire connection Text-Terminal-HOWTO servers is certainly easier than hanging a days, allowing for a good degree of which may well recall the good old days of to the semantic web. monitor off each machine, whilst still persistence. Screen can split screens, multiple VTs hanging off one clunky VAX. howtos.linux.com/howtos/Text-Terminal-HOWTO.shtml

48 LinuxUser & Developer LinuxUser & Developer 49