From 89b8eb96c1cf76d393c0a96214c670ccfba8740e Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 24 Apr 2017 13:58:49 +0200 Subject: [PATCH 1/3] Update TODO v2.0 --- TODO v2.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO v2.0 b/TODO v2.0 index 25783e8e..c2d21d58 100644 --- a/TODO v2.0 +++ b/TODO v2.0 @@ -54,6 +54,7 @@ Driver: https://docs.python.org/3.2/library/pty.html - implement PTY Input driver - ATK input driver (don't grab on graphical interface) +https://git.linux-a11y.org/AIT/pyatspi2/src/master/examples/keypress.py - try to autodetect encoding (Easy for contribution) https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script From 7f1b00c741bbae1b02d2f25f1c519fd47cda0333 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 24 Apr 2017 14:11:18 +0200 Subject: [PATCH 2/3] Update TODO v2.0 --- TODO v2.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO v2.0 b/TODO v2.0 index c2d21d58..08ee3cf4 100644 --- a/TODO v2.0 +++ b/TODO v2.0 @@ -57,6 +57,8 @@ Driver: https://git.linux-a11y.org/AIT/pyatspi2/src/master/examples/keypress.py - try to autodetect encoding (Easy for contribution) https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script +- Dectalk SpeechDriver +https://github.com/tvraman/emacspeak/blob/master/servers/obsolete/python/dectalk.py Settings: - configuration should be overwritable with parameter and alternative paths (Easy for contribution) From 497f9eaa5cddc3b561b683a68b2ea6e887ebd330 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 30 Apr 2017 22:08:35 +0200 Subject: [PATCH 3/3] dont fill ignore screen list if loginD is not available --- src/fenrir/screenDriver/vcsaDriver.py | 55 ++++++++++++++------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/src/fenrir/screenDriver/vcsaDriver.py b/src/fenrir/screenDriver/vcsaDriver.py index cb432cc8..f4d572a1 100644 --- a/src/fenrir/screenDriver/vcsaDriver.py +++ b/src/fenrir/screenDriver/vcsaDriver.py @@ -65,32 +65,35 @@ class driver(): self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) def getSessionInformation(self): - bus = dbus.SystemBus() - if not self.ListSessions: - obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1') - inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager') - self.ListSessions = inf.get_dbus_method('ListSessions') - - sessions = self.ListSessions() - self.env['screenData']['autoIgnoreScreens'] = [] - 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')) - screen = screen[screen.upper().find('TTY') + 3:] - if screen == '': - self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR) - return - if sessionType.upper() == 'X11': - self.env['screenData']['autoIgnoreScreens'].append(screen) - if screen == self.env['screenData']['newTTY'] : - if self.env['generalInformation']['currUser'] != session[2]: - self.env['generalInformation']['prevUser'] = self.env['generalInformation']['currUser'] - self.env['generalInformation']['currUser'] = session[2] - + try: + bus = dbus.SystemBus() + if not self.ListSessions: + obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1') + inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager') + self.ListSessions = inf.get_dbus_method('ListSessions') + + sessions = self.ListSessions() + self.env['screenData']['autoIgnoreScreens'] = [] + 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')) + screen = screen[screen.upper().find('TTY') + 3:] + if screen == '': + self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR) + return + if sessionType.upper() == 'X11': + self.env['screenData']['autoIgnoreScreens'].append(screen) + if screen == self.env['screenData']['newTTY'] : + if self.env['generalInformation']['currUser'] != session[2]: + self.env['generalInformation']['prevUser'] = self.env['generalInformation']['currUser'] + self.env['generalInformation']['currUser'] = session[2] + except Exception as e: + self.env['runtime']['debug'].writeDebugOut('getSessionInformation: Maybe no LoginD:' + str(e),debug.debugLevel.ERROR) + self.env['screenData']['autoIgnoreScreens'] = [] def update(self, trigger='onUpdate'): newContentBytes = b'' try: