File 0001-Change-kmsconvt-.service-to-match-getty-.service.patch of Package kmscon
From: Victor Westerhuis <victor@westerhu.is> Date: Thu, 4 Feb 2021 09:58:30 +0100 Subject: Change kmsconvt@.service to match getty@.service Edit kmsconvt@.service based on the getty@.service provided by systemd. Also modify the ExecStart line, and explicitly specify $TERM to be xterm-256color: kmscon does not come close to fully supporting everything xterm does, but setting TERM to xterm-256color only perpetuates the lie that kmscon already told its children before. In time either kmscon needs to support (more of) xterm's behavior or it needs to use another TERM value. The latest upstream kmscon release already have a default value of $TERM of xterm-256color. This portion of patch should be dropped once we have kmscon (>= 9.2.1). Forwarded: no Last-Update: 2026-01-26 --- scripts/systemd/kmsconvt@.service.in | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/systemd/kmsconvt@.service.in b/scripts/systemd/kmsconvt@.service.in index b1e9c3e..c615acc 100644 --- a/scripts/systemd/kmsconvt@.service.in +++ b/scripts/systemd/kmsconvt@.service.in @@ -4,14 +4,6 @@ # spawns KMSCON on this VT. Note that this does automatically limit KMSCON to # seat0. You cannot spawn KMSCON on other seats with this unit. # -# You can replace the default getty@.service that is shipped with systemd by -# linking it with: -# ln -s /usr/lib/systemd/system/kmsconvt@.service /etc/systemd/system/autovt@.service -# This will make systemd start KMSCON instead of agetty on each VT. Or more -# precisely, this will make systemd-logind use kmsconvt@.service instead of -# getty@.service for new VTs. In fact, all other units/scripts/... that use -# getty@.service will not be affected by this change. -# # Note that by default getty@.service installs itself as getty@tty1.service. # This unit does the same and overrules getty@tty1.service via the "Conflict" # line below. @@ -30,15 +22,19 @@ Description=KMS System Console on %I Documentation=man:kmscon(1) After=systemd-user-sessions.service After=plymouth-quit-wait.service +After=getty-pre.target After=rc-local.service Before=getty.target +Conflicts=rescue.service +Before=rescue.service Conflicts=getty@%i.service OnFailure=getty@%i.service IgnoreOnIsolate=yes ConditionPathExists=/dev/tty0 [Service] -ExecStart=@bindir@/kmscon --vt=%I --seats=seat0 --no-switchvt --login -- /sbin/agetty -o '-p -- \\u' --noclear -- - $$TERM +ExecStart=@bindir@/kmscon --vt=%I --seats=seat0 --no-switchvt --login -- /sbin/agetty -o '-p -- \\u' --noclear -- - xterm-256color +Type=idle UtmpIdentifier=%I TTYPath=/dev/%I TTYReset=yes @@ -47,3 +43,5 @@ TTYVTDisallocate=yes [Install] WantedBy=getty.target +DefaultInstance=tty1 +Alias=autovt@.service