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,
port=22,
control_session=None,
use_sshproxy=False,
sshproxy_reuse_authinfo=False,
profile_id=None,
profile_name=' UNKNOWN ' ,
session_name=None,
auto_start_or_resume=False,
auto_connect=False,
printing=False,
allow_mimebox=False,
mimebox_extensions=[ ] ,
mimebox_action=' OPEN ' ,
allow_share_local_folders=False,
share_local_folders=[ ] ,
restore_shared_local_folders=False,
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=' /sbuild-nonexistent/.x2goclient ' ,
sessions_rootdir=' /sbuild-nonexistent/.x2go ' ,
ssh_rootdir=' /sbuild-nonexistent/.ssh ' ,
keep_controlsession_alive=False,
add_to_known_hosts=False,
known_hosts=None,
forward_sshagent=False,
logger=None,
loglevel=56,
connected=False,
activated=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
|
|
|
|
|
|
|
|
|
|
|
|
|
HOOK_on_control_session_death(self)
HOOK method: called if a control session (server connection) has
unexpectedly encountered a failure. |
source code
|
|
|
HOOK_auto_connect(self)
HOOK method: called if the session demands to auto connect. |
source code
|
|
|
HOOK_session_startup_failed(self)
HOOK method: called if the startup of a session failed. |
source code
|
|
|
HOOK_list_desktops_timeout(self)
HOOK method: called if the x2golistdesktops command generates a
timeout due to long execution time. |
source code
|
|
|
HOOK_no_such_desktop(self,
desktop=' UNKNOWN ' )
HOOK method: called if it is tried to connect to a shared desktop
that's not available (anymore). |
source code
|
|
|
|
|
|
|
HOOK_printing_not_available(self)
HOOK method: called if X2Go client-side printing is not available. |
source code
|
|
|
HOOK_mimebox_not_available(self)
HOOK method: called if the X2Go MIME box is not available. |
source code
|
|
|
HOOK_foldersharing_not_available(self)
HOOK method: called if X2Go client-side folder-sharing is not
available. |
source code
|
|
|
HOOK_sshfs_not_available(self)
HOOK method: called if the X2Go server denies SSHFS access. |
source code
|
|
bool
|
|
|
init_control_session(self)
Initialize a new control session (X2GoControlSession* ). |
source code
|
|
bool
|
|
|
|
|
unset_master_session(self)
Declare this as a non-master session of a connection channel. |
source code
|
|
|
|
|
|
|
|
bool,str,int
|
|
|
|
str
|
|
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
|
|
tuple
|
remote_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
|
|
|
|
obj
|
|
str
|
|
str
|
|
str
|
|
X2GoControlSession* instance
|
|
bool
|
|
X2GoControlTerminal* instance
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
|
connect(self,
username='
' ,
password='
' ,
add_to_known_hosts=False,
force_password_auth=False,
look_for_keys=None,
allow_agent=None,
use_sshproxy=None,
sshproxy_reuse_authinfo=False,
sshproxy_user='
' ,
sshproxy_password='
' ,
sshproxy_force_password_auth=False)
Connects to the X2GoSession's server host. |
source code
|
|
bool
|
|
|
retrieve_server_features(self)
Query the X2Go server for a list of supported features. |
source code
|
|
list
|
|
bool
|
|
|
|
|
raise_session_window(self)
Try to lift the session window above all other windows and bring it
to focus. |
source code
|
|
|
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,
destroy_terminals=True,
published_applications=False)
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
|
|
list
|
list_mounts(self,
raw=False)
Use the X2Go session registered under session_uuid to
retrieve its list of mounted client shares for that session. |
source code
|
|
|
|
bool
|
|
list
|
get_published_applications(self,
lang=None,
refresh=False,
raw=False,
very_raw=False,
max_no_submenus=10)
Return a list of published menu items from the X2Go server for
session type published applications. |
source code
|
|
|
|
bool
|
do_auto_start_or_resume(self,
newest=True,
oldest=False,
all_suspended=False,
start=True,
redirect_to_client=True)
Automatically start or resume this session, if already associated
with a server session. |
source code
|
|
|
reset_progress_status(self)
Reset session startup/resumption progress status. |
source code
|
|
int
|
|
bool
|
resume(self,
session_name=None,
session_list=None,
cmd=None,
progress_event=None)
Resume or continue a suspended / running X2Go session on the remote
X2Go server. |
source code
|
|
bool
|
start(self,
cmd=None,
progress_event=None)
Start a new X2Go session on the remote X2Go server. |
source code
|
|
bool
|
share_desktop(self,
desktop=None,
user=None,
display=None,
share_mode=0,
check_desktop_list=True,
progress_event=None)
Share an already running X2Go session on the remote X2Go server
locally. |
source code
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
str
|
|
str
|
|
bool
|
|
str
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
share_local_folder(self,
local_path=None,
folder_name=None,
update_exported_folders=True)
Share a local folder with this registered X2Go session. |
source code
|
|
bool
|
|
bool
|
|
bool
|
|
list
|
get_shared_folders(self,
check_list_mounts=False,
mounts=None)
Get a list of local folders mounted within this X2Go session from
this client. |
source code
|
|
|
session_cleanup(self)
Clean up X2Go session. |
source code
|
|
bool
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|