If you ever wondered what program handles your TTY and if you can change it,
read on.
The default for the TTY, AKA the lines you might see before you are prompted
with your login and password is handled by a program, most likely `getty` or
`agetty`. You can switch to another one with a bit of configuration. It's
obviously specific to your linux distribution.
Why would I change it ? Well some consoles offer a better experience with
features such as :
- No more character limit
- No more color count limit
- Hardware graphic acceleration
- More font support
- Native scrollback buffer
- Native dynamic resizing
All the modern stuff that one might want in a TTY without the hassle of a
graphical environment.
_Trivia : The default linux console is part of the linux kernel. It has to be
compatible with an insane amount of devices, and did not include the above
functionnalities for the sake of compatibility._
I tried 3 alternatives to the default console : `fbterm`, `yaft` and `kmscon`.
`fbterm` stands for 'Frame Buffer terminal'. While it offers the features I was
looking for, I failed to make it work properly. I had issues with font
rendering and couldn't fix it after a few hours so I just gave up.
`yaft` stands for 'yet another framebuffer terminal, it feels like a tech demo
and a proof-of-concept rather than a fully-featured software. It was still good
enough for most of my use-cases. Color scheme or theming can be customized by
changing values in a file before compiling. Not very handy. I don't change my
theme often anyway, so I could go with it.
`kmscon` stands for 'Kernel Mode Setting CONsole' and is the one I settled
with. It has all the bells and whistles I listed above. It was easier to
configure overall; a systemd service to start it instead of 'getty', a list of
preset themes (including solarized !), and easily accessible `pango` rendered
fonts !
My config file (stored in `/etc/kmscon/kmscon.conf`) is a simple as :
font-size=16 font-name=JetBrains Mono font-engine=pango palette=solarized xkb-options=compose:caps xkb-repeat-rate=25 xkb-layout=us compose drm hwaccel
The font is as crips and smooth as in my graphical environment. I can resize it
with `ctrl +`/`ctrl -`. Really feels like my regular terminal emulator.
As usual with the topic of TTY and using a computer without graphical
environment, the documentation is quite scarce, and software is not moving a
lot. Which isn't bad in itself. A good software is a finished software [1]. But
in this particular case it proved inconvenient.
I had to do some internet digging to make the compose-key work, because the
version I found online (both on freedesktop.org and on Aetf's github repo)
didn't support them. The git repository looked untouched since 2018, so I had
to find a patch proposed in 2014 by user 'Ran Benita <ran234@gmail.com>' to add
support to it. Locally merged it, and everything now works !
[1] drew devault on software stability