From 5c0100a53772eb7f4b11db7b071fc63e82e5a1a7 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 6 Jan 2012 01:32:34 +0100 Subject: [PATCH] util: switch the console to text mode on reset In case we're taking over the console after a killed X server. https://bugzilla.redhat.com/show_bug.cgi?id=771563 --- src/util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util.c b/src/util.c index 1cff5470..b4c5e2e6 100644 --- a/src/util.c +++ b/src/util.c @@ -2465,6 +2465,9 @@ int reset_terminal_fd(int fd) { /* Disable exclusive mode, just in case */ ioctl(fd, TIOCNXCL); + /* Switch to text mode */ + ioctl(fd, KDSETMODE, KD_TEXT); + /* Enable console unicode mode */ ioctl(fd, KDSKBMODE, K_UNICODE); -- 2.39.5