Mon 05 Jun 2017 — Tue 20 Mar 2018

Terminals

A terminal is a thing which dials in to a mainframe.

You have one user per terminal.

But you may have multiple terminals per user.

I use xterm, more specifically unicode xterm or uxterm.

I also tried urxvt, but it was too annoying making sure it was supported everywhere.

Config

I configure uxterm using ~/.Xresources

Keys

I can look at these with xev or cat -vt.

The choice of Emacs or VIM key bindings belongs to the shell.

Alt

Default alt behaviour in xterm is to print a weird character.

This allows you to use it for commands:

xterm*eightBitInput: False
xterm*metaSendsEscape: True

Cursor Keys

Cursor key based commands are configured in the shell.

Capslock

I disable capslock using the following in my ~/config/.Xmodmap

I don't know how my .Xmodmap is called?

remove Lock = Caps_Lock
keysym Caps_Lock = Shift_L

Virtual Terminals

In modern computers, we don't dial in to a mainframe. Instead we have a program which imitates that.

There's no reason you need just one of these, so you usually get a load of them.

Ctrl+Alt+Fx for all the function keys let you switch between them.

You can log in to these as different users if you like.

Tmux

Terminal mutiplexing. Install on the computer you want to preserve a session on.

  • C-b is the prefix. It's used before other commands.
  • C-b ? lists keys
  • C-b % split panes vertically
  • srctext{C-b "} split panes horizontally
  • C-b z maximize/restore pane
  • rename pane
  • C-b d detaches the current session.
  • C-b D choose a session to detach.
  • C-b C-o rotates the panes.
  • C-b cursor move between panes