Articles / The Antidesktop

The Antidesktop

Over the years, I've used 4Dwm, Afterstep, Blackbox, Enlightenment, FVWM, Icewm, KWM, PWM, Sawfish, Window Maker, and wmx, and played with many other window managers. I used Window Maker more than any other, but generally would only stick with one for a couple of months before getting restless and trying something else. Finally, though, I settled on a setup I've used exclusively for over a year. It's decidedly not for everyone, but may be of interest to some.

Here's a screenshot of what I see after I type "startx":

Boring screenshot

Thrilling, no?

Let's go into what you're not seeing behind this simple facade.

The Components

screen

screen has long won my vote for "Most Undercelebrated Unix Tool". I'm amazed at the number of people I've met at LUG meetings who have never heard of it. I'll quote the description of it from our listing:

Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets).

When you log onto a system and run screen, a window is created with a shell in it. You can create any number of other windows and switch back-and-forth between them. screen stays out of your way unless you hit its control key (^A by default). "^A c" creates a new window. "^A n" and "^A p" move to the next and previous windows. "^A w" gives a list of the current windows and shows which you're in. "^A 3" moves to the third window, etc. ("^A a" gives a literal "^A".)

This is especially useful if, for example, you need to log onto your university's system and perform multiple tasks there. You can read mail in one window, chat on IRC in another, edit your project in other, compile it in another, etc.

Perhaps the best feature of screen is that it lets you detach and reattach sessions. When it's time to leave home, you can hit "^A d" to detach the session, and log out. All your processes will continue to run. Drive to school, log in, type screen -D -R, and your session will reattach itself, and you can continue right where you left off. Log out and go to class, and reattach there. Go over to a friend's house, and reattach there. You can have your text mode "desktop" running all the time, with everything laid out as you like it, and connect to it from anywhere, as GUI people do with VNC.

You can set your desktop up in your ~/.screenrc so you don't have to start all your applications every time. Mine looks like this:


startup_message off

screen -M -t root  0 su -
screen    -t mail  1 mutt
screen    -t emacs 2 xemacs -nw -e gnuserv-start
screen    -t irc   3 epic4
screen    -t yahoo 4 centericq
screen    -t mixer 5 aumix
screen	6
screen  7
screen  8
screen  9
screen 10

select 1

If I don't already have a screen session running, all I have to do is type screen, and my 11 windows are created for me. I'm dropped into the first one so I can read my mail while my other apps start in the background, log me onto IRC, etc. Depending on your needs, you could have other windows tailing log files (and monitoring them to alert you to activity (-M)), logging you on to other servers, etc.

screen has a huge feature set. It can log windows to files, can split a session between multiple terminals, will let you copy and paste between windows using only the keyboard, and is rumored to be surprisingly effective against the heartbreak of psoriasis. Just take a look at its man page or info documentation to get an idea of its scope.

ratpoison

Now that you understand screen, we can talk about the window manager which unobtrusively displays itself in the screenshot above, ratpoison. ratpoison is:

... a simple window manager with no large library dependencies, no fancy graphics, no window decorations, and no rodent dependence. It is largely modeled after GNU Screen, which has done wonders in the virtual terminal market. All interaction with the window manager is done through keystrokes. ratpoison has a prefix map to minimize the key clobbering that cripples EMACS and other quality pieces of software. All windows are maximized and kept maximized to avoid wasting precious screen space.

As screen handles text windows, ratpoison handles GUI windows. Each window is the same size, the size of the screen. There are no title bars, no minimize buttons, none of the clutter that's needed by a mouse. Mozilla looks like this:

Mozilla

You can do fancier split screens to make several applications visible at once:

Three apps at once

, but I don't bother. I want each program to have all the room it can.

ratpoison stays out of the way until you hit its control key (I set it to ^O because "a" and "o" are next to each other in my keyboard layout). "^O w" gives me a list of the current windows. "^O 1" takes me to the first one. "^O ^O" switches me back to the one I used most recently. "^O n" and "^O p" take me to the next and previous ones. "^O k" closes the current window. "^O !" brings up a prompt in which I can type a command to start a program; I find "^O ! cbb" to be much faster than hunting through menus.

As you would expect, ratpoison is lightning fast and perfectly stable.

Applications

My main application is a gnome-terminal running screen. I use gnome-terminal because it's easily configured to use good fonts, a bright color scheme, and no scrollbar, menu bar, etc. Looking at it over my shoulder, you'd think I was running at the console instead of in X.

