Package x2go :: Module client

[frames] | no frames]

# Module client

source code

X2GoClient is a public API class. Use this class in your Python X2Go based applications. Use it as a parent class for your own object oriented X2GoClient'ish class implementation.

# Supported Features

Supported features are:

- X2Go multi-session management
- keep track of initiated sessions
- grant access to X2Go client config files: `settings`, `printing`, `sessions` and `xconfig` (Windows only) as normally found in `~/.x2goclient`
- instantiate an X2Go session by a set of Python parameters
- load a session profile from x2goclient's `sessions` configuration file and start the---profile-based pre-configured---session
- sharing of local folders with remote X2Go sessions
- enabling and mangaging X2Go printing (real printing, viewing as PDF, saving to a local folder or executing a custom »print« command
- transparent tunneling of audio (Pulseaudio, ESD)
- sharing of other desktops
- LDAP support for X2Go server clusters (NOT IMPLEMENTED YET)

# Non-Profile Sessions

A new non-profile based X2Go session within an X2GoClient instance is setup in the following way:

- import the Python X2Go module and call the session constructor:

         import x2go
         x2go_client = x2go.X2GoClient()

- register a new X2GoClient session; this creates an X2GoSession instance and calls its constructor method:

       x2go_sess_uuid = x2go_client.register_session(<many-options>)

- connect to the session's remote X2Go server (SSH/Paramiko):

         x2go_client.connect_session(x2go_sess_uuid)

- via the connected X2Go client session you can start or resume a remote X-windows session on an X2Go server now:

       x2go_client.start_session(x2go_sess_uuid)

  resp.:

       x2go_client.resume_session(x2go_sess_uuid, session_name=<session_name_of_resumable_session>)

- a list of available sessions on the respective server (for resuming) can be obtained in this way:

       x2go_client.list_sessions(x2go_sess_uuid, session_name=<session_name_of_resumable_session>)

# Profiled Sessions

A new profile based X2Go session (i.e. using pre-defined session profiles) within an X2GoClient instance is setup in a much easier way:

- import the Python X2Go module and call the session constructor:

         import x2go
         x2go_client = x2go.X2GoClient()

- register an X2GoClient session based on a pre-configured session profile:

         x2go_sess_uuid = x2go_client.register_session(profile_name=<session_profile_name>)

- or alternatively by the profile id in the »sessions« file (the name of the [<section>] in the »sessions« file:

       x2go_sess_uuid = x2go_client.register_session(profile_id=<session_profile_id>)

- now you proceed in a similar way as shown above:

         x2go_client.connect_session(x2go_sess_uuid)
         x2go_client.start_session(x2go_sess_uuid)

       resp.::

         x2go_client.resume_session(x2go_sess_uuid, session_name=<session_name_of_resumable_session>)

# Session Suspending/Terminating

You can suspend or terminate your sessions by calling the follwing commands:

       x2go_client.suspend_session(x2go_sess_uuid)

resp.:

       x2go_client.terminate_session(x2go_sess_uuid)

Classes
| X2GoClient The X2GoClient implements _THE_ public Python X2Go API.

Variables
| __NAME__ = ``'``x2goclient-pylib``'``
| __package__ = ``'``x2go``'``