Package x2go :: Package backends :: Package info :: Module plain :: Class X2GoServerSessionInfo
[frames] | no frames]

type X2GoServerSessionInfo

source code

object --+
         |
        X2GoServerSessionInfo

X2GoServerSessionInfo is used to store all information that is retrieved from the connected X2Go server on X2GoTerminalSession.start() resp. X2GoTerminalSession.resume().

Instance Methods
 
__str__(self) source code
 
__repr__(self) source code
bool
is_published_applications_provider(self)
Detect from session info if this session is a published applications provider.
source code
bool
is_running(self)
Is this session running?
source code
str
get_session_type(self)
Get the session type (i.e.
source code
str
get_share_mode(self)
Get the share mode of a shadow session.
source code
bool
is_suspended(self)
Is this session suspended?
source code
bool
is_desktop_session(self)
Is this session a desktop session?
source code
 
initialize(self, x2go_output, username='', hostname='', local_container='', remote_container='')
Setup a a session info data block, includes parsing of X2Go server's x2gostartagent stdout values.
source code
 
protect(self)
Write-protect this session info data structure.
source code
 
unprotect(self)
Remove write-protection from this session info data structure.
source code
 
is_protected(self) source code
str
get_status(self)
Retrieve the session's status from this session info data structure.
source code
 
clear(self)
Clear all properties of a X2GoServerSessionInfo object.
source code
 
update(self, session_info)
Update all properties of a X2GoServerSessionInfo object.
source code
 
__init__(self)
Class constructor, identical to clear() method.
source code
Method Details

__str__(self)
(Informal representation operator)

source code 
Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)

is_published_applications_provider(self)

source code 

Detect from session info if this session is a published applications provider.

Returns: bool
returns True if this session is a published applications provider

is_running(self)

source code 

Is this session running?

Returns: bool
True if the session is running, False otherwise

get_session_type(self)

source code 

Get the session type (i.e. 'D', 'R', 'S' or 'P').

Returns: str
session type

get_share_mode(self)

source code 

Get the share mode of a shadow session.

Returns: str
share mode (0: view-only, 1: full access), None when used for non-desktop-sharing sessions

is_suspended(self)

source code 

Is this session suspended?

Returns: bool
True if the session is suspended, False otherwise

is_desktop_session(self)

source code 

Is this session a desktop session?

Returns: bool
True if this session is a desktop session, False otherwise

initialize(self, x2go_output, username='', hostname='', local_container='', remote_container='')

source code 

Setup a a session info data block, includes parsing of X2Go server's x2gostartagent stdout values.

Parameters:
  • x2go_output (str) - X2Go server's x2gostartagent command output, each value separated by a newline character.
  • username (str) - session user name
  • hostname (str) - hostname of X2Go server
  • local_container (str) - X2Go client session directory for config files, cache and session logs
  • remote_container (str) - X2Go server session directory for config files, cache and session logs

get_status(self)

source code 

Retrieve the session's status from this session info data structure.

Returns: str
session status

update(self, session_info)

source code 

Update all properties of a X2GoServerSessionInfo object.

Parameters:
  • session_info (X2GoServerSessionInfo*) - a provided session info data structure

__init__(self)
(Constructor)

source code 

Class constructor, identical to clear() method.

Overrides: object.__init__