I put as much of my activity as possible into this single gnome-terminal. Often, I'm running nothing but this, Mozilla, and maybe XMMS (which I only use because I'm too lazy to find a console MP3 player which deals well with my lousy fixed-rate sound card).

I do almost everything in console apps. EPIC4 and centericq handle IRC and instant messaging. mutt handles my mail. The amazing w3m is used for most of my freshmeat work, as it's infinitely better-suited than Mozilla for dealing with text on the Web (typing in Mozilla can't compare with the ability to dump text from a textbox into a real editor for processing). Both use XEmacs[1] through gnuclient. gnuclient allows me to call the already-running XEmacs on screen 2 to edit some text. Using the same XEmacs session over and over again leads to several good features. For example, the kill and yank ring continues across sessions. I can kill text from a text box in w3m, switch to mutt, start a message, and yank the text into the message.

Advantages

Why have I settled into this system, and what benefits do I gain from it? I take advantage of the best of both the X and console worlds. I get the graphical abilities of X without all the clutter that usually attends it, and I can work much more quickly and with less strain on my hands because I don't have to use a mouse.

Simplicity

At any moment, my screen is devoted to only one thing. As I type this, all I see is XEmacs showing this buffer. Since I can only see what I'm working on at this moment, I have to make the choice to go to something else. I can't be distracted by text in an X-Chat window behind this one, or by buddies appearing and disappearing in the Gaim window in the corner. If someone messages me, centericq will play a sound; I don't need to watch IM obsessively. If I'm distracted, it's because my mind is distracted by a thought of something else, not because of a flash of color in the periphery of my vision.

Since there's nothing to tweak, I'm not tempted to endlessly fidget with my windows and reconfigure my window manager, moving this window a bit to the left and that one to desktop two instead of four. I don't get bored with a theme and spend 45 minutes looking for a new one.

Clarity

Every application takes up the entire screen, and I can use large fonts to reduce eye strain. Mozilla has the full width and height of my screen, and if I have to scroll horizontally, it's the site author's fault, not mine.

Flexibility

When I'm home, I do all my work on my laptop, which runs as an xterminal connected to my more powerful desktop machine. I like being able to move the laptop from place to place. The desktop's monitor is only used for watching DVDs.

Since all my processes are running on the desktop, if something goes wrong with my laptop, I can reattach my session on the desktop and go on working. Since I don't rely exclusively on GUI applications, if something goes wrong that prevents me from running X, if I'm placed in an environment in which I can't run X, or if I want to persist in my untested but heartfelt belief that not running X saves battery life, I can be happy with the console.

When I leave home and run my laptop independently, I use the same X system on it. Before leaving, I turn off mail delivery and run a script that rsyncs /var/www and /home/jeff to the laptop. I detach and go. If, while I'm on the road, I want to check the status of a job I left running at home, I can ssh back and reattach my home session. When I get home again, I turn off mail delivery on the laptop, rsync back to the desktop, reattach the desktop session, and push on.

Stability

Given the choice, ratpoison would run forever. I don't worry about my window manager locking up, crashing X, or displaying random strange behavior.

More importantly, it doesn't even matter if X does take a dive. All my applications are still running in screen. I can hit ctrl-alt-bksp, run startx again, type screen -D -R in gnome-terminal, and the session will reattach. I can go on like nothing happened.

In fact, it doesn't matter if the whole computer shuts down. Sometimes, I don't notice that the cat has knocked the laptop's power cable loose again[2], and suddenly see it suspending to disk. No problem; I bring it back up, reconnect it to the server, and reattach the screen session that's happily continued to run there all the time.

If a tree falls on the server, my processes will go down with it, but I can't help that. There has to be some point of failure, eventually.

Obscurity

I won't call it genuine security that would protect from a malicious attack, but there is an element of obscurity to the system that can protect from a friend who wants to play a practical joke when I walk away. I keep xlock on "^O x", but even if I step away from the keyboard without locking it, someone stepping in tends to be confused by a screen that shows no "close" buttons and a keyboard set to Dvorak.

Conclusions

The desktop metaphor has its place. It may even be essential for people who don't want to understand what's happening beneath their computer's GUI surface. If you do know how to use your computer without pointing and clicking, consider that you have the option to dispense with the metaphor, and may find yourself more productive if you do. You can have the ability to run all the graphical applications you need without the clutter of a root window full of icons hidden under layer upon layer of windows.

This isn't for everyone, even among the digerati. An artist may have a genuine need to have several windows of images in view at once. For someone like myself who works in text, I find it an excellent system. If something like this would be a good fit for you, I hope you've found this description useful.

