Index: consolekit-0.2.3/src/main.c =================================================================== --- consolekit-0.2.3.orig/src/main.c 2008-06-15 10:23:46.000000000 +0200 +++ consolekit-0.2.3/src/main.c 2008-06-15 11:53:10.000000000 +0200 @@ -44,6 +44,8 @@ #define CK_DBUS_NAME "org.freedesktop.ConsoleKit" +gint limit_vts = 0; + static void bus_proxy_destroyed_cb (DBusGProxy *bus_proxy, CkManager *manager); @@ -273,6 +275,7 @@ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL }, { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &no_daemon, N_("Don't become a daemon"), NULL }, { "timed-exit", 0, 0, G_OPTION_ARG_NONE, &do_timed_exit, N_("Exit after a time - for debugging"), NULL }, + { "limit-vts", 'l', 0, G_OPTION_ARG_INT, &limit_vts, N_("Limit the number of VTs to monitor"), NULL }, { NULL } }; Index: consolekit-0.2.3/src/ck-vt-monitor.c =================================================================== --- consolekit-0.2.3.orig/src/ck-vt-monitor.c 2008-06-15 11:51:06.000000000 +0200 +++ consolekit-0.2.3/src/ck-vt-monitor.c 2008-06-15 11:58:47.000000000 +0200 @@ -46,6 +46,8 @@ #define CK_VT_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CK_TYPE_VT_MONITOR, CkVtMonitorPrivate)) +extern gint limit_vts; + struct CkVtMonitorPrivate { int vfd; @@ -348,6 +350,9 @@ /* FIXME: this can fail on solaris and freebsd */ } + if ( (limit_vts < max_consoles) && (limit_vts != 0) ) + max_consoles = limit_vts; + for (i = 1; i < max_consoles; i++) { gpointer id; Index: consolekit-0.2.3/src/test-vt-monitor.c =================================================================== --- consolekit-0.2.3.orig/src/test-vt-monitor.c 2008-06-15 12:02:24.000000000 +0200 +++ consolekit-0.2.3/src/test-vt-monitor.c 2008-06-15 12:02:50.000000000 +0200 @@ -39,6 +39,8 @@ #include "ck-vt-monitor.h" #include "ck-sysdeps.h" +gint limit_vts = 0; + static void activated_cb (CkVtMonitor *monitor, guint num, Index: consolekit-0.2.3/debian/org.freedesktop.ConsoleKit.service =================================================================== --- consolekit-0.2.3.orig/debian/org.freedesktop.ConsoleKit.service 2008-06-15 12:36:21.000000000 +0200 +++ consolekit-0.2.3/debian/org.freedesktop.ConsoleKit.service 2008-06-15 12:36:27.000000000 +0200 @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.ConsoleKit -Exec=/usr/sbin/console-kit-daemon +Exec=/usr/sbin/console-kit-daemon -l 12 User=root