[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 97d230cbdc173bf199f3bc9b31445ca85a42f87d
X2Go dev team
git-admin at x2go.org
Tue Aug 27 13:20:54 CEST 2013
The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
via 97d230cbdc173bf199f3bc9b31445ca85a42f87d (commit)
from 660d3644c2cd99461bf489716edba8454a164b9b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
pyhoca-gui | 55 +++++++++++++++++++++++++++++++++++++++++-----
pyhoca/wxgui/frontend.py | 27 +++++++++++++++++++----
2 files changed, 73 insertions(+), 9 deletions(-)
The diff of changes is:
diff --git a/pyhoca-gui b/pyhoca-gui
index 906c0fd..9558dfe 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -57,6 +57,16 @@ if _X2GOCLIENT_OS == 'Windows':
from x2go import X2goLogger as _X2goLogger
from x2go import x2go_cleanup as _x2go_cleanup
+# X2go backends
+from x2go.defaults import BACKENDS_CONTROLSESSION, BACKEND_CONTROLSESSION_DEFAULT
+from x2go.defaults import BACKENDS_TERMINALSESSION, BACKEND_TERMINALSESSION_DEFAULT
+from x2go.defaults import BACKENDS_SERVERSESSIONINFO, BACKEND_SERVERSESSIONINFO_DEFAULT
+from x2go.defaults import BACKENDS_SERVERSESSIONLIST, BACKEND_SERVERSESSIONLIST_DEFAULT
+from x2go.defaults import BACKENDS_PROXY, BACKEND_PROXY_DEFAULT
+from x2go.defaults import BACKENDS_SESSIONPROFILES, BACKEND_SESSIONPROFILES_DEFAULT
+from x2go.defaults import BACKENDS_CLIENTSETTINGS, BACKEND_CLIENTSETTINGS_DEFAULT
+from x2go.defaults import BACKENDS_CLIENTPRINTING, BACKEND_CLIENTPRINTING_DEFAULT
+
from pyhoca.wxgui import __VERSION__ as _version
from pyhoca.wxgui import PyHocaGUI
@@ -129,6 +139,23 @@ if _X2GOCLIENT_OS == 'Windows':
_installed_xservers = _x.installed_xservers
+if _X2GOCLIENT_OS == 'Windows':
+ _config_backends = ('FILE', 'WINREG')
+elif _X2GOCLIENT_OS == 'Linux':
+ _config_backends = ('FILE', 'GCONF')
+else:
+ _config_backends = ('FILE')
+
+for _profiles_backend_default in _config_backends:
+ if BACKENDS_SESSIONPROFILES[_profiles_backend_default] == BACKEND_SESSIONPROFILES_DEFAULT:
+ break
+for _settings_backend_default in _config_backends:
+ if BACKENDS_CLIENTSETTINGS[_settings_backend_default] == BACKEND_CLIENTSETTINGS_DEFAULT:
+ break
+for _printing_backend_default in _config_backends:
+ if BACKENDS_CLIENTPRINTING[_printing_backend_default] == BACKEND_CLIENTPRINTING_DEFAULT:
+ break
+
# debug options...
debug_options = [
{'args':['-d','--debug'], 'default': False, 'action': 'store_true', 'help': 'enable application debugging code', },
@@ -150,11 +177,27 @@ x2go_gui_options = [
{'args':['--disable-profilemanager'], 'default': False, 'action': 'store_true', 'help': 'disable the session profile manager window', },
{'args':['--display'], 'default': None, 'metavar': '<hostname>:<screennumber>', 'help': 'set the DISPLAY environment variable to <hostname>:<screennumber>', },
]
+backend_options = [
+ {'args':['--backend-controlsession'], 'default': None, 'metavar': 'CONTROLSESSION_BACKEND', 'choices': BACKENDS_CONTROLSESSION.keys(), 'help': 'force usage of a certain CONTROLSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
+ {'args':['--backend-terminalsession'], 'default': None, 'metavar': 'TERMINALSESSION_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain TERMINALSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
+ {'args':['--backend-serversessioninfo'], 'default': None, 'metavar': 'SERVERSESSIONINFO_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain SERVERSESSIONINFO_BACKEND (do not use this unless you know exactly what you are doing)', },
+ {'args':['--backend-serversessionlist'], 'default': None, 'metavar': 'SERVERSESSIONLIST_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain SERVERSESSIONLIST_BACKEND (do not use this unless you know exactly what you are doing)', },
+ {'args':['--backend-proxy'], 'default': None, 'metavar': 'PROXY_BACKEND', 'choices': BACKENDS_PROXY.keys(), 'help': 'force usage of a certain PROXY_BACKEND (do not use this unless you know exactly what you are doing)', },
+ {'args':['--backend-sessionprofiles'], 'default': None, 'metavar': 'SESSIONPROFILES_BACKEND', 'choices': _config_backends, 'help': 'use given backend for accessing session profiles, available backends on your system: %s, (default: %s)' % (', '.join(_config_backends), _profiles_backend_default), },
+ {'args':['--backend-clientsettings'], 'default': None, 'metavar': 'CLIENTSETTINGS_BACKEND', 'choices': _config_backends, 'help': 'use given backend for accessing the client settings configuration, available backends on your system: %s, (default: %s)' % (', '.join(_config_backends), _settings_backend_default), },
+ {'args':['--backend-clientprinting'], 'default': None, 'metavar': 'CLIENTPRINTING_BACKEND', 'choices': _config_backends, 'help': 'use given backend for accessing the client printing configuration, available backends on your system: %s, (default: %s)' % (', '.join(_config_backends), _printing_backend_default), },
+ ]
+
if _X2GOCLIENT_OS == 'Windows':
xserver_options = [
{'args':['--start-xserver'], 'default': False, 'action': 'store_true', 'help': 'start the XServer before starting PyHoca-GUI, detect best XServer automatically, if more than one XServer is installed on your system', },
{'args':['-X', '--preferred-xserver'], 'default': None, 'metavar': 'XSERVER', 'choices': _known_xservers, 'help': 'start either of the currently supported XServers: %s -- make sure your preferred XServer is installed on your system' % _known_xservers, },
]
+ portable_options = [
+ {'args':['--config-rootdir'], 'default': os.path.join(os.environ['USERPROFILE'], '.x2goclient'), 'help': 'define an alternative location where to find plain text config files (default: %USERPROFILE/.x2goclient). This option is only effective when used together with ,,--backend-profiles FILE'')', },
+ {'args':['--sessions-rootdir'], 'default': os.path.join(os.environ['USERPROFILE'], '.x2go'), 'help': 'define an alternative location for session runtime files (default: %USERPROFILE%\\.x2go', },
+ {'args':['--ssh-rootdir'], 'default': os.path.join(os.environ['USERPROFILE'], '.x2go', 'ssh'), 'help': 'define an alternative location for SSH files (default: %USERPROFILE%\\.x2go\\ssh', },
+ ]
def parseargs():
@@ -165,14 +208,16 @@ def parseargs():
p = argparse.ArgumentParser(description='Graphical X2go client implemented in (wx)Python.',\
formatter_class=argparse.RawDescriptionHelpFormatter, \
add_help=True, argument_default=None)
- p_debugopts = p.add_argument_group('debug options')
- p_guiopts = p.add_argument_group('PyHoca GUI options')
- p_xserveropts = p.add_argument_group('XServer options (MS Windows only)')
+ p_debugopts = p.add_argument_group('Debug options')
+ p_guiopts = p.add_argument_group('PyHoca-GUI options')
+ p_backendopts = p.add_argument_group('Python X2go backend options (for experts only)')
if _X2GOCLIENT_OS == 'Windows':
- _option_groups = ((p_guiopts, x2go_gui_options), (p_debugopts, debug_options), (p_xserveropts, xserver_options))
+ p_xserveropts = p.add_argument_group('XServer options (MS Windows only)')
+ p_portableopts = p.add_argument_group('File locations for portable setups (MS Windows only)')
+ _option_groups = ((p_guiopts, x2go_gui_options), (p_debugopts, debug_options), (p_xserveropts, xserver_options), (p_portableopts, portable_options), (p_backendopts, backend_options), )
else:
- _option_groups = ((p_guiopts, x2go_gui_options), (p_debugopts, debug_options))
+ _option_groups = ((p_guiopts, x2go_gui_options), (p_debugopts, debug_options), (p_backendopts, backend_options), )
for (p_group, opts) in _option_groups:
required = False
for opt in opts:
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 1bce4fe..f48b00b 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -106,11 +106,30 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
wx.SplashScreen(splash_bitmap, wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT, 3000, None, style=wx.SIMPLE_BORDER|wx.STAY_ON_TOP)
wx.Yield()
+ _x2goclient_kwargs = {
+ 'logger': self._pyhoca_liblogger,
+ }
+ if self.args.backend_controlsession is not None:
+ _x2goclient_kwargs['control_backend'] = self.args.backend_controlsession
+ if self.args.backend_terminalsession is not None:
+ _x2goclient_kwargs['terminal_backend'] = self.args.backend_terminalsession
+ if self.args.backend_serversessioninfo is not None:
+ _x2goclient_kwargs['info_backend'] = self.args.backend_serversessioninfo
+ if self.args.backend_serversessionlist is not None:
+ _x2goclient_kwargs['list_backend'] = self.args.backend_serversessionlist
+ if self.args.backend_proxy is not None:
+ _x2goclient_kwargs['proxy_backend'] = self.args.backend_proxy
+ if self.args.backend_sessionprofiles is not None:
+ _x2goclient_kwargs['profiles_backend'] = self.args.backend_sessionprofiles
+ if self.args.backend_clientsettings is not None:
+ _x2goclient_kwargs['settings_backend'] = self.args.backend_clientsettings
+ if self.args.backend_clientprinting is not None:
+ _x2goclient_kwargs['printing_backend'] = self.args.backend_clientprinting
+
if x2go.X2GOCLIENT_OS == 'Windows':
- x2go.X2goClient.__init__(self, start_xserver=self.args.start_xserver, logger=self._pyhoca_liblogger)
- else:
- x2go.X2goClient.__init__(self, logger=self._pyhoca_liblogger)
+ _x2goclient_kwargs['start_xserver'] = self.args.start_xserver
+ x2go.X2goClient.__init__(self, **_x2goclient_kwargs)
self.SetAppName(self.appname)
self.SetVendorName(self.vendorname)
self.startGUI()
@@ -220,7 +239,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
self.taskbar.Destroy()
self.about.Close()
self.about.Destroy()
-
+
# the taskbar's OnExit method...
def OnTaskbarExit(self, evt):
"""\
hooks/post-receive
--
pyhoca-gui.git (Python X2Go Client (wxPython GUI))
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).
More information about the x2go-commits
mailing list