diff options
author | Brian Cameron <brian.cameron@sun.com> | 2008-02-25 16:37:03 -0500 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2008-02-25 16:37:03 -0500 |
commit | 5315cd9e36f86f9d1ea1419c6521524a68801d4a (patch) | |
tree | 017cc995230bfea0e68b74128040d967147f1427 /src | |
parent | fc9abc6db6616b6960db070c98bad21f990a040e (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ck-sysdeps-solaris.c | 11 |
1 files changed, 11 insertions, 0 deletions
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)) { |