From 5315cd9e36f86f9d1ea1419c6521524a68801d4a Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Mon, 25 Feb 2008 16:37:03 -0500 Subject: fix solaris x11-display-device when no vt available This patch fixes ConsoleKit so it sets x11-display-device to "/dev/console" when not using VT. --- src/ck-sysdeps-solaris.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ck-sysdeps-solaris.c b/src/ck-sysdeps-solaris.c index 7e2a59f..e32265e 100644 --- a/src/ck-sysdeps-solaris.c +++ b/src/ck-sysdeps-solaris.c @@ -182,7 +182,18 @@ stat2proc (pid_t pid, } if (P->tty == NO_TTY_VALUE) { +#ifdef HAVE_SYS_VT_H memcpy (P->tty_text, " ? ", 8); +#else + /* + * This is a bit of a hack. On Solaris, pre-VT integration, the + * Xorg process is not assigned a TTY. So, just assign the value + * to "/dev/console" if running without VT support. This will + * allow people using Solaris pre-VT integration to use + * ConsoleKit. + */ + memcpy (P->tty_text, "/dev/console", 12); +#endif } if (P->tty == DEV_ENCODE(0,0)) { -- cgit