forked from p15670423/monkey
Small hack to support fast-user switching when RDPing to already loggen-in host
Although it doesn't always happen, because there is no easy wasy to know - trying to press YES on the dialog box (if any) can help the login process
This commit is contained in:
parent
d1f218daad
commit
155a03efad
|
@ -140,6 +140,11 @@ class KeyPressRDPClient(rdp.RDPClientObserver):
|
||||||
time.sleep(KEYS_SENDER_SLEEP)
|
time.sleep(KEYS_SENDER_SLEEP)
|
||||||
|
|
||||||
def onReady(self):
|
def onReady(self):
|
||||||
|
time.sleep(1)
|
||||||
|
reactor.callFromThread(self._controller.sendKeyEventUnicode, ord('Y'), True)
|
||||||
|
time.sleep(1)
|
||||||
|
reactor.callFromThread(self._controller.sendKeyEventUnicode, ord('Y'), False)
|
||||||
|
time.sleep(1)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def onClose(self):
|
def onClose(self):
|
||||||
|
@ -147,6 +152,7 @@ class KeyPressRDPClient(rdp.RDPClientObserver):
|
||||||
self.closed = True
|
self.closed = True
|
||||||
|
|
||||||
def onSessionReady(self):
|
def onSessionReady(self):
|
||||||
|
LOG.debug("Logged in, session is ready for work")
|
||||||
self._last_update = time.time()
|
self._last_update = time.time()
|
||||||
self._keys_thread.start()
|
self._keys_thread.start()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue