From 214716561bc27c38b414e93e1dc28e77a6951c5c Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 21 Sep 2011 07:55:44 +0000 Subject: Enhance smartauthmon VT detection on login git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/smartcardauth@1254814 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/smartauthmon.cpp | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) (limited to 'src/smartauthmon.cpp') diff --git a/src/smartauthmon.cpp b/src/smartauthmon.cpp index db109a5..f122cc0 100644 --- a/src/smartauthmon.cpp +++ b/src/smartauthmon.cpp @@ -573,7 +573,7 @@ int main (int argc, char *argv[]) usebasedisplay=1; } } - if (!resultbkp.contains(",vt")) { + if (!resultbkp.contains(":")) { newdisplay = exec("ls /var/run/xdmctl/ | grep 'xdmctl-:0'"); printf("[DEBUG 400.d] %s\n\r", newdisplay.ascii()); if (newdisplay != "") { @@ -582,30 +582,40 @@ int main (int argc, char *argv[]) } printf("[DEBUG 400.e] Creating new session\n\r"); + if (usebasedisplay) { + printf("[DEBUG 400.e] Using base display\n\r"); + } // Attempt login - // Find next sequential inactive display - // FIXME - // This assumes the original VT is on display 0 at all times - int minvt = 0; - TQStringList sessionList = TQStringList::split('\t', result, false); - for (newdisplayint = minvt; newdisplayint