[Bug 202269] [patch] sysutils/consolekit update to 1.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jan 29 15:38:39 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202269

--- Comment #8 from Jesper Schmitz Mouridsen <jesper at schmitz.computer> ---
Created attachment 179399
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179399&action=edit
Update to consolekit 1.0.2 with active sessions working.

This is another approach. I have narrowed the problem down. On Linux the X
process' control tty is the same as Xfree86_VT (e.g the display device). On
FreeBSD it is the invoking tty. e.g startx on /dev/ttyv1 the Xorg procees' tt
is ttyv1 even though Xfree86_VT is vt9

Inspired by
http://unix.stackexchange.com/questions/32884/which-virtual-terminal-is-a-given-x-process-running-on
I use libprocstat to read the actual display device from pid. e.g no need to
only use the root window property XFree86_VT as in my previous patch.
This needs the ck-get-x11-display-device to be setuid root. The Makefile
reflects/sets this.
Another problem was that the active tty is returned as full path and
display-deivce was only ttyvX. I have prefixed display-device with "/dev/"

ck-sysdeps-freebsd.c
@@ -128,7 +128,7 @@ ck_process_stat_get_tty (CkProcessStat *stat)
 {
         g_return_val_if_fail (stat != NULL, NULL);

-        return g_strdup (stat->tty_text);
+        return g_strdup_printf("/dev/%s",stat->tty_text);
 }
Furhermore I have reverted the use of consolectl as it does not work on
11-RELEASE. I have not tested on 10.

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


More information about the freebsd-gnome mailing list