fix wayland compatibility, add dbus session test script
This commit is contained in:
parent
83b3e075f4
commit
5e7a7dc2ac
20
play zone/listSession.py
Executable file
20
play zone/listSession.py
Executable file
@ -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')
|
@ -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]:
|
||||
|
Loading…
Reference in New Issue
Block a user