x2go.xserver module¶
-
class
x2go.xserver.
X2GoClientXConfig
(config_files=['/sbuild-nonexistent/.x2goclient/xconfig', '/etc/x2goclient/xconfig'], defaults={}, logger=None, loglevel=56)[source]¶ Bases:
x2go.inifiles.X2GoIniFile
Configuration file based XServer startup settings for X2GoClient instances.
This class is needed for Windows systems and (maybe soon) for Unix desktops using Wayland.
-
detect_unused_xdisplay_port
(xserver_name)[source]¶ Get an unused TCP/IP port for the to-be-launched X server and write it to the user’s X configuration file.
Parameters: xserver_name ( str
) – name of the XServer application
-
get_xserver_config
(xserver_name)[source]¶ Retrieve the XServer configuration (from the xconfig file) for the given XServer application.
Parameters: xserver_name ( str
) – name of the XServer applicationReturns: A Python dictionary containing the XServer’s configuration settings Return type: list
-
installed_xservers
¶ Among the known XServers renders a list of XServers that are actually installed on the system.
-
known_xservers
¶ Renders a list of XServers that are known to Python X2Go.
-
preferred_xserver
¶ Returns a tuple of (<xserver_name>, <xserver_config>).
Returns: xserver_name>, <xserver_config>) Return type: tuple
-
preferred_xserver_names
¶ Returns the list of preferred XServer names (most preferred first).
-
running_xservers
¶ Tries to render a list of running XServer processes from the system’s process list.
-
write
()[source]¶ Store the Xserver configuration to the storage backend (i.e. on disk).
For writing the first of the
config_files
specified on instance construction that is writable will be used.Returns: True
if the user config file has been successfully written,False
otherwise.Return type: bool
-
xserver_launch_needed
¶ Detect if an XServer launch is really needed (or if we use an already running XServer instance). Equals
True
if we have to launch an XServer before we can start/resume X2Go sessions.
-
xserver_launch_possible
¶ Detect if there is an XServer (that is known to Python X2Go) installed on the system. Equals
True
if we have found an installed XServer that we can launch.
-
-
class
x2go.xserver.
X2GoXServer
(xserver_name, xserver_config, logger=None, loglevel=56)[source]¶ Bases:
gevent.threading.Thread
This class is responsible for starting/stopping an external XServer application.
X2Go applications require a running XServer on the client system. This class will manage/handle the XServer while your X2Go application is running.
-
run
()[source]¶ Start this
x2go.xserver.X2GoXServer
thread. This will launch the configured XServer application.
-