Another building block of my environment: xrun

February 18, 2011

Sometimes I use a machine so often that tools like pyhosts and dmenu just aren't fast and convenient enough. For instance, I do most of my work on one of our login servers (which one doesn't matter), so with my habit of disposable windows I am forever opening and closing terminal windows and so on.

My main tool for dealing with this is a simple program called xrun (which was originally written by Mark Moraes). Xrun puts up a grid of text labels, each of which is clickable; when you click a label, it runs the associated command. You define the labels and the commands that they run. This probably sounds abstract, so let me show you a picture:

Xrun window

(This deliberately includes the window manager decoration, because it's part of the overall interface; the window title tells me what machine this xrun is for.)

By itself, xrun would be only a modest convenience boost, so the important thing is how I run it. I don't run xruns on my workstation; instead, I use my rxexec script to run each xrun on the server it's for with my full environment initialized. Effectively I get new terminal windows as fast as if I typed 'xterm &' from an existing window on the machine, because this is pretty much what is actually happening.

One of the interesting side effects of this is that I can still start new terminal windows even when normal logins to the machine are blocked or broken (during system shutdown, for example). This is periodically useful and sometimes misleading.

(These days you can get a lot of the same effects by using multiplexed SSH connections. I don't think it's quite as fast, although on modern hardware you'll probably never notice under normal circumstances.)

Comments on this page:

From at 2011-02-18 06:12:09:

Where can I find the source for xrun?

By cks at 2011-02-18 13:33:55:

I thought that Mark Moraes had publicly released xrun, but I can't find a public copy and the source code I have access to doesn't have copyright release statements; I'll write Mark and ask.

However, it should be essentially trivial to do a close duplicate of xrun with something like TCL/TK or TkInter (for Python), especially if you're willing to hard-code various things.

Written on 18 February 2011.
« My latest crazy plan to upgrade my home Linux machine
My view on window titlebars and when they are good and bad »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Fri Feb 18 01:06:31 2011
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.