From bc290c14b35cc345af3ad37fe7ed08ca2384ecc4 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 25 Jul 2026 16:13:43 +0900 Subject: [PATCH] getty: show the text cursor at the login prompt (ESC[?25h) The framebuffer login prompt had no visible caret (unlike a Linux VT): boot output / the \x1Bc reset path can leave DECTCEM off. Emit ESC[?25h (show cursor) alongside the pre-login clear so the prompt shows a cursor. (If fbcond does not render a cursor glyph at all, that is a separate fbcond gap.) --- src/bin/getty.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/getty.rs b/src/bin/getty.rs index c376f99c85..b1d85317ff 100644 --- a/src/bin/getty.rs +++ b/src/bin/getty.rs @@ -244,6 +244,10 @@ fn daemon(tty: &mut File, clear: bool, contain: bool, stderr: &mut Stderr) { if clear { let _ = redox::write(tty_fd as usize, b"\x1Bc"); } + // Make the text cursor visible for the login prompt. Boot output (and the + // \x1Bc reset paths) can leave DECTCEM off, so the prompt shows with no + // caret — unlike a Linux VT. ESC[?25h = show cursor (DECTCEM). + let _ = redox::write(tty_fd as usize, b"\x1B[?25h"); let _ = redox::fsync(tty_fd as usize); let slave_stdin = redox::open(&pty, flag::O_CLOEXEC | flag::O_RDONLY, 0)