Skip to content

Commit

Permalink
Fixed the issue that tty information would not be written to utmp whe…
Browse files Browse the repository at this point in the history
…n logging in to a Wayland session.
  • Loading branch information
liuyuanpeng176 committed Jan 2, 2024
1 parent 1ade713 commit a1be2c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wayland-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit a1be2c4

Please sign in to comment.