Life on the Console: Debian Squeeze
Perhaps you can come up with your own reasons for it, but running Linux on the console only is certainly worth the effort. For example, a lot of really fine hardware still runs fine, but painfully slow if you run any recent version of the X-server. In my case, it’s simply a matter of comfort and sanity. No one has to tell me I’m way out on the fringe of things, but I really don’t care for the way X and window managers work. I could say that about most GUIs I’ve tried on other operating systems, but that’s surely due in part to my use solely of DOS during my first five years of computer experience. While I hated the limitations of the 80×25 screen, everything else about it was quite comfortable for me from the user perspective. If the number of discussions on Usenet and various forums are any indication, I’m not alone in wishing more was offered for the Linux console.
Over the years, I’ve been keeping an eye on this, and tested the possibilities from time to time. That includes forays into BSD Land, but the framebuffer is very unpopular there. Regardless of what’s possible, what I need for my own use isn’t available without the framebuffer. A key element of promoting Open Source is freedom of choice. It has nothing to do with any inherent superiority from where I sit, but how closely it matches what I need. While specific needs do change, there has been an underlying collection of things I have wished for over the years. Recently, things have come together, and gotten my attention, and I’ve made the move.
For my purposes, this means running Debian Testing (“Squeeze”) on my Dell Inspiron 4100. Relevant specs are:
- 1Ghz P3
- Radeon M6 w/32MB VRAM
- half-GB RAM
- 20GB hard drive, DVD/CDR
You can find the official Debian installation guide here. Having tested a few of the daily build ISOs for Squeeze, I found I couldn’t get one that worked consistently, so I opted for installing Lenny and running an upgrade. In essence, it meant catching TaskSel, un-checking the “Desktop” option, and keeping the Base System and Laptop. Once the system was up and running, I used Nano to change all the references in my
/etc/apt/sources.list from “lenny” to “squeeze”. I also had to take out references to the Volatile Repository. Then I ran
apt-get update and
apt-get dist-upgrade. Once that was working, I added the “contrib” and “non-free” plus the Debian-Multimedia repository and ran
apt-get update and
By no means do I claim to be a geek. I’m not even a geek journalist, just a writer with a geeky bent. I’m much better with people than with computers, so my primary computer-related work has been helping ordinary people get along with their computers. For me, computers exist to serve people’s needs, and are otherwise not very important. I frequently advise people, if they can live without a computer, not to get one. Most of my computer use time is in research and writing. Most of what I write is about religion and social sciences, and only a little about computers and other technology. So I tend to learn only so much as I know I’ll use, and secondarily about things I find it useful to teach others. You need not be a genuine computer geek to make use of what follows.
One of the first things is getting the console set up. For my laptop, the native resolution is 1400×1050. To get all of that, I had to edit my
/boot/grub/menu.lst at the line which begins with
# defoptions and add
vga=834. Then, I added the console-setup package, which pulled in the marvelous Terminus console font. Once installed, you’ll need to run this command:
Accept the defaults, keep the UTF-8 encoding, but choose Terminus as the font, using size 16. Reboot and everything should be nice, with sharply defined text filling the screen out to the edges. I also personalize my login prompts. For my user account, I like cyan and yellow, with some indicator of where I am in the file system. You can learn more about that here. Here is what I have posted at the bottom of my
export PS1="\[33[0;36m\]\u@\h\[33[0m\]\w\[33[1;33m\]>\[33[0m\] "
Next, be sure you install GPM (
apt-get install gpm) if you intend to use the mouse at all on the console. Apt will set it up for you automatically. If you are using only a two-button mouse/touchpad, you’ll need to run
dpkg-reconfigure gpm, accepting all the defaults on each page, but on the last option type in “-2″ so you can use your right-click to paste.
A primary activity is web browsing. I typically use these three for different purposes: Elinks, Links2 and Lynx-Current. Installing Lynx and Links2 as-is works fine for my needs:
apt-get install lynx-cur links2 (accept the proposed dependencies by hitting “y”). However, I don’t care for the Debian defaults in Elinks, and the latest unstable release is actually significantly better. So after fetching the source for the unstable pre-release, I waded through the various standard dependencies (listed here) to see what I really needed. For example, I have no use for Lua, FSP, IDN, and a few others. However, I understand all too well about Spidermonkey, because way too many sites I use require a certain minimum of JScript, and Elinks is the only browser I’ve tried which implements the minimum. Even then, I’m locked out of a few places I don’t really have to use, such as Yahoo Mail. Aside from the “build-essential” package, I prefer OpenSSL over TLS (libssl-dev), and really wanted the mouse to work (libgpm-dev), and added in zlib1g-dev, libbz2-dev, libexpat1-dev, libkrb5-dev, along with whatever dependencies these brought. I configured it with this line:
./configure --enable-cgi --enable-gopher --enable-exmode --enable-html-highlight
When running Elinks, I typically prefer to select the black background as default (Setup > Options manager > Document > Default color settings > Background color = black, and Default color settings > Use document-specified colors = 1). The trick came in blogging. This applies to Blogger, WordPress and MyOpera. In Elinks, each of them is generally usable with varying levels of difficulty, but once you get past orienting yourself to the odd display, you find yourself using a pretty small block for text entry. Because the latest Elinks allows opening an external editor in all the tabs, I had to hunt down an editor which allowed soft-wrapping on the console. To my knowledge, only Vim does this right. The default method of passing off to an external editor is entering the text box, hitting enter to activate it, then hitting F4. I configured Elinks to use Vim by default (Options manager > Document > Browsing > Forms > External editor = vim).
Since I don’t write code, I really have no other use for Vim. I’m task oriented, learning only what I know I’ll use. I use it only for typing soft-wrapped text in the places where Elinks offers a text input. That I can have spell check on-the-fly is a bouns. So my
.vimrc has two lines, so far:
set wrap linebreak textwidth=0
This, of course, requires you boost the default installed
apt-get install vim-nox. Otherwise, the spell check won’t work, and the soft-wrap will break in the middle of words. The other trick is being patient with the odd cursor movements which come with soft-wrap, since each “paragraph” is treated as a single line, but with a visual-only wrapping. Of course, you can always use this Vim setup to write your longer posts beforehand, then when you get to that part of your blogging and hit F4, you can tell Vim to pull in that prepared file by, first typing
:r /path/to/file and then hit
ENTER. After that, you can have the file inserted in the text box by saving and closing Vim (
Another primary activity is email. I have five accounts I can use with any regular mail client. Mutt is almost as bad as Vim for complexity and learning curve. My old favorite Pine has now become Alpine, and it’s capable of running multiple account, all with POP and SMTP actions. However, it requires a little extra work in the setup procedure. It would be hard for me to write up any better this excellent guide. However, Debian’s build of Alpine blocks the saving of passwords. Carp all you want about security, but after reading the explanation, I’m satisfied it’s secure enough to suit my needs. So I rebuilt it from source.
This time, instead of plowing through the list of dependencies, I simply ran
apt-get build-dep alpine. When I tried that with Elinks, I got a ton of dependencies calling for major chunks of the X server system. For Alpine, that didn’t happen. So once I got the build dependencies, I pulled down the source package and built it manually. My configure statement looked like this:
./configure --with-local-password-cache-method --with-passfile=.alpinepwd
To get Alpine to save my passwords, I had to create the file first:
touch ~/.alpinepwd. The only other item I recommend is Alpine users check out the color highlighting options (Setup > Kolor). On the console, you should stick with the “use-termdef” selection at the top of the form, since I know of no way to get the console to recognize 16 colors.
For most of my standard text editor activity, I use Joe. This permits me to create text files with all the formatting features I need for plain text. For HTML files, the syntax highlighting is very useful. I can report installing Mplayer without X (
apt-get install mplayer-nogui) and the codecs package will allow watching videos on the console. I tested a MS-WAV file with “-vo fbdev” and it worked just fine. Sound will work if you fix a bug in the setup script. Sound and video aren’t really significant in my use, but I wanted to work it out for this article.
Finally, there are a couple of things I still wish to see in the future: a console word processor and a full-featured console browser. While the folks at Elinks are doing marvelous work, I have to wonder if there isn’t some way Firefox, WebKit, or one of their lighter versions can’t be ported to a console toolkit. I could care less if there is any hint of graphical rendering, as with Links2, or even pseudo-graphics (say libcaca), but the full range of JScript and so forth would really make a difference. Making it equally mouse-able on the console would be a major plus.
The word processor idea presents the paradox of having hundreds of supporters but no developers. I can’t count how often I’ve read or heard someone wishing for it, but nary a word from anyone among Open Source developers. I realize it’s quite a grand undertaking. However, even something like a clone of Lyx or TeXmacs would be a huge achievement. I’m guessing a major hold up is how to implement printing. For myself, even your basic character-based output would be enough for most purposes. I have no idea what’s involved in linking something like CUPS with a console-TUI word processor. However, anything at all would be much celebrated, even if only by a relatively small group. But if anyone wants a coordinator, PR and documentation writer, I’ll volunteer for those parts. I know for certain I can get the hosting for free. Why there seems to be not a single developer interested is something I can’t answer.
Welcome to the console. Unless things change dramatically, I’m here to stay.