Index RSS

xterm configuration

This is more of a reminder for myself, but maybe it is useful for you too: On OpenBSD, it is part of the culture to use applications from base instead of from ports whenever it makes sense to do so. If you want something from ports: great, that is what they are for - nobody is shaming you! But we have a great base system, so you should at least take a look and see if it suits you.

For this reason, I am using simple xterm when on OpenBSD. I have used and still use fancier terminals like the one from xfce when on other systems, but I try to keep my OpenBSD more minimal and therefore more robust and more understandable. But I also need a little bit of comfort, so I found out how to configure xterm to be just that.

There are no deep secrets in the configuration here, but it is not trivial either: You must know the secret spells to get the desired effects. For me, I have the following in my ~/.Xdefaults:

! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
XTerm*loginShell:true
XTerm*faceName: spleen:pixelsize=24:antialias=false
XTerm*background: black
XTerm*foreground: linen
XTerm.vt100.translations: #override \n\
    Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
    Ctrl Shift <Key>V: insert-selection(CLIPBOARD)
XTerm*metaSendsEscape: true

The first two lines are verbatim from the template found in /etc/skel/. After that, I choose Spleen as my font and increase the size. I am working on a small (less than 15 inch) notebook and my eyes like stuff bigger nowadays. The color definition should also be plain and simple.

The first too-magic-for-me incantation is then configuring Ctrl-Shift-C and Ctrl-Shift-V to be for copying and pasting. I need this to be the same in all my terminals or I will go crazy.

Lastly, the second special ritual is XTerm*metaSendsEscape. I do not even remember exactly when I added it, but it allows shortcuts using the Alt key to function as I expect them to. I guess I stumbled over this when using neomutt, w3m or Emacs in the terminal?

That is it for the moment. I hope to get some more real articles out of me soon, but life finds a way to keep me away from it.