From a1be2c4b0d617c65f6d7301221c80691ba0d272e Mon Sep 17 00:00:00 2001 From: liuyuanpeng <867491149@qq.com> Date: Tue, 2 Jan 2024 20:40:05 +0800 Subject: [PATCH] Fixed the issue that tty information would not be written to utmp when logging in to a Wayland session. --- src/wayland-session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland-session.c b/src/wayland-session.c index b2dc8201..48bcb6be 100644 --- a/src/wayland-session.c +++ b/src/wayland-session.c @@ -65,6 +65,10 @@ wayland_session_connect_session (DisplayServer *display_server, Session *session { g_autofree gchar *value = g_strdup_printf ("%d", priv->vt); session_set_env (session, "XDG_VTNR", value); + + g_autofree gchar *tty_text = NULL; + tty_text = g_strdup_printf("/dev/tty/%d",priv->vt); + session_set_tty(session,tty_text); } }