From 0442ee5fa8044bb96e459667ab682d9ebec52ff1 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 16 Feb 2024 22:37:02 +0200 Subject: [PATCH] fix(agent/reconnectingpty): fix screen startup speed by disabling messages (#12190) --- agent/reconnectingpty/screen.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/agent/reconnectingpty/screen.go b/agent/reconnectingpty/screen.go index 3d0f7b2ef5..c6d56aa220 100644 --- a/agent/reconnectingpty/screen.go +++ b/agent/reconnectingpty/screen.go @@ -81,6 +81,13 @@ func newScreen(ctx context.Context, cmd *pty.Cmd, options *Options, logger slog. rpty.id = hex.EncodeToString(buf) settings := []string{ + // Disable the startup message that appears for five seconds. + "startup_message off", + // Some message are hard-coded, the best we can do is set msgwait to 0 + // which seems to hide them. This can happen for example if screen shows + // the version message when starting up. + "msgminwait 0", + "msgwait 0", // Tell screen not to handle motion for xterm* terminals which allows // scrolling the terminal via the mouse wheel or scroll bar (by default // screen uses it to cycle through the command history). There does not