A day without X

Would you be able to survive one full day without using the X server? Linux offers us a wide assortment of CLI based tools which use curses and/or framebuffer for functional user interfaces. There is no reason why you shouldn’t be able look up stuff online, read your email, look at pictures, watch movies and listen to music as you are trying to configure X.

I was inspired by this post on Motho ke motho ka botho and decided to compile a list of useful command line applications myself. I will break them down into categories so that we can cover all the bases. If I’m missing something, or if I omitted some cool applications please let me know.

Web Browsing

The biggest problem in living without X is web browsing. You will be limited to text browsers, which generally do not support CSS and do not play nice with AJAX. The good news is, that most of the AJAX heavy web-pages now have mobile versions which are surprisingly text-browser friendly.

There are quite a few text browsers out there but I will recommend one:

Elinks [elinks.or.cz]

Why elinks? Because it supports both frames and tables, displays nice colorful output, and works great with mouse. Of course you can also use Lynx, Links, or w3m but in my experience elinks beats all of them hands down. Here is how my page looks in Elinks:

Screenshot of Elinks

There also seems to be a framebuffer browser out there called Zen but it is a bit unstable no longer in active development.

Email

If you are a gmail user like me, you are in luck. Google has a javascript-less version of their interface which actually works beautifully in elinks:

Gmail in Elinks

Neat, eh? For everything else there is Mutt:

Mutt [mutt.org]

Mutt

I previously covered Mutt several times, showing you how to set it up for IMAP and how to send out emails without full blown sendmail or exim setup just using basic SSMTP. There is also Pine which is a damn fine mail client too – if you can deal with editing your messages in pico.

Chat

Chatting without X is pretty easy. It depends on what you are into though. For example, if you are a GTalk user I can recommend the excellent Freetalk which I covered before:

Freetalk [gnu.org/software/freetalk]

Freetalk

If you are on AIM, then naim will probably be the tool for you:

Naim [naim.n.ml.org]

Naim

Naim is a little bit funky but once you get used to it just works. It also supports ICQ and IRC protocols. Of course if you want full blown IRC support, there is probably no better client than irssi:

IRSSI [irssi.org]

IRSSI

It is a bare bones but full featured client. I don’t use irc that much, so I can’t tell you how good it is, but it seems perfectly functional – especially if you are a hard core irc junky.

Reading RSS

If you are like me, you subscribe to way to many RSS feeds. Unfortunately neither Google Reader nor Bloglines works in elinks (or for that matter any text based browser) so we have to rely on local clients if we want to survive without X. I recommend raggle:

Raggle [raggle.org]

Raggle

Raggle has a clean and intuitive interface, is fast and takes up almost no memory. Perfect for a day without X. Go ahead, import your OPML file using a command line switch, and give it a go. You can also try Newsbeuter.

Btw, that feed list in the screenshot is the default set you get after installation. My feed list is way bigger. ;P

File Management

When you are not browsing, chatting, reading feed or writing emails you probably move around files on your hard drive. Midnight Commander will make this task easier with the classic Norton Commander like interface:

Midnight Commander [ibiblio.org/mc]

Midnight Commander

You young whipper-snappers probably have no clue what Norton Commander was – but I grew up on it. Whenever I use MC I feel nostalgic for the good old days.

Viewing Images

So let’s say you are living your one day without X and someone sends you an awesome picture. For example it might be a picture of a cat with a caption (ZOMG! Invisible bike!). Or maybe it’s one of those demotivational posters. Hell, it can even be some dancing bunnies!

So what do you do? You open it with a framebuffer image viewer like zgv of course:

ZGV [svgalib.org/rus/zgv]

I have no screenshot for this one because you can’t run it in X, but I can confirm it works. So you will never be without your cat macros!

Watching Video

Sure Luke, but how do I watch my p0rnz you ask? I haven’t personally tested it, but it seems that both Mplayer and VLC are capable of framebuffer output. How well do they actually work in that mode – beats me. Maybe at some point I will test them out, but at this point I don’t have any solid recommendations beyond that.

Text Editing

If you use Linux, you should already have a near religious attachment to a text editor that can be used without X. There are essentially 4 kinds of Linux users: vim/vi users, emacs users, users who can use both editors, but neither of them well, and n00bs. And guess what – if you think that you don’t fit in any of these categories, you are a n00b. Personally – I use both, but I’m more familiar with vim than anything else. Here are my recommendations:

VIM [vim.org]
Emacs [gnu.org/software/emacs]

Playing Music

The fact that you are not running X should not prevent you from listening to your favorite t00nz. Cplay is a lightweight audio player that is perfect for our X-less day:

Cplay [mask.tf.hut.fi/~flu/cplay/]

Cplay

If you struggling with it, there is an awesome overview of cplay here.

Btw, you can always control your audio volume with alsamixer (if you have ALSA, and you probably do – you have alsamixer installed).

P2P

Luke! I has no Toonz! How I get some without X?

Well, it’s easy my friend. You can do it with rtorrent1:

RTorrent [libtorrent.rakshasa.no]

RTorrent

It’s yet another nifty curses application with negligible memory footprint. RTorrent can easily compete with the windows based uTorrent for size and memory. Unfortunately it is somewhat counter intuitive using Emacs like key bindings. The learning curve is a bit steep, so here is a nice primer to get you started.

Window Management

Yes, you heard me right – window management. The fact that we are not using X does not mean that we can’t have windows. Twin is a nifty curses app which will open sub-terminals inside a curses environment:

Twin [twin.sourceforge.net]

Twin

Twin actually stands for Textmode Window Environment which is exactly what it is. As you can see from the screenshot, it will allow you to have elinks, mutt, raggle and essentially any other application I mentioned here today open on the same tty. How awesome is that? It removes one of the very annoying issues that we face when working without X – the inability to have multiple “windows” open on the same screen-space at the same time.

Will I actually attempt to survive a day without X? Maybe I will at some point. And if I do, I will definitely blog about it, and tell you about my experience. But it won’t be today because I actually have some relatively time sensitive work to do. ;)

Maybe we can all try this together? Let’s set a date (preferably on the weekend so we don’t struggle at work) and let’s try to survive a day without X. Let’s make it an annual linux geek holiday or something. :mrgreen:

1 – I neither endorse nor condone downloading music. If you are downloading legally, then more power to you. If you are sharing without permission – make sure you don’t get caught.

Note:

If you want to translate this text, please go ahead as long as you give me credit and link back to this post. This work is published under Creative Commons, Non-commercial, Share-alike license.

Update 05/22/2007 10:10:11 AM

Y HALO THAR Digg users! Thrilled to have ya here. :mrgreen:

[tags]x, a day without x, curses, ncurses, rtorrent, cplay, twin, elinks, raggle, vim, emacs, zvg, mplayer, vlc, midnight commander, mutt, freetalk, naim, irssi[/tags]

This entry was posted in sysadmin notes and tagged , . Bookmark the permalink.



201 Responses to A day without X

  1. Pingback: Spend a day without X | Anas Ismail khan WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *