KMSCON

From the project's git repository:

Kmscon is a simple terminal emulator based on linux kernel mode setting. It is an attempt to replace the in-kernel VT implementation with a userspace console.

Features

Kmscon can function as a drop-in replacement for the in-kernel linux-console. Features include:

  • Full vt220 to vt510 implementation.
  • Full internationalization support:
    • Kmscon supports printing full Unicode glyphs, including the CJK ones.
    • Kmscon provides internationalized keyboard handling through libxkbcommon, thus allowing it to use the full range of keyboard layouts supported in X keyboard.
  • Hardware accelerated rendering.
  • Multi-seat capability.
Note: In order to be able to log into a kmscon console as root, you have to disable the pam_securetty module by removing or commenting out the corresponding line in /etc/pam.d/login.

Installation

Despite its name, KMS is not a hard requirement for kmscon. Kmscon supports the following video backends: drm3d (Linux DRM hardware-rendering backend), drm2d (Linux DRM software-rendering backend), superseded fbdev (Linux fbdev video backend). Make sure one of them is available on your system.

Install the kmscon package or the kmscon-gitAUR package for a development version from the AUR. Alternatively, install kmscon-patched-gitAUR. The patched version, along with its patched dependency (libtsm-patched-gitAUR), includes fixes and improvements (like 24-bit color support) that the canonical version (which has not been updated since 2014) does not.

Normally, there is a special systemd configuration for tty1. To be conservative, you can continue to run the traditional agetty on tty1 and only run kmscon on all the other virtual terminals. Or you can run kmscon on both tty1 and the other VTs.

To enable kmscon on tty1, disable getty@tty1.service and enable kmsconvt@tty1.service.

To enable kmscon on all virtual terminals, run:

This will make start kmscon instead of agetty on each VT. More precisely, this will make systemd-logind use instead of for new VTs. Additionally, all other systemd units that use will not be affected by this change.

If kmscon cannot start for whatever reason, this unit will cause to be started instead. Furthermore, if no VTs are available, this unit will not start anything.

Warning: If you have replaced agetty on all terminals, take care to ensure kmscon presents you with a prompt before rebooting your machine, otherwise you may have to recover through a live CD.

CJK support

Kmscon supports rendering CJK characters through the default font engine pango. However, has to be globally configured to map the monospace font alias to proper CJK fonts. For Chinese users, the following template is provided and proved to result in satisfactory Chinese characters rendering:

Alternatively, we can add the following line to for globally configuring kmscon using the fonts:

See .

You need to have and , both available from the official repositories, installed.

Troubleshooting

Problems with switching between Xorg and kmscon

You may want to add to if you have problems with switching between Xorg and kmscon. The file and folder are not part of the package and therefore have to be created manually. Another possibility would be editing the systemd service file.

No audio control

As version 7, if you cannot control the audio, add your user to the user group. Be aware of the shortcomings of this choice.

Vim does not clear terminal output

Vim might open without clearing the terminal output, it is still possible to edit the file but the text will not be visible until it is changed. As a workaround, try setting the environment variable TERM=vt220. Alternatively, another vim-like editor like vi or Neovim might work.

Automatic login

It is possible to login the user automatically without asking for password by adding this to

 # Modify this command to do what you need
 
 # Example: Login an user asking for user and password
 login=/bin/bash --login
 
 # Example: Login an user without asking for password
 login=/bin/bash -c su <your_username>

HiDPI support

You can change font size on the fly with , , shortcuts. Also you can set 'font-dpi' and 'font-size' in e.g. 'font-dpi=288' 288 is 96 * 3 that is 300% scaling. 96 is default.

gollark: ```telnet osmarks.tk 80```and type `GET / HTTP/1.0` and two newlines, by the way. Manual HTTP!
gollark: Or [EVERY OTHER PROXY IN EXISTENCE].
gollark: Can you access them through `archive.org` maybe?
gollark: Also, why do I have three IPv6 addresses listed under `ip addr`...?
gollark: Wico: Same in the US! And in the UK we have massive government spying too!
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.