x2go.backends.info.plain module¶
X2GoServerSessionList and X2GoServerSessionInfo classes - data handling for X2Go server sessions.
This backend handles X2Go server implementations that respond with session infos via server-side PLAIN text output.
-
class
x2go.backends.info.plain.X2GoServerSessionInfo[source]¶ Bases:
objectx2go.backends.info.plain.X2GoServerSessionInfois used to store all information that is retrieved from the connected X2Go server onX2GoTerminalSession.start()resp.X2GoTerminalSession.resume().-
clear()[source]¶ Clear all properties of a
x2go.backends.info.plain.X2GoServerSessionInfoobject.
-
get_session_type()[source]¶ Get the session type (i.e. ‘D’, ‘K’, ‘R’, ‘S’ or ‘P’).
Returns: session type Return type: strorNone(if not initialized)
Get the share mode of a shadow session.
Returns: share mode (0: view-only, 1: full access), Nonewhen used for non-desktop-sharing sessionsReturn type: strorNone(if not initialized)
-
get_status()[source]¶ Retrieve the session’s status from this session info data structure.
Returns: session status Return type: strorNone(if not initalized)
-
initialize(x2go_output, username='', hostname='', local_container='', remote_container='')[source]¶ Setup a a session info data block, includes parsing of X2Go server’s
x2gostartagentstdout values.Parameters: - x2go_output (str) – X2Go server’s
x2gostartagentcommand output, each value separated by a newline character. - username (str) – session user name (Default value = ‘’)
- hostname (str) – hostname of X2Go server (Default value = ‘’)
- local_container (str) – X2Go client session directory for config files, cache and session logs (Default value = ‘’)
- remote_container (str) – X2Go server session directory for config files, cache and session logs (Default value = ‘’)
- x2go_output (str) – X2Go server’s
-
is_desktop_session()[source]¶ Is this session a desktop session?
Returns: Trueif this session is a desktop session,FalseotherwiseReturn type: boolorNone(if not initialized)
-
is_kdrive_session()[source]¶ Is this session a KDrive based desktop session?
Returns: Trueif this session is a KDrive based desktop session,FalseotherwiseReturn type: bool
-
is_nx3_session()[source]¶ Is this session an NXv3 based desktop/rootless session?
Returns: Trueif this session is a NXv3 based desktop/rootless session,FalseotherwiseReturn type: bool
-
is_published_applications_provider()[source]¶ Detect from session info if this session is a published applications provider.
Returns: returns Trueif this session is a published applications providerReturn type: boolorNone(if not initialized)
-
is_running()[source]¶ Is this session running?
Returns: Trueif the session is running,FalseotherwiseReturn type: boolorNone(if not initialized)
-
is_suspended()[source]¶ Is this session suspended?
Returns: Trueif the session is suspended,FalseotherwiseReturn type: boolorNone(if not initialized)
-
update(session_info)[source]¶ Update all properties of a
x2go.backends.info.plain.X2GoServerSessionInfoobject.Parameters: session_info ( X2GoServerSessionInfo*) – a provided session info data structure
-
-
class
x2go.backends.info.plain.X2GoServerSessionList(x2go_output=None, info_backend=<class 'x2go.backends.info.plain.X2GoServerSessionInfo'>)[source]¶ Bases:
objectx2go.backends.info.plain.X2GoServerSessionListis used to store all information that is retrieved from a connected X2Go server on aX2GoControlSession.list_sessions()call.-
get_session_info(session_name)[source]¶ Retrieve the session information for
<session_name>.Parameters: session_name ( str) – the queried session nameReturns: the session info of <session_name>Return type: X2GoServerSessionInfo*orNone
-
get_session_with(property_name, value, hostname=None)[source]¶ Find session with a given display number on a given host.
Parameters: - property_name (
str) – match a session based on this property name - value (
str) – the resulting session has to match this value for<property_name> - hostname (
str) – the result has to match this hostname (Default value = None)
- property_name (
-