UI: options 'input' & 'output', defaults to ttys

Rebased version of #188