Skip to content

Instantly share code, notes, and snippets.

@girst
Created October 26, 2016 13:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save girst/2487fe72728d354834b2be35f6fb04aa to your computer and use it in GitHub Desktop.
Save girst/2487fe72728d354834b2be35f6fb04aa to your computer and use it in GitHub Desktop.
#!/bin/bash
# run this script form the vt220 to set up terminal width, keyboard shortcuts and other stuff.
stty rows 24 cols 132
export TERM=vt220
export LANG=en_GB.iso88591
# vim: `:set termencoding=iso88591`
echo -en "\eP1;1|17/5B\e\\" # Shift+F6 = [
echo -en "\eP1;1|18/5D\e\\" # Shift+F7 = ]
echo -en "\eP1;1|19/5C\e\\" # Shift+F8 = \
echo -en "\eP1;1|20/7C\e\\" # Shift+F9 = |
echo -en "\eP1;1|21/40\e\\" # Shift+F10 = @
echo -en "\eP1;1|23/7B\e\\" # Shift+F11 = {
echo -en "\eP1;1|24/7D\e\\" # Shift+F12 = }
echo -en "\eP1;1|26/1B\e\\" # Shift+F14 = ESC
#!/bin/bash
# run this to launch a console on the vt220
[ "$(id -u)" != "0" ] && {
echo "Run as root.">&2
exit 1
}
# disable SELinux
setenforce 0
# start getty on USB0
agetty -h -8 -L ttyUSB0 19200 vt220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment