Terminals
Terminal
- https://en.wikipedia.org/wiki/Computer_terminal - an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system. Early terminals were inexpensive devices but very slow compared to punched cards or paper tape for input, but as the technology improved and video displays were introduced, terminals pushed these older forms of interaction from the industry. A related development was timesharing systems, which evolved in parallel and made up for any inefficiencies of the user's typing ability with the ability to support multiple users on the same machine, each at their own terminal.
The function of a terminal is confined to display and input of data; a device with significant local programmable data processing capability may be called a "smart terminal" or fat client. A terminal that depends on the host computer for its processing power is called a "dumb terminal" or thin client. A personal computer can run terminal emulator software that replicates the function of a terminal, sometimes allowing concurrent use of local programs and access to a distant terminal host system.
- Text-Terminal-HOWTO - This document was originally written for real text terminals which were like monitors (with keyboards), but could only display text with a command line interface (no pictures). They were widely used to access mainframe computers in the late 1970's and 1980's but use of them declined in the 1990's and they are seldom used anymore. However much of this howto also applies to command-line interfaces on Linux PC's which are in wide use today. It's not about the user programs one might run on the command line, but about setting up, managing, and understanding the interface itself Such as using a monitor as a virtual (text-only) console, using a text-window in a GUI such as xterm, connecting to a remote computer over a network via ssh, telnet, etc., or even using software on another PC to turn it into a serial-port text-terminal. All these 4 methods are known as "text-terminal emulation". But unfortunately, the main emphasis in this howto is real text terminals and the coverage of emulation is inadequate for the first 3 methods of emulation mentioned above. The Keyboard-and-Console-HOWTO filled much this gap but it was written for Linux 2.0 and now needs rewriting (or merging into this Text-Terminal howto). A new author is needed that has time to do all this. For the seldom used real text-terminals, it explains how they work, explains how to install and configure them, and provides some info on how to repair them. This HOWTO also provides a brief overview of modern GUI terminals.
- https://en.wikipedia.org/wiki/Terminal_capabilities - various terminal features, above and beyond what is available from a pure teletypewriter, that host systems (and the programs that run on them) can make use of. They are (mainly) of control codes and escape codes that can be sent to or received from the terminal. The escape codes sent to the terminal perform various functions that a CRT terminal (and software terminal emulators) is capable of, but that a teletypewriter is not; such as moving the terminal's cursor to positions on the screen, clearing and scrolling all or parts of the screen, turning on and off attached printer devices, programming programmable function keys, changing display colours and attributes (such as reverse video), and setting display title strings. The escape codes received from the terminal signify things such as function key, arrow key, and other special key (home key, end key, help key, PgUp key, PgDn key, insert key, delete key, and so forth) keystrokes.
- https://en.wikipedia.org/wiki/POSIX_terminal_interface - the generalized abstraction, comprising both an Application Programming Interface for programs, and a set of behavioural expectations for users of a terminal, as defined by the POSIX standard and the Single Unix Specification. It is a historical development from the terminal interfaces of BSD version 4 and Seventh Edition Unix.
- http://linux.die.net/man/1/stty - change and print terminal line settings
Control characters
- Standard ECMA-48 - This Ecma Standard defines control functions and their coded representations for use in a 7-bit code, an extended 7-bit code, an 8-bit code or an extended 8-bit code, if such a code is structured in accordance with Standard ECMA-35.The control functions are intended to be used embedded in character-coded data for interchange, in particular with character-imaging devices.
- https://en.wikipedia.org/wiki/C0_and_C1_control_codes - or control character sets define control codes for use in text by computer systems that use the ISO/IEC 2022 system of specifying control and graphic characters. Most character encodings, in addition to representing printable characters, also have characters such as these that represent additional information about the text, such as the position of a cursor, an instruction to start a new line, or a message that the text has been received.
- ASCII Characters for MPE Users (control char info)
- https://en.wikipedia.org/wiki/Escape_character - a character which invokes an alternative interpretation on subsequent characters in a character sequence. An escape character is a particular case of metacharacters. Generally, the judgement of whether something is an escape character or not depends on context.
- https://en.wikipedia.org/wiki/Escape_sequence - a series of characters used to change the state of computers and their attached peripheral devices. These are also known as control sequences, reflecting their use in device control. Some control sequences are special characters that always have the same meaning. Escape sequences use an escape character to change the meaning of the characters which follow it, meaning that the characters can be interpreted as a command to be executed rather than as data.
- ctlseqs(ms) - XTerm Control Sequences
Capacities
- https://en.wikipedia.org/wiki/Terminfo - a library and database that enables programs to use display terminals in a device-independent manner. Mark Horton implemented the first terminfo library in 1981-1982 as an improvement over termcap. The improvements include faster access to stored terminal descriptions, longer, more understandable names for terminal capabilities and general expression evaluation for strings sent to the terminal.
- http://linux.die.net/man/1/toe - table of (terminfo) entries - With no options, toe lists all available terminal types by primary name with descriptions. File arguments specify the directories to be scanned; if no such arguments are given, your default terminfo directory is scanned. If you also specify the -h option, a directory header will be issued as each directory is entered.
/usr/share/terminfo/?/*
# Compiled terminal description database.
- http://linux.die.net/man/1/tic - the terminfo entry-description compiler. The command tic translates a terminfo file from source format into compiled format. The compiled format is necessary for use with the library routines in ncurses.
- infocmp - compare or print out terminfo descriptions
- http://linux.die.net/man/1/captoinfo - convert a termcap description into a terminfo description. captoinfo looks in a file for termcap descriptions. For each one found, an equivalent terminfo description is written to standard output. Termcap tc capabilities are translated directly to terminfo use capabilities.
- http://linux.die.net/man/1/infotocap - convert a terminfo description into a termcap description. infotocap looks in file for terminfo descriptions. For each one found, an equivalent termcap description is written to standard output. Terminfo use capabilities are translated directly to termcap tc capabilities.
- tset / reset - terminal [re]initialization
Hardware
- The Blit: A Multiplexed Graphics Terminal
- https://en.wikipedia.org/wiki/Blit_(computer_terminal) - was a programmable bitmap graphics terminal designed by Rob Pike and Bart Locanthi Jr. of Bell Labs in 1982.
- TermDriver - listens on a serial line and emulates a terminal on a standard VGA connector. It gives embedded microcontrollers a real console.
Virtual terminal
- https://en.wikipedia.org/wiki/Virtual_console (VC) – also known as a virtual terminal (VT) – is a conceptual combination of the keyboard and display for a computer user interface. It is a feature of some operating systems such as BSD, Linux, and UnixWare in which the system console of the computer can be used to switch between multiple virtual consoles to access unrelated user interfaces. Virtual consoles date back at least to Xenix in the 1980s.
Usually in Linux (see Linux console), the first six virtual consoles provide a text terminal with a login prompt to a Unix shell. The graphical X Window System starts in the seventh virtual console. In Linux, the user switches between them with the key combination Alt plus a function key – for example Alt+F1 to access the virtual console number 1. Alt+Left arrow changes to the previous virtual console and Alt+Right arrow to the next virtual console. To switch from the X Window System, Ctrl+Alt+function key works. (Note that users can redefine these default key combinations.)
The need for virtual consoles has lessened now that most applications work in the graphical framework of the X Window System, where each program has a window and the text mode programs can be run in terminal-emulator windows. If several sessions of the X Window System are required to run in parallel, such as in the case of fast user switching or when debugging X programs on a separate X server, each X session usually runs in a separate virtual console.
$XDG_VTNR # returns vty number
BRLTTY
- BRLTTY - a background process (daemon) which provides access to the Linux/Unix console (when in text mode) for a blind person using a refreshable braille display. It drives the braille display, and provides complete screen review functionality. Some speech capability has also been incorporated.
atty
- https://github.com/hodefoting/atty - audio sound device for terminalsA protocol providing network transparent audio device access through stdin/stdout for terminal applications. The atty binary provides both an engine to augment a terminal with audio capabilities, and basic commmand for piping raw PCM data on stdin/stdout. This enables queuing of audio for playback to the terminal for TUI music players using special escape sequences, as well as recording (could be used to implement ssh based push-to-talk and even realtime audio communication tools.). Chunks of audio are transmitted in base64 or ascii85 encoding as APC escape sequences. With the default settings this brings back the sunaudio device for use in terminal applications at 8000 hz mono 8bit ulaw, this is the baseline settings, 16bit support is only partially functional at the moment.
Other
Getty
- http://en.wikipedia.org/wiki/Getty_(Unix) - short for "get teletype", is a Unix program running on a host computer that manages physical or virtual terminals (TTYs). When it detects a connection, it prompts for a username and runs the 'login' program to authenticate the user.
- https://wiki.archlinux.org/index.php/Getty - getty is the generic name for a program which manages a terminal line and its connected terminal. Its purpose is to protect the system from unauthorized access. Generally, each getty process is started by init and manages a single terminal line. Within the context of a typical Arch Linux installation, the terminals managed by the getty processes are implemented as virtual consoles.
agetty
mgetty
fgetty
Qingu
PYT / terminal emulator
- https://en.wikipedia.org/wiki/Pseudoterminal - or pseudotty, or PTY is a pair of pseudo-devices, one of which, the slave, emulates a real text terminal device, the other of which, the master, provides the means by which a terminal emulator process controls the slave.
If it's not a hardware terminal (teleprinter/tty), it's a pseudoterminal, although tty is also used to mean pty.
Terminal emulators
See also Graphics, GUI#X terminals
- https://en.wikipedia.org/wiki/Terminal_emulator - or terminal application, term, or tty for short, is a program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term terminal covers all remote terminals, including graphical interfaces. A terminal emulator inside a graphical user interface is often called a terminal window.
Linux console
- https://en.wikipedia.org/wiki/Linux_console - a system console internal to the Linux kernel (a system console is the device which receives all kernel messages and warnings and which allows logins in single user mode).
The Linux kernel supports virtual consoles - consoles that are logically separate, but which access the same physical keyboard and display.[2] The Linux console (and Linux virtual consoles) are implemented by the VT subsystem of the Linux kernel, and do not rely on any user space software.[3] This is in contrast to a terminal emulator, which is a user space process that emulates a terminal, and is typically used in a graphical display environment.
Kmscon
- https://en.wikipedia.org/wiki/Kmscon - a virtual console which runs in userspace and intends to replace the Linux console, a terminal built into the Linux kernel. Kmscon uses the KMS driver for its output, it is multi-seat capable, supports internationalized keyboard input and UTF-8 terminal output. The input support is implemented using X keyboard extension (XKB). Development of Kmscon stopped in March 2015. There is a new project called systemd-consoled.
systemd-consoled
fbcon
- framebuffer console (fbcon), as its name implies, is a text console running on top of the framebuffer device. It has the functionality of any standard text console driver, such as the VGA console, with the added features that can be attributed to the graphical nature of the framebuffer.
In the x86 architecture, the framebuffer console is optional, and some even treat it as a toy. For other architectures, it is the only available display device, text or graphical.
What are the features of fbcon? The framebuffer console supports high resolutions, varying font types, display rotation, primitive multihead, etc. Theoretically, multi-colored fonts, blending, aliasing, and any feature made available by the underlying graphics card are also possible.
fbterm
- http://code.google.com/p/fbterm/ - Linux framebuffer terminal (without using X)
- https://wiki.archlinux.org/index.php/Fbterm
cu
- https://github.com/nedko/cu - serial terminal emulator
X terminal(s)
See also GUI#X terminals
Terminal multiplexing
- https://en.wikipedia.org/wiki/Terminal_multiplexer - a software application that can be used to multiplex several separate pseudoterminal-based login sessions inside a single terminal display, terminal emulator window, PC/workstation system console, or remote login session, or to detach and reattach sessions from a terminal. It is useful for dealing with multiple programs from a command line interface, and for separating programs from the session of the Unix shell that started the program, particularly so a remote process continues running even when the user is disconnected.
- https://en.wikipedia.org/wiki/DESQview - was a text mode multitasking operating environment developed by Quarterdeck Office Systems which enjoyed modest popularity in the late 1980s and early 1990s. Running on top of DOS, it allowed users to run multiple programs concurrently in multiple windows.
GNU Screen
- Screen - GNU Project - Free Software Foundation - a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill the current window, view a list of the active windows, turn output logging on and off, copy text between windows, view the scrollback history, switch between windows, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.
config goes in ~/.screenrc
escape ^Ww change escape key to w
Tmux
~/.tmux.conf.
- YouTube: 2012 UTOSC - Screen vs. tmux faceoff - Jon Jensen - Better than screen.
- https://github.com/rothgar/awesome-tmux - List of helpful tmux links for various tutorials, plugins, and configuration settings.
Articles
- TMUX – The Terminal Multiplexer (Part 1) - June 28, 2010
- TMUX – The Terminal Multiplexer (Part 2) - July 2, 2010
- switching from gnu screen to tmux (updated) - May 5, 2010
Commands
tmux lsc list clients tmux detach-client -t /dev/pts/26 remove other clients from session (if screensize is fucked)
split-window
bind-key -n C-S-Left swap-window -t -1 bind-key -n C-S-Right swap-window -t +1
open new window in current pwd;
bind <key of your choice> default-path $(pwd) \; split-window\; set default-path ~/
tmux_pwd () { [ -z "${TMUX}" ] && return tmux set default-path $(pwd) > /dev/null && tmux new-window (( sleep 300; tmux set default-path ~/ > /dev/null; ) & ) > /dev/null 2>&1 } alias tpwd="tmux_pwd"
Additions
- libtmux - the tool behind tmuxp, a tmux workspace manager in python.it builds upon tmux’s target and formats to create an object mapping to traverse, inspect and interact with live tmux sessions.
- https://github.com/jimeh/tmuxifier - Create, edit, manage and load complex Tmux session, window and pane configurations with ease. In short, Tmuxifier allows you to easily create, edit, and load "layout" files, which are simple shell scripts where you use the tmux command and helper commands provided by tmuxifier to manage Tmux sessions and windows
- https://github.com/aziz/tmuxinator - Create and manage tmux sessions easily.
- https://github.com/remiprev/teamocil - a simple tool used to automatically create
windows and panes in tmux with YAML files.
- https://github.com/oxidane/tmuxomatic - A completely different kind of tmux session manager. Other tmux session managers require pages of documentation for basic use, and define windows using a complicated nesting of pane splits. At the heart of tmuxomatic is the windowgram, a better way of arranging tmux windows. The windowgram is a rectangle comprised of alphanumeric characters (0-9, a-z, A-Z). Each character grouping identifies the name, position, size, and shape of a pane. It should take only one example to demonstrate the power and flexibility of the windowgram. At the heart of tmuxomatic is the windowgram, a better way of arranging tmux windows. The windowgram is a rectangle comprised of alphanumeric characters (0-9, a-z, A-Z). Each character grouping identifies the name, position, size, and shape of a pane. It should take only one example to demonstrate the power and flexibility of the windowgram. [8]
- https://github.com/tmux-plugins/tmux-continuum - Features: continuous saving of tmux environment, automatic tmux start when computer/server is turned on, automatic restore when tmux is started
- https://github.com/tmux-plugins/tmux-resurrect - saves all the little details from your tmux environment so it can be completely restored after a system restart (or when you feel like it). No configuration is required. You should feel like you never quit tmux. [10] [11]
- https://github.com/Morantron/tmux-fingers - copy pasting with vimium/vimperator like hints.
- https://github.com/laktak/extrakto - quickly select, copy/insert/complete text without a mouse
- https://github.com/lmartinking/tmux-applets - A selection of tmux "applets", such as for cpu frequency, memory usage and pinging
- https://github.com/bsandrow/tmux.sh - By default, if two tmux clients connect to the same session it acts like a mirror (since 'current window' is an attribute of the session rather than of the client). This is a simple script meant to allow behaviour more similar to GNU screen.
- wemux - makes multi-user terminal multiplexing both easier and more powerful. It allows users to host a wemux server and have clients join in either:
- https://github.com/tweekmonster/tmux2html - captures full tmux windows or individual panes then parses their contents into HTML in living color. The output can either be still snapshots, or animated sequences. With a web server that uses gzip compression, the size over the network is negligible for reasonably sized windows or panes. [12]
- https://github.com/whame/tmux-modal - Execute complex tmux commands in just a few keystrokes. tmux-modal introduces a modal mode (e.g. like in Vim text editor) in tmux that is designed to be efficient, easy to remember and comfortable.
dvtm
- dvtm - brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
3mux
- https://github.com/aaronjanse/3mux/ - a terminal multiplexer with out-of-the-box support for search, mouse-controlled scrollback, and i3-like keybindings. Imagine tmux with a smaller learning curve and more sane defaults.
Twin
- https://github.com/cosmos72/twin - a windowing environment with mouse support, window manager, terminal emulator and networked clients, all inside a text display. It supports a variety of displays: plain text terminals (any termcap/ncurses compatible terminal, Linux console, twin's own terminal emulator); X11, where it can be used as a multi-window xterm; itself (you can display a twin on another twin); twdisplay, a general network-transparent display client, used to attach/detach more displays on-the-fly. Currently, twin is tested on Linux (i386, x86_64, ARM, ARM64, PowerPC, Alpha, Sparc), on Mac OS X (x86_64) and on FreeBSD (i386, x86_64). I had yet no chance to seriously test it on other systems.
termwm
- https://gitlab.com/jD91mZM2/termwm - A floating WM of terminals inside your terminal
Pymux
Tmate
- tmate - a fork of tmux. It provides an instant pairing solution.
neercs
- neercs - a work-in-progress libcaca project.Like GNU screen, it allows you to detach a session from a terminal, but provides unique features: Grabbing a process that you forgot to start inside neercs, Great screensaver, 3D rotating cube to switch between full screen terms, Real time thumbnails of your shells, Special effects when closing a window, Various window layouts...
Teleconsole
- Teleconsole - Command line tool to share your UNIX terminal and forward local TCP ports to people you trust.
VTM
- https://github.com/netxs-group/vtm - Terminal multiplexer with TUI window manager and multi-party session sharing
Zellij
- Zellij - a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. At its core, it is a terminal multiplexer (similar to tmux and screen), but this is merely its infrastructure layer.Zellij includes a layout system, and a plugin system allowing one to create plugins in any language that compiles to WebAssembly.
Logging / recording
- Snoopy Logger - designed to aid a sysadmin by providing a log of commands executed. Snoopy is completely transparent to the user and applications. It is linked into programs to provide a wrapper around calls to execve(). Logging is done via syslog.
- sniffy - allows to trace/log the data of any pseudo terminal in the system. Due to the way the terminal works, such a terminal trace provides complete information of what happened on the terminal screen and sniffy is able to display/replay this information.
- ttysnoop - allows you to snoop on login tty's through another tty-device or pseudo-tty. The snoop-tty becomes a 'clone' of the original tty, redirecting both input and output from/to it.
- Rootsh is a wrapper for shells which logs all echoed keystrokes and terminal output to a file and/or to syslog. It's main purpose is the auditing of users who need a shell with root privileges. They start rootsh through the sudo mechanism.
- shwatchr is a small Perl script that audits logins to shell accounts on Linux/*NIX machines that originate from arbitrary hosts on the Internet.
- ttyrec - a tty recorder. Recorded data can be played back with the included ttyplay command. ttyrec is just a derivative of script command for recording timing information with microsecond accuracy as well. It can record emacs -nw, vi, lynx, or any programs running on tty.
- termtosvg - a Unix terminal recorder written in Python that renders your command line sessions as standalone SVG animations. [18] [19]
- https://github.com/folkertvanheusden/termcamng - runs an other program in an emulated ANSI terminal. The terminal is rendered to a PNG file which is then served via a http- (web-)server. You can connect to it using a telnet program and then interact with the program that is running.
Misc
- abduco - provides session management i.e. it allows programs to be run independently from their controlling terminal. That is programs can be detached - run in the background - and then later reattached. Together with dvtm it provides a simpler and cleaner alternative to tmux or screen.
- Mosh (mobile shell) - Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh is a replacement for SSH. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.
- Huffshell is a gem which will looks at your history and generate a command tree based on what you type. It will also make basic suggestions for improvements.
- retty is a tiny tool that lets you attach processes running on other terminals. So you were running that mutt outside of screen at your home machine and now wanna check your mail? Attach it with retty, do whatever you want, detach it again and everything is as it was before. You don't have to run them all in screen just in case.
Locale
- https://en.wikipedia.org/wiki/Locale_(computer_software) - a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language code and a country/region code.On POSIX platforms such as Unix, Linux and others, locale identifiers are defined by ISO/IEC 15897, which is similar to the BCP 47 definition of language tags, but the locale variant modifier is defined differently, and the character set is included as a part of the identifier. It is defined in this format:
[language[_territory][.codeset][@modifier]]
. (For example, Australian English using the UTF-8 encoding is en_AU.UTF-8.)
Colour
Traditionally, terminals could display 2 colours. Then some could display 16 (ANSI) colours (or 8 or 88 colours) for foreground and background. Most modern terminals now support 256 colours, if not 24-bit colour.
tput colors # query the terminfo db for number of colours supported
ANSI colours
! Black + DarkGrey *color0: #000000 *color8: #555753 ! DarkRed + Red *color1: #ff6565 *color9: #ff8d8d ! DarkGreen + Green *color2: #93d44f *color10: #c8e7a8 ! DarkYellow + Yellow *color3: #eab93d *color11: #ffc123 ! DarkBlue + Blue *color4: #204a87 *color12: #3465a4 ! DarkMagenta + Magenta *color5: #ce5c00 *color13: #f57900 !DarkCyan + Cyan (both not tango) *color6: #89b6e2 *color14: #46a4ff ! LightGrey + White *color7: #cccccc *color15: #ffffff
#!/usr/bin/bash # # This file echoes a bunch of color codes to the # terminal to demonstrate what's available. Each # line is the color code of one foreground color, # out of 17 (default + 16 escapes), followed by a # test use of that color on all nine background # colors (default + 8 escapes). # T='gYw' # The test text echo -e "\n 40m 41m 42m 43m\ 44m 45m 46m 47m"; for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ ' 36m' '1;36m' ' 37m' '1;37m'; do FG=${FGs// /} echo -en " $FGs \033[$FG $T " for BG in 40m 41m 42m 43m 44m 45m 46m 47m; do echo -en "$EINS \033[$FG\033[$BG $T \033[0m"; done echo; done echo
256 colours
"Setting $TERM in the shell profile is generally a bad idea, since you may wish to use different terminals. It is preferable to add it to .Xdefaults (or similar file read by X applications):"
XTerm*termName: xterm-256color
"xterm has a 256 color mode extension, FbTerm also add it in this version. But xterm's 256 color escape sequences conflict with the linux sequences implemented by FbTerm, so private escape sequences were introduced to support this feature and a new terminfo database entry named "fbterm" was added to use these private sequences, all program based on terminfo should work with it. By default, FbTerm sets environment variable "TERM" to value "linux", you need run "TERM=fbterm /path/to/program" to enable 256 color mode."
(x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done) # list all colours
Articles
- http://vim.wikia.com/wiki/256_colors_in_vim
- https://fedoraproject.org/wiki/Features/256_Color_Terminals
- http://www.robmeerman.co.uk/unix/256colours
- That 256 Color Thing, P.C. Shyamshankar - zsh spectrum
- So You Like Color--The Mysterious ^[[ Characters
- StackExchange: Colorizing your terminal and shell environment?
- Super User: TTY with 256 colors?
- How do I output coloured text to a Linux terminal?
24-bit true colour
- Gist: TrueColour.md: True Color (16 million colors) support in various terminal applications and terminals [21] [22]
dircolors
ls takes its color settings from the environment variable LS_COLORS. dircolors is merely a convenient way to generate this environment variable. To have this environment variable take effect system-wide, put it in your shell's startup file.
- dircolors - color setup for ls. Output commands to set the LS_COLORS environment variable.
- dir_colors - configuration file for dircolors - /etc/DIR_COLORS, ~/.dir_colors, etc.
dircolors -p > ~/.dircolors # creates the dircolors confuglration file (a basic script that sets and exports LS_COLORS variable)
For Bash in ~/.bashrc and Zsh in ~/.zshrc, add:
eval $(dircolors ~/.dircolors)
- dircolors: Color setup for ls - coreutils man
echo $LS_COLORS | tr : '\n' | sed 's/\(.*\)=\(.*\)/\x1b[\2m\1\t\2\x1b[0m/' # print dircolor config with colours
Tools
- https://github.com/lanej/dotfiles/blob/master/util/256colors2.pl - grid, no number
- https://github.com/jakobwesthoff/256colors - grid w/ number
- http://charlesleifer.com/blog/using-python-to-generate-awesome-linux-desktop-themes/
- https://github.com/everett1992/wp [24]
- http://bashish.sourceforge.net/ Bashish] - a theme enviroment for text terminals. It can change colors, font, transparency and background image on a per-application basis. Additionally Bashish supports prompt changing on common shells such as bash, zsh and tcsh.
- Wpgtk - A universal theming software for all themes defined in text files, compatible with all terminals, with default themes for GTK2, GTK+, openbox and Tint2, that uses wal as it's core, in which you can choose to interact with in two possible ways, so you can enjoy the powerful wal while having an easy to use GUI AND a powerful cli tool.
- https://github.com/dylanaraps/pywal - Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3.
- https://github.com/metakirby5/colorz - A k-means color scheme generator.
- https://github.com/fengsp/color-thief-py - A Python module for grabbing the color palette from an image.
- https://github.com/LanceGin/haishoku - A development tool for grabbing the dominant color or representative color palette from an image
- https://github.com/thefryscorer/schemer2 - Terminal Colorscheme Generator and Converter
- https://github.com/fhadiel/ricemood - Match your unix color scheme with your wallpaper
- https://github.com/dylanaraps/paleta - Change terminal colors on the fly.
- colout is a simple command to add colors to a text stream in your terminal.
Themes
For ZSH, Vim, Tmux, etc.
- http://ethanschoonover.com/solarized
- https://github.com/chriskempson/tomorrow-theme
- http://color.smyck.org/
- http://coolors.co
- http://paletton.com
- http://www.xcolors.net
- http://www.colourlovers.com
- http://www.materialpalette.com
- http://www.transparenttextures.com
- http://daylerees.github.io
- http://www.imagecolorpicker.com
- http://pltts.me
- http://dotshare.it/category/terms/colors
Sixel
- https://en.wikipedia.org/wiki/Sixel - short for "six pixels", is a bitmap graphics format supported by terminals and printers from DEC. It consists of a pattern six pixels high and one wide, resulting in 64 possible patterns. Each possible pattern is assigned an ASCII character, making the sixels easy to transmit on 7-bit serial links.
- libsixel - This package provides encoder/decoder implementation for DEC SIXEL graphics, and some converter programs. [28]
- https://github.com/csdvrx/sixel-tmux - a fork of tmux, with just one goal: having the most reliable support of graphics
- https://github.com/hackerb9/lsix - Like "ls", but for images. Shows thumbnails in terminal using sixel graphics.
Keyboard
- xcape allows you to use a modifier key as another key when pressed and released on its own. Note that it is slightly slower than pressing the original key, because the pressed event does not occur until the key is released. The default behaviour is to generate the Escape key when Left Control is pressed and released on its own. (If you don't understand why anybody would want this, I'm guessing that Vim is not your favourite text editor ;)
Mouse
- gpm is the mouse support for Linux on the console
Other
- https://github.com/asciimoo/drawille/ - Pixel graphics in terminal with unicode braille characters
X terminals
See also *nix#Terminal_.2F_console
- LWN.net: A look at terminal emulators, part 1
- LWN.net: A look at terminal emulators, part 2 [30]
- https://github.com/jwilm/vtebench/ - Generate benchmarks for terminal emulators
Retro simulation;
/usr/lib/xscreensaver/apple2 -text -fast -program bash
- https://github.com/cmuratori/termbench - Simple benchmark for terminal output
Xterm
- How to change the title of an xterm - This document explains how to use escape sequences to dynamically change window and icon titles of an xterm. Examples are given for several shells, and the appendix gives escape sequences for some other terminal types.
- https://github.com/csdvrx/cutexterm - Sensible defaults for xterm in the 21st century
rxvt
urxvt
- urxvt (7) faq
urxvt has overhead because of unicode.
urxvt sets char width as widest char in font. there's a patched package for that.
urxvt -e sh -c "ls && zsh" # launch command then exit to zsh [33]
- http://linux.die.net/man/1/urxvtd - a backend daemon. lighter, though will take down all terminals on crash.
urxvtd -q -f -o
- http://linux.die.net/man/1/urxvtc - client
urxvtc -e command
- https://bbs.archlinux.org/viewtopic.php?id=71789 - guake like (perl kuake is buggy)
.Xresources / .Xdefaults config:
URxvt.keysym.Shift-Up: command:\033]720;1\007 URxvt.keysym.Shift-Down: command:\033]721;1\007 # adds single line scroll-back [34]
- http://linux.die.net/man/3/urxvtperl - rxvt-unicode's embedded perl interpreter
The default perl set includes the "selection", "option-popup", "selection-popup", "readline" and "searchable-scrollback" extensions, and extensions which are mentioned in keysym resources.
- https://github.com/muennich/urxvt-perls - clipboard, keyboard-select, url-select
- Arch Forum: [Solved Change urxvt's font on the fly: Can YOU do it?]
printf '\33]50;%s\007' "xft:Terminus:pixelsize=16"
- http://j.rigelseven.com/read/55816 - an argument against urxvt
st
-*-terminus-medium-r-*-*-10-*-*-*-*-*-*-*
- https://github.com/gnotclub/xst - st fork that uses Xresources and some pretty good patches
vte
- https://github.com/GNOME/vte - VTE is a library (libvte) implementing a terminal emulator widget for GTK+, and a minimal sample application (vte) using that. Vte is mainly used in gnome-terminal, but can also be used to embed a console/terminal in games, editors, IDEs, etc.
tinyterm
- https://github.com/nathan-hoad/tinyterm - Fork of https://github.com/lahwaacz/tinyterm, which is a fork of https://code.google.com/p/tinyterm/
LilyTerm
- LilyTerm - a terminal emulator based off of libvte that aims to be fast and lightweight, Licensed under GPLv3.
sakura
- sakura - a terminal emulator based on GTK and libvte. It has few dependencies, so there's no need of a full GNOME desktop installed to have a powerful terminal emulator. sakura uses a gtk notebook to provide tabbed terminals in one window and has a contextual menu for configuration; it was designed without a menu bar. No more no less.
mlterm
- mlterm - a multi-lingual terminal emulator , which supports various character sets and encodings in the world.
ftjerm
- https://github.com/segrived/ftjerm - a quake-style terminal and a fork of Stjerm. It is minimalistic and works well with compiz. Ftjerm can be configured via commandline or the .Xdefaults file.
HTerm
Tilix
- Tilix - an advanced GTK3 tiling terminal emulator that follows the Gnome Human Interface Guidelines.
Terra
- https://launchpad.net/terra - a GTK+3.0 based terminal emulator with useful user interface, it also supports multiple terminals with splitting screen horizontally or vertically. New features will be added soon. It's very new and experimental project, if you want to contribute just checkout and try.
Final Term
- Final Term - a new breed of terminal emulator. It goes beyond mere emulation and understands what is happening inside the shell it is hosting. This allows it to offer features no other terminal can, including: Semantic text menus, Smart command completion, GUI terminal controls [36]
Xiki
- Xiki - The shell console reimagined Type notes, prototype, and program.
Aminal
- https://github.com/liamg/aminal - a modern terminal emulator for Mac/Linux implemented in Golang and utilising OpenGL. [38]
Kitty
- kitty - the fast, featureful, GPU based terminal emulator
Vintage Terminal
- Vintage Terminal - Use a terminal in style, like in the good old days! Vintage Terminal is a terminal emulator that simulates the looks of a 1980s monitor.
- http://www.secretgeometry.com/apps/cathode/- mac only
cool-retro-term
- https://github.com/Swordfish90/cool-retro-term - a terminal emulator which mimics the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight. It uses the Konsole engine which is powerful and mature. This terminal emulator requires Qt 5.2 or higher to run.
notty
- https://github.com/withoutboats/notty - a virtual terminal like xterm, gnome-vte, sh, or rxvt. Unlike these programs, notty is not intended to emulate a DEC VT-series physical video terminal, or any other physical device. Instead, notty is an experimental project to bring new features to the command-line which would not have been possible for the physical terminals other terminals emulate. [39]
black-screen
- https://github.com/vshatskyi/black-screen - an IDE in the world of terminals. Strictly speaking, it's both a terminal emulator and an interactive shell based on Electron. Also, unlike most of the emulators you can meet nowadays it uses HTML and CSS for its UI (exactly as Atom does), which means we can stop misusing unicode characters and make a better looking terminal with appropriate tools. [40]
tdrop
DEX-UI
- https://github.com/seenaburns/dex-ui - a handcrafted interface programmed in openFrameworks, running fullscreen underneath a functioning terminal, giving the experience of having a sci-fi computer. The project's source code is hosted here for reference. Included are the openFrameworks project source files and shaders, as well as the changes made to BSPWM
eDEX-UI
- https://github.com/GitSquared/edex-ui - a fullscreen, cross-platform terminal emulator and system monitor that looks and feels like a sci-fi computer interface. Heavily inspired from the TRON Legacy movie effects (especially the Board Room sequence), the eDEX-UI project was originally meant to be "DEX-UI with less « art » and more « distributable software »". While keeping a futuristic look and feel, it strives to maintain a certain level of functionality and to be usable in real-life scenarios, with the larger goal of bringing science-fiction UXs to the mainstream. It might or might not be a joke taken too seriously. [41]
tio
- https://github.com/tio/tio - a simple TTY terminal application which features a straightforward commandline interface to easily connect to TTY devices for basic input/output.It was created because the author needed a simple no-nonsense TTY terminal application to easily connect to various terminal TTY devices.
Wayland terminals
wlterm
- https://github.com/majestrate/wterm - an xterm replacement based on an st fork using wld. st is a simple terminal emulator for X originally made by suckless.
X / Wayland
- https://github.com/91861/wayst - Simple terminal emulator for Wayland and X11 with OpenGL rendering and minimal dependencies.
Termite
- https://github.com/thestinger/termite - A keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
guake
- https://github.com/Guake/guake - Quake console like dropdown
Alacritty
- https://github.com/jwilm/alacritty - the "fastest" terminal emulator in existence. Using the GPU for rendering enables optimizations that simply aren't possible in other emulators. Alacritty currently supports macOS and Linux, and Windows support is planned before the 1.0 release.
wezterm
- wezterm - Wez's Terminal Emulator - a GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Web based
FireSSH
- FireSSH - a free, cross-platform SSH terminal client for Mozilla Firefox and Google Chrome. Written entirely in Javascript!
Gate One
- Gate One - an HTML5-powered terminal emulator and SSH client
KeyBox
- KeyBox - A web-based SSH console that executes commands on multiple shells. KeyBox allows you to manage keys, share terminal commands, and upload files to multiple systems simultaneously. [42]
oterm
- oterm - a web browser unix terminal. It serves a console so you can access your server from anywhere in the world where you have an Internet connection. It effectively is an xterm in a browser. [43]
tty.js
Hyper
DomTerm
- DomTerm - an terminal emulator based on web technologies. Beyond solid xterm compatibility, it supports powerful features for REPL (read-eval-print-loop) consoles: Application output can have images, rich text, and links, with structure-based line-breaking (pretty-printing), and folding. There is also input editing; automatic paging; screen multiplexing (panes and tabs); and session management (like tmux or GNU screen). The user interface and terminal emulation is handled by a JavaScript library that can run in a regular web browser or an embedded browser such as Electron, using Web Sockets to talk to the server.The name “DomTerm” refers to how it works by manipulating the Document Object Model (DOM) of a browser: the nested structure of elements, text, and attributes.
- https://github.com/PerBothner/DomTerm - DOM/JavaScript-based terminal-emulator/console [46]
GoTTY
- https://github.com/yudai/gotty - a simple command line tool that turns your CLI tools into web applications.
ttyd
- ttyd - a simple command-line tool for sharing terminal over the web, inspired by GoTTY.
Go Terminal
Xterm.js
- https://github.com/wavesoft/local-echo - A local-echo controller for xterm.js
hterm
- hterm - a JS library that provides a terminal emulator. It is reasonably fast, correct, and portable across browsers.
Text-based user interface
- https://sourceforge.net/projects/twin - a text-mode window environment. It supports mouse and multiple windows, has a built-in terminal emulator and window manager, and can serve as display for client applications. Its retro look-and-feel comes with very modern features: it is best described as a VNC-like server, that can use a variety of displays - all with mouse support: from a plain text terminal, to a Linux console, to a full kde, gnome or X11 desktop.
Images / video
- Show Images in terminal emulator - w3mimgdisplay
- https://github.com/seebye/ueberzug - an alternative for w3mimgdisplay
- https://github.com/hzeller/timg - A viewer that uses 24-Bit color capabilities and unicode character blocks to display images in the terminal.