maintainer-feedback requested: [Bug 277114] x11/lightdm: fix tty counting in patch-src_x-server.c

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 17 Feb 2024 17:17:14 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-desktop (Team)
<desktop@FreeBSD.org> for maintainer-feedback:
Bug 277114: x11/lightdm: fix tty counting in patch-src_x-server.c
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277114



--- Description ---
In patch-src_x-server.c we currently pass "ttyv%d", but we count TTYs in hex,
not decimal and so it should be:

+	 tty_text = g_strdup_printf ("/dev/ttyv%x", vt - 1);

This bug was identified in 221452, but the accepted patches bandage over the
issue rather than fixing the root cause, which is the counting.

This patch was suggested and actually resolves the bug:
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=236106&action=diff

However, it is also possible that these are base32 numbers rather than base16
and points here: https://github.com/swaywm/wlroots/pull/1945

With this fixed, it may again be possible to pull back in val's consolekit2
patch as well:
https://github.com/valpackett/ConsoleKit2/commit/18a058576d118dec428d81c7e2e336
9d9ec939d0.patch