x2gobroker.brokers.zeroconf_broker module

x2gobroker.brokers.zeroconf_broker.X2GoBroker class - a demo X2GoBroker implementations that needs not configuration at all

class x2gobroker.brokers.zeroconf_broker.X2GoBroker(config_file=None, config_defaults=None)[source]

Bases: x2gobroker.brokers.base_broker.X2GoBroker

backend_name = 'zeroconf'
list_profiles(username)[source]

Retrieve a list of session profiles for the authenticated user.

With the zeroconf broker backend, this list of session profiles is hard-coded. This if for testing purposes, only.

Parameters:username (str) – query session profile list for this user
Returns:list of profile dictionaries
Return type:dict
select_session(profile_id, username=None, **kwargs)[source]

Start/resume a session by selecting a profile name offered by the X2Go client.

With the zeroconf broker backend, the X2Go server that the session is launched on is hard-coded (localhost, port 22). This is for testing purposes only.

Parameters:
  • profile_id (str) – the selected profile ID. This matches one of the dictionary keys offered by the list_profiles method
  • username (str) – specify X2Go Server username that this operation runs for
  • pubkey (str) – The broker clients may send us a public key that we may temporarily install into a remote X2Go Server for non-interactive login
Returns:

the seclected session (X2Go session ID)

Return type:

str