In the Python X2Go concept, X2Go sessions fall into two parts: a
control session and one to many terminal sessions.
The control session handles the SSH based communication between server
and client. It is mainly derived from paramiko.SSHClient
and
adds on X2Go related functionality.
|
__init__(self,
profile_name=' UNKNOWN ' ,
add_to_known_hosts=False,
known_hosts=None,
forward_sshagent=False,
unique_hostkey_aliases=False,
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'>,
client_rootdir=' /sbuild-nonexistent/.x2goclient ' ,
sessions_rootdir=' /sbuild-nonexistent/.x2go ' ,
ssh_rootdir=' /sbuild-nonexistent/.ssh ' ,
logger=None,
loglevel=56,
published_applications_no_submenus=0,
low_latency=False,
**kwargs)
Initialize an X2Go control session. |
source code
|
|
str
|
|
str
|
get_port(self)
Get the port number of the SSH connection as stored in the properties
of this control session. |
source code
|
|
|
|
|
__del__(self)
On instance descruction, do a proper session disconnect from the
server. |
source code
|
|
|
|
list
|
|
list
|
|
list
|
|
list
|
|
bool
|
|
bool
|
|
str
|
|
tuple
|
|
|
|
bool
|
|
bool
|
connect(self,
hostname,
port=22,
username=None,
password=None,
passphrase=None,
pkey=None,
key_filename=None,
timeout=None,
allow_agent=False,
look_for_keys=False,
use_sshproxy=False,
sshproxy_host=None,
sshproxy_port=22,
sshproxy_user=None,
sshproxy_password=None,
sshproxy_force_password_auth=False,
sshproxy_key_filename=None,
sshproxy_pkey=None,
sshproxy_look_for_keys=False,
sshproxy_passphrase='
' ,
sshproxy_allow_agent=False,
sshproxy_tunnel=None,
forward_sshagent=None,
unique_hostkey_aliases=None,
session_instance=None,
add_to_known_hosts=False,
force_password_auth=False)
Connect to an X2Go server and authenticate to it. |
source code
|
|
|
|
bool
|
|
bool
|
|
bool
|
|
bool
|
|
list
|
get_published_applications(self,
lang=None,
refresh=False,
raw=False,
very_raw=False,
max_no_submenus=10)
Retrieve the menu tree of published applications from the remote X2Go
server. |
source code
|
|
bool
|
|
bool
|
resume(self,
session_name=None,
session_instance=None,
session_list=None,
**kwargs)
Resume a running/suspended X2Go session. |
source code
|
|
bool
|
share_desktop(self,
desktop=None,
user=None,
display=None,
share_mode=0,
**kwargs)
Share another already running desktop session. |
source code
|
|
list
|
list_desktops(self,
raw=False,
maxwait=20)
List all desktop-like sessions of current user (or of users that have
granted desktop sharing) on the connected server. |
source code
|
|
list
|
list_mounts(self,
session_name,
raw=False,
maxwait=20)
List all mounts for a given session of the current user on the
connected server. |
source code
|
|
X2GoServerSessionList instance or str
|
|
|
clean_sessions(self,
destroy_terminals=True,
published_applications=False)
Find X2Go terminals that have previously been started by the
connected user on the remote X2Go server and terminate them. |
source code
|
|
bool
|
is_connected(self)
Returns True if this control session is connected to the
remote server (that is: if it has a valid Paramiko/SSH transport
object). |
source code
|
|
bool or None
|
is_running(self,
session_name)
Returns True if the given X2Go session is in running
state, False else. |
source code
|
|
bool or None
|
is_suspended(self,
session_name)
Returns True if the given X2Go session is in suspended
state, False else. |
source code
|
|
bool or None
|
has_terminated(self,
session_name)
Returns True if the X2Go session with name
<session_name> has been seen by this control
session and--in the meantime--has been terminated. |
source code
|
|
bool
|
suspend(self,
session_name)
Suspend X2Go session with name <session_name> on
the connected server. |
source code
|
|
bool
|
terminate(self,
session_name,
destroy_terminals=True)
Terminate X2Go session with name <session_name> on
the connected server. |
source code
|
|
Inherited from paramiko.client.SSHClient :
close ,
exec_command ,
get_host_keys ,
get_transport ,
invoke_shell ,
load_host_keys ,
load_system_host_keys ,
open_sftp ,
save_host_keys ,
set_log_channel ,
set_missing_host_key_policy
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|