== Another building block of my environment: _sshterm_ I am unreasonably fond of running X programs remotely; it's always struck me as one of the niftier bits of X, and I like to use it as much as possible. But even I have to admit that it's not always the right answer, and thus sometimes [[my _rxterm_ script ToolsRxterm]] isn't what I want. For those times I have another script, which I unimaginatively call _sshterm_. Sshterm is the direct inverse of _rxterm_; instead of using ssh to run a remote _xterm_, it uses a local _xterm_ to run _ssh_ to the remote machine, with some trimmings. Because this is a lot simpler a job than _rxterm_ has, the script is a lot shorter, but it does have a few important features that complicate it a bit. First, it puts the remote machine's name in the _xterm_ title so that I can tell my _xterm_s apart (although many shell environments immediately overwrite the window title anyways, the behavior is not yet universal). Next, it turns the _xterm_ red if I am _ssh_'ing to something with 'root@' in the hostname, just like how I have '_rxterm -r_' set up. Finally it has an option to run _gnome-terminal_ instead of _xterm_ (and makes everything work just the same with it). (It turns out that there are a certain number of things that just work better in a UTF-8 _gnome-terminal_ environment than in my plain _xterm_ one. Usually these are programs that try drawing elaborate text graphics, such as certain Debian and Ubuntu package installation tools.) In theory _sshterm_ accepts a _-r_ argument, just like _rxterm_. In practice I never use it and instead just tell _sshterm_ to connect to 'root@wherever' when I want to be root somewhere. In a sense _sshterm_ is a silly command; it's not very difficult to start a terminal window and then type _ssh_ into it. But in practice it's been one of those little lubricants that make things enough easier that I use it all the time, because it handles all of the little fiddly details for me. === Sidebar: on marking 'root (terminal) windows' I have a personal twitch where I want all windows where I am root to be clearly visually distinct, so that they instantly stand out when I look at them (even if I'm vaguely distracted). Some people use the shell prompt for this (and I do to a certain extent), but I find that this doesn't stand out quite enough for my tastes, so many years ago I arranged to make the foreground text be a pretty strong red in such windows, instead of my usual black. In theory one could probably do this with _xterm_ escape sequences. In practice I do it with _xterm_ command line options, which has the drawback that it doesn't work in windows where I started out normal and then _su_'d to root later. Fortunately I don't do that very much, especially with tools like [[my _rxterm_ script]] around. (_gnome-terminal_ has no command line options to control the foreground text colour. Instead you have to create a new profile with a different text colour and then use a command line option to set the initial profile.)