[Bug 285394] sysutils/consolekit2 seems to use wrong tty

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 17 Mar 2025 13:21:07 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285394

--- Comment #4 from Andriy Gapon <avg@FreeBSD.org> ---
(In reply to Gleb Popov from comment #3)
I think that this could be a different issue.

ConsoleKit opens "/dev/tty" (note absence of "v" and any number) just once on
startup.
As far as I can tell, ConsoleKit does not take any input from lightdm for that.

Then ConsoleKit uses that file descriptor forever.
The problem is that the descriptor gets revoked.

The ConsoleKit code is here:
https://github.com/ConsoleKit2/ConsoleKit2/blob/master/src/ck-sysdeps-unix.c#L295

I think that ConsoleKit really wants to open a console device but opens current
controlling terminal instead.

At the same time, it could be that lightdm uses a wrong controlling terminal
and ConsoleKit somehow inherits it.
On the other hand, I think that lightdm and ConsoleKit communicate through
dbus.
Also, I see in FreeBSD patches for lightdm that it should use /dev/console for
working with VT-s. See x11/lightdm/files/patch-src_vt.c.
Original code: https://github.com/canonical/lightdm/blob/main/src/vt.c

-- 
You are receiving this mail because:
You are the assignee for the bug.