Difference between revisions of "KMSCON"

From ArchWiki
Jump to: navigation, search
(Created page with "Category:Terminal emulators {{Article summary start}} {{Article summary text|A guide to installing and configuring KMSCON, the userspace linux-console replacement.}} {{Art...")
 
(Features: "KMSCON supports user logins only" is simply wrong. Provide a workaround instead.)
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
[[Category:Terminal emulators]]
 
[[Category:Terminal emulators]]
 
{{Article summary start}}
 
{{Article summary start}}
{{Article summary text|A guide to installing and configuring KMSCON, the userspace linux-console replacement.}}
+
{{Article summary text|A guide to installing and configuring kmscon, the userspace linux-console replacement.}}
 
{{Article summary heading|Related}}
 
{{Article summary heading|Related}}
 
{{Article summary wiki|KMS}}
 
{{Article summary wiki|KMS}}
Line 7: Line 7:
 
{{Article summary end}}
 
{{Article summary end}}
  
From the [https://github.com/dvdhrm/kmscon project github page]:
+
From the [https://github.com/dvdhrm/kmscon project GitHub page]:
  
''Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS). It is an attempt to replace the in-kernel VT implementation with a userspace console.''
+
:''Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS). It is an attempt to replace the in-kernel VT implementation with a userspace console.''
 
+
== Requirements ==
+
Despite its name, KMS is not a hard requirement for KMSCON. KMSCON supports the following video backends: fbdev (Linux fbdev video backend), drm2d (Linux DRM software-rendering backend), drm3d (Linux DRM hardware-rendering backend). Make sure one of them is available on your system.
+
  
 
== Features ==
 
== Features ==
KMSCON can function as a drop-in replacement for the in-kernel linux-console. Features include:
+
 
 +
Kmscon can function as a drop-in replacement for the in-kernel linux-console. Features include:
  
 
* Full vt220 to vt510 implementation.
 
* Full vt220 to vt510 implementation.
 
* Full internationalization support:
 
* Full internationalization support:
** KMSCON supports printing full Unicode glyphs, including the CJK ones.
+
** 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.
+
** 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.
 
* Hardware accelerated rendering.
 
* Multi-seat capability.
 
* Multi-seat capability.
  
== Installation ==
+
{{Note|In order to be able to log into a kmscon console as root, you have to disable the {{ic|pam_securetty}} module by removing or commenting out the corresponding line in {{ic|/etc/pam.d/login}}. }}
Install {{pkg|kmscon}} from one of the [[official repositories]]. Alternatively, you can install {{AUR|kmscon-git}} from the [[Arch User Repository]].
+
 
 +
== Install ==
 +
 
 +
Despite its name, KMS is not a hard requirement for kmscon. Kmscon supports the following video backends: fbdev (Linux fbdev video backend), drm2d (Linux DRM software-rendering backend), drm3d (Linux DRM hardware-rendering backend). Make sure one of them is available on your system.
 +
 
 +
Install {{Pkg|kmscon}} from one of the [[official repositories]]. Alternatively, you can install {{AUR|kmscon-git}} from the [[AUR]].
  
 
== Replacing linux-console ==
 
== Replacing linux-console ==
 +
 +
As root, issue:
 +
{{bc|
 +
# ln -s /usr/lib/systemd/system/kmsconvt\@.service /etc/systemd/system/autovt\@.service
 +
# systemctl enable kmsconvt\@.service
 +
}}
 +
This will make {{pkg|systemd}} start kmscon instead of agetty on each VT. If for whatever reason kmscon failed to start, then agetty would be started instead.
 +
 +
== CJK support ==
 +
 +
Kmscon supports rendering CJK characters through the default font engine {{pkg|pango}}. However, {{pkg|fontconfig}} 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:
 +
{{hc|/etc/fonts/conf.d/99-kmscon.conf|<nowiki>
 +
<?xml version="1.0"?>
 +
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
 +
<fontconfig>
 +
<match>
 +
        <test name="family"><string>monospace</string></test>
 +
        <edit name="family" mode="prepend" binding="strong">
 +
                <string>DejaVu Sans Mono</string>
 +
                <string>WenQuanYi Micro Hei Mono</string>
 +
        </edit>
 +
</match>
 +
</fontconfig>
 +
</nowiki>}}
 +
You need to have {{Pkg|ttf-dejavu}} and {{Pkg|wqy-microhei}}, both available from the official repositories, installed.
 +
 +
== Troubleshooting ==
 +
 +
* You may want to add {{ic|--hwaccel --drm}} to ExecStart if you have problems with switching between [[Xorg]] and kmscon.
 +
  ExecStart=/usr/bin/kmscon "--vt=%I" --seats=seat0 --no-switchvt --font-name Terminus --font-size 12 --hwaccel --drm
 +
* As version 7, if you cannot control the audio, add your user to '''audio''' [[Users and Groups#Group management|group]]. Be aware of th [[Alsa#Installation|shortcomings]] of this choice.

Revision as of 13:26, 25 August 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

From the project GitHub page:

Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS). 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.

Install

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

Install kmscon from one of the official repositories. Alternatively, you can install kmscon-gitAUR from the AUR.

Replacing linux-console

As root, issue:

# ln -s /usr/lib/systemd/system/kmsconvt\@.service /etc/systemd/system/autovt\@.service
# systemctl enable kmsconvt\@.service

This will make systemd start kmscon instead of agetty on each VT. If for whatever reason kmscon failed to start, then agetty would be started instead.

CJK support

Kmscon supports rendering CJK characters through the default font engine pango. However, fontconfig 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:

/etc/fonts/conf.d/99-kmscon.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
        <test name="family"><string>monospace</string></test>
        <edit name="family" mode="prepend" binding="strong">
                <string>DejaVu Sans Mono</string>
                <string>WenQuanYi Micro Hei Mono</string>
        </edit>
</match>
</fontconfig>

You need to have ttf-dejavu and wqy-microhei, both available from the official repositories, installed.

Troubleshooting

  • You may want to add --hwaccel --drm to ExecStart if you have problems with switching between Xorg and kmscon.
 ExecStart=/usr/bin/kmscon "--vt=%I" --seats=seat0 --no-switchvt --font-name Terminus --font-size 12 --hwaccel --drm
  • As version 7, if you cannot control the audio, add your user to audio group. Be aware of th shortcomings of this choice.