Public API class for launching X2go sessions. Recommended is to manage
X2go sessions from within an X2goClient instance. However, Python X2go is designed in
a way that it also allows the management of singel X2goSession
instance.
|
__init__(self,
server=None,
control_session=None,
use_sshproxy=False,
profile_id=None,
profile_name=' UNKNOWN ' ,
session_name=None,
printing=False,
allow_mimebox=False,
mimebox_extensions=[ ] ,
mimebox_action=' OPEN ' ,
allow_share_local_folders=False,
share_local_folders=[ ] ,
control_backend=<class 'x2go.backends.control._stdout.X2goControlSessionSTDOUT'>,
terminal_backend=<class 'x2go.backends.terminal._stdout.X2goTerminalSessionSTDO... ,
info_backend=<class 'x2go.backends.info._stdout.X2goServerSessionInfoSTDOUT'>,
list_backend=<class 'x2go.backends.info._stdout.X2goServerSessionListSTDOUT'>,
proxy_backend=<class 'x2go.backends.proxy._nx3.X2goProxyNX3'>,
settings_backend=<class 'x2go.backends.settings._file.X2goClientSettingsFILE'>,
printing_backend=<class 'x2go.backends.printing._file.X2goClientPrintingFILE'>,
client_rootdir=' /home/buildd/.x2goclient ' ,
sessions_rootdir=' /home/buildd/.x2go ' ,
ssh_rootdir=' /home/buildd/.ssh ' ,
keep_controlsession_alive=False,
add_to_known_hosts=False,
known_hosts=None,
logger=None,
loglevel=56,
connected=False,
virgin=True,
running=None,
suspended=None,
terminated=None,
faulty=None,
client_instance=None,
**params)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
bool
|
|
|
init_control_session(self)
Initialize a new control session (X2goControlSession* ). |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str
|
|
bool
|
|
str
|
get_password(self)
After a session has been setup up you can query the username's
password from the session. |
source code
|
|
tuple
|
get_server_peername(self)
After a session has been setup up you can query the peername of the
host this session is connected to (or about to connect to). |
source code
|
|
str
|
get_server_hostname(self)
After a session has been setup up you can query the hostname of the
host this session is connected to (or about to connect to). |
source code
|
|
str
|
get_server_port(self)
After a session has been setup up you can query the IP socket port
used for connecting the remote X2go server. |
source code
|
|
str
|
|
str
|
|
X2goControlSession* instance
|
|
bool
|
|
X2goControlTerminal* instance
|
|
bool
|
|
bool
|
|
bool
|
|
|
connect(self,
username='
' ,
password='
' ,
add_to_known_hosts=False,
force_password_auth=False,
use_sshproxy=False,
sshproxy_user='
' ,
sshproxy_password='
' )
Connects to the X2goSession's server host. |
source code
|
|
bool
|
|
|
set_print_action(self,
print_action,
**kwargs)
If X2go client-side printing is enable within this X2go session you
can use this method to alter the way how incoming print spool jobs
are handled/processed. |
source code
|
|
bool
|
is_alive(self)
Find out if this X2go session is still alive (that is: connected to
the server). |
source code
|
|
|
clean_sessions(self)
Clean all running sessions for the authenticated user on the remote
X2go server. |
source code
|
|
X2goServerSessionList* instance or list
|
list_sessions(self,
raw=False)
List all sessions on the remote X2go server that are owned by the
authenticated user |
source code
|
|
list
|
list_desktops(self,
raw=False)
List X2go desktops sessions available for desktop sharing on the
remote X2go server. |
source code
|
|
|
|
bool
|
resume(self,
session_name=None)
Resume or continue a suspended / running X2go session on the remote
X2go server. |
source code
|
|
bool
|
|
bool
|
share_desktop(self,
desktop=None,
user=None,
display=None,
share_mode=0,
check_desktop_list=True)
Share an already running X2go session on the remote X2go server
locally. |
source code
|
|
bool
|
|
bool
|
|
str
|
|
str
|
|
bool
|
|
str
|
|
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
|
session_cleanup(self)
Clean up X2go session. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|