From 5e7a7dc2aca128dcb71d85bc3da7217a02a1ea69 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 11 Mar 2018 17:29:31 +0100 Subject: [PATCH] fix wayland compatibility, add dbus session test script --- play zone/listSession.py | 20 ++++++++++++++++++++ src/fenrir/screenDriver/vcsaDriver.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 play zone/listSession.py diff --git a/play zone/listSession.py b/play zone/listSession.py new file mode 100755 index 00000000..7a0d0da3 --- /dev/null +++ b/play zone/listSession.py @@ -0,0 +1,20 @@ +#!/bin/python +import dbus +try: + bus = dbus.SystemBus() + obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1') + inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager') + ListSessions = inf.get_dbus_method('ListSessions') + sessions = ListSessions() + for session in sessions: + obj = bus.get_object('org.freedesktop.login1', session[4]) + inf = dbus.Interface(obj, 'org.freedesktop.DBus.Properties') + sessionType = inf.Get('org.freedesktop.login1.Session', 'Type') + screen = str(inf.Get('org.freedesktop.login1.Session', 'VTNr')) + if screen == '': + screen = str(inf.Get('org.freedesktop.login1.Session', 'TTY')) + print('Session:', screen, 'Type:', sessionType.upper(), 'Details:', session) + else: + print('Session:', screen, 'Type:', sessionType.upper(), 'Details:', session) +except: + print('no access') diff --git a/src/fenrir/screenDriver/vcsaDriver.py b/src/fenrir/screenDriver/vcsaDriver.py index d7a31cb2..93cad131 100644 --- a/src/fenrir/screenDriver/vcsaDriver.py +++ b/src/fenrir/screenDriver/vcsaDriver.py @@ -104,7 +104,7 @@ class driver(screenDriver): if screen == '': self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR) return - if sessionType.upper() == 'X11': + if sessionType.upper() != 'TTY': self.env['screen']['autoIgnoreScreens'].append(screen) if screen == self.env['screen']['newTTY'] : if self.env['general']['currUser'] != session[2]: