I am using Ubuntu 14.04 and 16.04. On 14.04 I additionally installed Terminology.
Linux has 7 virtual consoles, which correspond to 7 device files /dev/tty[n]
.
If you fire up a terminal and call an executable (assuming one that’s line oriented for simplicity) you get a reply to the command from the executable. How does this get printed to you (the user)? Does the terminal do something like pexpect
? (poll waiting for output) or what? How does it get notified of output to be printed out? And how does a terminal start a program? (Is it something akin to python’s os.fork()? ) I’m puzzled how a terminal works, I’ve been playing with some terminal emulator and I still don’t get how all this magic works. I’m looking at the source of konsole (kde) and yakuake (possibly uses konsole) an I can’t get where all that magic happens.
How can I test that my terminal / tmux is correctly setup to display truecolor / 24-bit color / 16.8 million colours?
Not totally sure if this is the right place but here goes.