Module session
source code
X2GoSession class - a public API of Python X2Go, handling standalone
X2Go sessions.
This class is normally embedded into the context of an X2GoClient
instance, but it is also possible to address X2GoSessions
directly via this class.
To launch a session manually from the Python interactive shell,
perform these simple steps:
$ python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import x2go
>>> import gevent
Xlib.protocol.request.QueryExtension
>>> s = x2go.session.X2GoSession()
>>> s.set_server('<my.x2go.server>')
>>> s.set_port(<ssh-port>)
>>> s.connect('<my-login>', '<my-password>')
[<pidno>] (x2gocontrolsession-pylib) NOTICE: connecting to [<my.x2go.server>]:<ssh-port>
[<pidno>] (x2gosession-pylib) NOTICE: SSH host key verification for host [<my.x2go.server>]:<ssh-port> with SSH-RSA fingerprint ,,<ssh-fingerprint>'' initiated. We are seeing this X2Go server for the first time.
[<pidno>] (x2gosession-pylib) WARN: HOOK_check_host_dialog: host check requested for [<my.x2go.server>]:<ssh-port> with SSH-RSA fingerprint: ,,<ssh-fingerprint>''. Automatically adding host as known host.
True
>>> s.start(cmd="LXDE")
True
>>> while True: gevent.sleep(1)
X2GoSession
Public API class for launching X2Go sessions.
|
|
__NAME__ = ' x2gosession-pylib '
|
|
__package__ = ' x2go '
|