== Another building block of my environment: _rxterm_ Like many sysadmins using Unix workstations, I spend a lot of time running _xterm_s. Given that most of the time the remote X program I start with [[my _rxexec_ script ToolsRxexec]] is an _xterm_, it's no surprise that I wrote another script to automate all of the magic involved, called _rxterm_. Rxterm's basic job is to start an _xterm_ on a remote system with all of the right options set for it; for instance, so that the _xterm_ title and icon title have the name of the system that _xterm_ is logging on. Like _rxexec_, _rxterm_ has a number of options that are now vestigial and unused (but still complicate the code). (Some people set the terminal window title in their prompt. I don't like that approach for various reasons.) If this was all that _rxterm_ did, it would be a very short script. However it has an additional option that complicates its life a lot: '_rxterm -r _' starts an _xterm_ that is _su_'ing to root with my entire environment set up in advance (because you cannot combine xterm's _-ls_ and _-e_ arguments). Such _xterm_s also get a special title and are red instead of my usual _xterm_ colours. Setting up my environment is fairly complex, because the things I need to do in the process of _su_'ing to root vary quite a lot from system to system. On some of them I can just go straight to _su_, but on others I need to run a cascade of scripts to get everything right. Rxterm has all of the knowledge of which system needs what approach, so I don't have to care. (Every now and then I need to tell it another exception.) (In hindsight _rxterm_'s approach to this problem is the wrong one, but that's something for another entry.) Every so often I consider giving _rxterm_ an option so that it will start a remote _gnome-terminal_ instead of _xterm_. So far I keep not doing this because _gnome-terminal_'s command line options are so different and the code isn't designed to cope with that, but by this point _rxterm_ has so many historical remnants that I should probably rewrite it from scratch anyways. (My short shameful confession here is that I had forgotten most of _rxterm_'s arguments until I actually looked at the shell script in the process of writing this entry. Many probably don't work any more, and one actually has the comment 'Doesn't work any more? I lack the time to debug'.)