In closing, I'll admit to a certain impish glee in putting this article in the themes area of our articles section. In a sense, it belongs because it's a description of how I "theme" my desktop. In a more legitimate sense, it should be thrown out because there is no "desktop" in my system, and nothing to theme. Try to troll gently in the comments.

Footnotes

  1. Ummm... Why not just Emacs, if you're not using its GUI mode anyway? I used to use VM to read mail, and there was a time when the then-current version of VM would run on XEmacs but not Emacs. I switched, enjoyed the color support on the console (not a feature of Emacs at the time), and just never got around to switching back.
  2. I don't have a comment on this; I just don't like having only one footnote.[3]
  3. There, that's better.

Recent comments

10 Nov 2007 19:29 Avatar miketcoulson

Very Nice
Nice article, Jeff!

I have been using a frighteningly similar setup for about three years.

Ratpoison has truly stood the test of time as a viable window manager

for mouse-less computing. I have found that an Emacs and Ratpoison

X11 session suits all my needs as an alternative desktop environment

and window manager combination. Using the keyboard exclusively,

without a doubt, is considerably faster than having to frequently

reach for the mouse.

Unfortunately, on those occasions where I find myself working with any

other setup (on my wife's or parents' computer), I am decidedly

miserable. I fumble about with the mouse and inadvertently type

prefix keys to no avail. To me, that is a tribute to how a setup like

this can become second nature despite an initial counterintuitive

learning curve.

22 Aug 2007 11:30 Avatar mikes1

Your antiwindowmanager artical
Hello- this is interesting and different indeed. You didn't come from a "Windows" background since you were a VM user. I think IBM got everything off of VM about a year ago. I'm not so sure that was such a great idea !? I used to say Windows was an OS for the illiterate. Work is work, and play is play. I still think the working world works best with menu's, but i do not own a business so who cares. I had to fire up NetTerm on my laptop to eyeball the VT100 emulation. I don't remember it being a DEC thing, and memory is getting worse! Nice artical, so how did you get the WiFi console connection from laptop to desktop? Tanx, mike

21 Apr 2007 03:27 Avatar wbxv

Re: hate that mouse


> If there were a modern gui browser with

> vim-like key bindings I'd be in heaven.

Hi, have you tried vimperator (http://vimperator.mozdev.net/)?

vimperator is a firefox extension that makes it behave like vim. It is modal, and allows most of the key bindings. I tried it a few weeks ago, and was able to do all my normal browsing without touching the mouse. I ended up removing the extension after a few days though, as I'm just too used to mouse browsing now.

08 Apr 2007 07:44 Avatar agentultra

hate that mouse
I use gnome + Ion3 for my desktop.

It does have a float environment for those pesky apps like The Gimp. It also has a system for windows that are asking for attention -- a simple text notification appears in the top of my current frame and I can jump to the requesting window with Alt-k-k... handy for using Gaim. I can take advantage of it's features, but keep it off screen and get to the message when I'm good and ready.

I just wish there were fewer apps that required a mouse. I don't mind using a GTK app at all if it has sensible hot-keys; but there are things like text-selection that are rather difficult in apps like Firefox.

... speaking of firefox, I also use the "Mouseless Browsing" add-on. Very handy.

If there were a modern gui browser with vim-like key bindings I'd be in heaven.

Anyway... it's been a rather natural progression to Ion3 for me. I started using the mouse for most things on a GUI wm... until I found the hot-keys to do things faster. Then I'd find most of the hot-keys and find it much faster than using the mouse; but would still be forced to use it for some tasks. Then I had enough and wanted something that used the keyboard exclusively.

It's much easier to keep your hands in one place on your desk. It's also faster to type what you want rather than hunt and peck with a pointer. I loathe to think of all the times I mistakenly performed some action because I "missed" with my mouse and clicked something else by accident. Almost never happens with Ion3 (except maybe when managing frames on-the-fly. You can split horizontally or vertically; but I haven't figured out how to do more complex operations like splitting two windows in a frame into two frames).

Either way; good article. I hope to see development in this area continue. I'm certainly a fan of a good interface. The desktop metaphor is just too cumbersome and slow after a certain critical level of understanding is reached by the user.

20 Dec 2006 06:21 Avatar Theimprover

Re: Add my vote for screen
You may add my vote to yours.

Screenshot

Project Spotlight

Kigo Video Converter Ultimate for Mac

A tool for converting and editing videos.

Screenshot

Project Spotlight

Kid3

An efficient tagger for MP3, Ogg/Vorbis, and FLAC files.