This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch brokerclient in repository pyhoca-gui. from c58e8ba more icon location detection fixes new 7e55da5 Session profile manager: the host parameter will be of type ListType for future versions of Python X2Go (>= 0.5.0.0). new 3b86d97 changelog: fix layout new a202a63 Focus the user name field on logon if no user name is stored in the session profile. new a5d95b3 Re-order cmdline sections (man page, defaults.py). new 6f01566 Add X2Go Session Broker support. The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 49 +++++++++++++---------- man/man1/pyhoca-gui.1 | 43 ++++++++++++++++++-- pyhoca/wxgui/defaults.py | 17 +++++++- pyhoca/wxgui/frontend.py | 57 ++++++++++++++++++++++++++- pyhoca/wxgui/launcher.py | 50 +++++++++++++++-------- pyhoca/wxgui/logon.py | 4 +- pyhoca/wxgui/menus_taskbar.py | 85 ++++++++++++++++++++++++++++------------ pyhoca/wxgui/messages.py | 3 +- pyhoca/wxgui/notify.py | 3 +- pyhoca/wxgui/profilemanager.py | 79 ++++++++++++++++++++++--------------- 10 files changed, 284 insertions(+), 106 deletions(-) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch brokerclient in repository pyhoca-gui. commit 7e55da528a0703101ad51f8542dd8873c442eff5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 17 13:53:47 2014 +0100 Session profile manager: the host parameter will be of type ListType for future versions of Python X2Go (>= 0.5.0.0). --- debian/changelog | 2 ++ pyhoca/wxgui/profilemanager.py | 61 +++++++++++++++++++++++----------------- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/debian/changelog b/debian/changelog index a54d8be..378d92c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,8 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low * NSIS script: make sure SetOutPath gets called at the beginning of every section. * Show printing preferences when tray icon is in restricted mode. + * Session profile manager: the host parameter will be of type ListType + for future versions of Python X2Go (>= 0.5.0.0). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 08 Jan 2014 21:28:37 +0100 diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py index 071b413..130f5f7 100644 --- a/pyhoca/wxgui/profilemanager.py +++ b/pyhoca/wxgui/profilemanager.py @@ -21,7 +21,7 @@ import wx import os import copy - +import types import re import x2go.log as log @@ -162,7 +162,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): elif self.profile_config['sshproxytunnel'].count(':') == 3: _from_host, _from_port, _to_host, _to_port = self.profile_config['sshproxytunnel'].split(':') - if _to_host: self.profile_config['host'] = _to_host + if _to_host: self.profile_config['host'] = [_to_host] if _to_port: self.profile_config['sshport'] = int(_to_port) self.profile_config['sshproxytunnel'] = 'DEPRECATED_CAN_BE_SAFELY_REMOVE' @@ -185,6 +185,15 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.tab_MediaResources = wx.Panel(self.X2GoTabs, -1) self.tab_SharedResources = wx.Panel(self.X2GoTabs, -1) + if not self.session_profiles.is_writable(self.profile_id): + self.tab_Profile.Enable(False) + self.tab_Session.Enable(False) + self.tab_Connection.Enable(False) + self.tab_LinkQuality.Enable(False) + self.tab_IO.Enable(False) + self.tab_MediaResources.Enable(False) + self.tab_SharedResources.Enable(False) + # boxes for all tabs self.staticbox_Profile = wx.StaticBox(self.tab_Profile, -1, ' %s ' % _(u'Session Title')) self.staticbox_Window = wx.StaticBox(self.tab_Profile, -1, ' %s ' % _(u'Session Window')) @@ -374,6 +383,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.OKButton.SetDefault() self.ApplyButton = wx.Button(self, -1, _(u"Apply")) self.CancelButton = wx.Button(self, -1, _(u"Cancel")) + if not self.session_profiles.is_writable(self.profile_id): + self.OKButton.Enable(False) + self.ApplyButton.Enable(False) self.__set_properties() self.__do_layout() @@ -855,7 +867,10 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.ProfileName.SetValue(self.profile_config['name']) self.SetSessionWindowTitle.SetValue(self.profile_config['setsessiontitle']) self.CustomSessionWindowTitle.SetValue(self.profile_config['sessiontitle']) - self.Host.SetValue(self.profile_config['host']) + if type(self.profile_config['host']) is types.ListType: + self.Host.SetValue(",".join(self.profile_config['host'])) + else: + self.Host.SetValue(self.profile_config['host']) self.UserName.SetValue(self.profile_config['user']) self.SSHPort.SetValue(self.profile_config['sshport']) self.SSHAutoLogin.SetValue(self.profile_config['autologin']) @@ -1119,26 +1134,15 @@ class PyHocaGUI_ProfileManager(wx.Dialog): # export = "{string(path_1)}:{boolint(autoconnect_1);...;string(path_n)}:{boolint(autoconnect_n)};" # rewrite path separator from "," to ";" to correct pyhoca-gui (<0.1.0.9) - if ',' in self.profile_config['export']: - self.profile_config['export'] = self.profile_config['export'].replace(',', ';') + #if ',' in self.profile_config['export']: + # self.profile_config['export'] = self.profile_config['export'].replace(',', ';') # strip off whitespaces and ";" from beginning and end of string - _shared_folders = self.profile_config['export'].strip().strip(';').strip() - # strip off '"' from beginning and end of string - _shared_folders = _shared_folders.strip('"') - # again: strip off whitespaces and ";" from beginning and end of string - _shared_folders = _shared_folders.strip().strip(';').strip() - - _shared_folders = [ sf for sf in _shared_folders.split(';') if sf ] - - for _shared_folder in _shared_folders: + _shared_folders = self.profile_config['export'].keys() - # support path names with and without ":" as separator between path and autoconnect flag (pyhoca-gui < 0.1.0.9) - if not re.match('^.*:(1|0)$', _shared_folder): - _shared_folder = "%s:1" % _shared_folder + for _shared_folder_path in _shared_folders: - _shared_folder_path = ":".join(_shared_folder.split(':')[:-1]) - if int(_shared_folder.split(':')[-1]): + if self.profile_config['export'][_shared_folder_path]: _shared_folder_autoconnect = _("automatically") else: _shared_folder_autoconnect = _("manually") @@ -1147,7 +1151,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): idx = self.SharedFoldersList.InsertStringItem(0, _shared_folder_path) self.SharedFoldersList.SetStringItem(idx, 1, _shared_folder_autoconnect) - if int(_shared_folder.split(':')[-1]): + if self.profile_config['export'][_shared_folder_path]: self.SharedFoldersList.CheckItem(idx) self.AddSharedFolderPathButton.Enable(False) @@ -1305,7 +1309,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.profile_config['icon'] = ':icons/128x128/x2gosession.png' self.profile_config['user'] = self.UserName.GetValue() self.profile_config['key'] = self.SSHKeyFile.GetValue() - self.profile_config['host'] = self.Host.GetValue() + _hosts = self.Host.GetValue() + self.profile_config['host'] = _hosts.split(',') self.profile_config['usesshproxy'] = self.UseSSHProxy.GetValue() if _session_type != 'DirectRDP': self.profile_config['sshport'] = self.SSHPort.GetValue() @@ -1557,9 +1562,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SoundPortLabel.Enable(False) self.SoundPort.Enable(False) self.Esd.Enable(False) - self.tab_SharedResources.Enable(True) + if self.session_profiles.is_writable(self.profile_id): + self.tab_SharedResources.Enable(True) self.RDPServer.Enable(False) - self.RDPServer.SetValue(self.Host.GetValue()) + _hosts = self.Host.GetValue() + # only one host address supported + self.RDPServer.SetValue(_hosts.split(',')[0]) self.RDPOptions.SetValue(self.profile_config_bak['directrdpsettings']) if self.Application.GetValue() in self.applicationChoices.keys(): self._last_application = self.Application.GetValue() @@ -1612,7 +1620,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.DefaultSoundPort.Enable(True) self.DefaultSoundPort.SetValue(True) self.Esd.Enable(True) - self.tab_SharedResources.Enable(True) + if self.session_profiles.is_writable(self.profile_id): + self.tab_SharedResources.Enable(True) self.RDPServer.SetValue(self.profile_config_bak['rdpserver']) self.RDPOptions.SetValue(self.profile_config_bak['rdpoptions']) if self.Application.GetValue() in self.rdpclientChoices.keys(): @@ -1761,7 +1770,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): else: self.profile_config_bak['rdpport'] = self.SSHPort.GetValue() self.profile_config_bak['directrdpsettings'] = self.RDPOptions.GetValue() - if self.RDPServer.GetValue() != self.Host.GetValue(): + if self.RDPServer.GetValue() != self.Host.GetValue().split(',')[0]: self.profile_config_bak['rdpserver'] = self.RDPServer.GetValue() self.profile_config_bak['rdpoptions'] = self.RDPOptions.GetValue() self.disable_DirectRDP() @@ -1889,7 +1898,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): """ if [ k for k in self.sessionChoices.keys() if self.sessionChoices[k] == self.SessionType.GetValue() ][0] == 'DirectRDP': - self.RDPServer.SetValue(self.Host.GetValue()) + self.RDPServer.SetValue(self.Host.GetValue().split(',')[0]) def OnSSHKeyFileBrowse(self, event): """\ -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch brokerclient in repository pyhoca-gui. commit 3b86d9791011d42c7d1cde844ad58d1db340f2f3 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 17 14:21:43 2014 +0100 changelog: fix layout --- debian/changelog | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/debian/changelog b/debian/changelog index 378d92c..4aefea7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,28 +1,29 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low - * Adapt to new backend concept found in Python X2Go (>= 0.5.0.0). - * Move most code of the pyhoca-gui executable into a dedicated class - named PyHocaGUI_Launcher. - * Allow automatic image branding (splash, about image, tray icon) by - setting another application name than the default. - * Rename icon files to match default application name (PyHoca-GUI). - * Make default cmdline option parameters overridable before the - arg parser gets initialized. - * Make SCRIPT_NAME in setup.py configurable (monkey-patchable). - * Make setup.py importable, only run setup() function on direct calls. - * Don't refer to py2exe anymore in nsis_template's naming scheme. - * Provide separate mswin_logging module. - * Install more modules into setup.exe: hmac (for ecdsa). - * NSIS script: empty installation destination before installing new files - into $INSTDIR. - * Allow appname based mini icons on About... windows. - * Make the hover text of the tray icon brandable (drop hard-coded - PyHoca-GUI application name). - * NSIS script: make sure SetOutPath gets called at the beginning of - every section. - * Show printing preferences when tray icon is in restricted mode. - * Session profile manager: the host parameter will be of type ListType - for future versions of Python X2Go (>= 0.5.0.0). + * New upstream version (0.5.0.0): + - Adapt to new backend concept found in Python X2Go (>= 0.5.0.0). + - Move most code of the pyhoca-gui executable into a dedicated class + named PyHocaGUI_Launcher. + - Allow automatic image branding (splash, about image, tray icon) by + setting another application name than the default. + - Rename icon files to match default application name (PyHoca-GUI). + - Make default cmdline option parameters overridable before the + arg parser gets initialized. + - Make SCRIPT_NAME in setup.py configurable (monkey-patchable). + - Make setup.py importable, only run setup() function on direct calls. + - Don't refer to py2exe anymore in nsis_template's naming scheme. + - Provide separate mswin_logging module. + - Install more modules into setup.exe: hmac (for ecdsa). + - NSIS script: empty installation destination before installing new files + into $INSTDIR. + - Allow appname based mini icons on About... windows. + - Make the hover text of the tray icon brandable (drop hard-coded + PyHoca-GUI application name). + - NSIS script: make sure SetOutPath gets called at the beginning of + every section. + - Show printing preferences when tray icon is in restricted mode. + - Session profile manager: the host parameter will be of type ListType + for future versions of Python X2Go (>= 0.5.0.0). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 08 Jan 2014 21:28:37 +0100 -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch brokerclient in repository pyhoca-gui. commit 6f01566e989aa49bbb5b49b8dc03156fe4935c2c Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 17 14:11:24 2014 +0100 Add X2Go Session Broker support. --- debian/changelog | 1 + man/man1/pyhoca-gui.1 | 32 +++++++++++++++ pyhoca/wxgui/defaults.py | 6 +++ pyhoca/wxgui/frontend.py | 57 ++++++++++++++++++++++++++- pyhoca/wxgui/launcher.py | 50 +++++++++++++++-------- pyhoca/wxgui/menus_taskbar.py | 85 ++++++++++++++++++++++++++++------------ pyhoca/wxgui/messages.py | 3 +- pyhoca/wxgui/notify.py | 3 +- pyhoca/wxgui/profilemanager.py | 26 +++++++----- 9 files changed, 207 insertions(+), 56 deletions(-) diff --git a/debian/changelog b/debian/changelog index 59e98ba..b699b9a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low * New upstream version (0.5.0.0): + - Add X2Go Session Broker support. - Adapt to new backend concept found in Python X2Go (>= 0.5.0.0). - Move most code of the pyhoca-gui executable into a dedicated class named PyHocaGUI_Launcher. diff --git a/man/man1/pyhoca-gui.1 b/man/man1/pyhoca-gui.1 index de03803..44fac9c 100644 --- a/man/man1/pyhoca-gui.1 +++ b/man/man1/pyhoca-gui.1 @@ -126,6 +126,38 @@ Disconnect from a server if a session on that server has been terminated. .TP \*(T<\fB\-\-display <hostname>:<screennumber>\fR\*(T> Set the DISPLAY environment variable to <hostname>:<screennumber>. + +.SH BROKERAGE OPTIONS +In case you want to retrieve X2Go session profiles from an X2Go Session Broker use the following options: +.TP +\*(T<\fB\-\-broker\-url=<URL>\fR\*(T> +Specify the <URL> of the X2Go Session Broker. \fBpyhoca\-gui\fR can access http:// and ssh:// style URLs. + +Syntax of <URL> for HTTP brokerage: + +http(s)://<user>:<password>@<hostname>:<port>/path/to/broker + +Syntax of <URL> for SSH brokerage: + +ssh://<user>:<password>@<hostname>:<port>/usr/bin/x2gobroker (or any executable that +provides the broker via SSH). + +As a special <URL> you can type "HTTP" or "SSH" and then the application will provide a login window with +a pre-formatted / schematic URL. +.TP +\*(T<\fB\-\-broker\-password <password>\fR\*(T> +Session broker password for retrieving session profiles from the X2Go Session Broker. +The cleartext password that has been specified at the command line will be masqueraded in +the systems process list (Linux, MacOS). On Windows systems the usage of the \-\-broker-password option is +forbidden. +.TP +\*(T<\fB\-\-broker\-name <broker\-name>\fR\*(T> +Provide a human readable name for the session broker. This name overrides the default broker name ("X2Go Session Broker") +in the application's menus and notification bubbles. +.TP +\*(T<\fB\-\-broker\-autoconnect\fR\*(T> +If this command line option is given the session broker authentication dialog will appear on application startup. + .SH BRANDING OPTIONS The \fBpyhoca-gui\fR provides some feature that allow to easily brand its appearance. Here some options for tweaking the \fBpyhoca-gui\fR appearance and behaviour. diff --git a/pyhoca/wxgui/defaults.py b/pyhoca/wxgui/defaults.py index 64086e0..cc56778 100644 --- a/pyhoca/wxgui/defaults.py +++ b/pyhoca/wxgui/defaults.py @@ -68,6 +68,12 @@ default_options = { 'disconnect_on_terminate': False, 'display': '', + # brokerage + 'broker_url': '', + 'broker_password': '', + 'broker_name': 'X2Go Session Broker', + 'broker_autoconnect': False, + # branding 'splash_image': '', 'about_image': '', diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py index e460a42..b927b83 100644 --- a/pyhoca/wxgui/frontend.py +++ b/pyhoca/wxgui/frontend.py @@ -51,6 +51,7 @@ import locale # PyHoca-GUI modules import about import logon +import brokerlogon import passphrase import taskbar import profilemanager @@ -212,6 +213,21 @@ class PyHocaGUI(wx.App, x2go.X2GoClient): if x2go.X2GOCLIENT_OS == 'Windows' and self.args.start_pulseaudio and os.environ.has_key('PYHOCAGUI_DEVELOPMENT') and os.environ['PYHOCAGUI_DEVELOPMENT'] == '1': _x2goclient_kwargs['pulseaudio_installdir'] = os.path.dirname(basepath.pulseaudio_binary) + self.broker_autoconnect = self.args.broker_autoconnect + if self.args.broker_url: + if self.args.broker_url in ('HTTP', 'SSH'): + self.broker_autoconnect = True + _x2goclient_kwargs['broker_url'] = self.args.broker_url + self.with_brokerage = True + else: + self.with_brokerage = False + + if self.args.broker_password: + _x2goclient_kwargs['broker_password'] = self.args.broker_password + + if self.args.broker_name: + self.broker_name = self.args.broker_name + try: if self.args.logon_window_position: self.logon_window_position_x = int(self.args.logon_window_position.split('x')[0]) @@ -352,13 +368,15 @@ class PyHocaGUI(wx.App, x2go.X2GoClient): self._pyhoca_logger('opening default session profile %s' % profile_name, loglevel=x2go.log.loglevel_NOTICE) self._X2GoClient__register_session(profile_name=profile_name, auto_connect=self.auto_connect) - if self.auto_connect: + if self.auto_connect or self.broker_autoconnect: gevent.spawn(self._auto_connect) def _auto_connect(self): """\ Register all available session profiles on application start. + If brokerage is used, handle auto connecting to the broker before that, as well. + The auto-registration of all session profiles will trigger the auto-connect feature implemented in C{X2GoClient} of Python X2Go. @@ -366,7 +384,12 @@ class PyHocaGUI(wx.App, x2go.X2GoClient): # wait for splash to appear if not self.args.disable_splash: gevent.sleep(1) - if not self.args.session_profile: + + # auto connect to the broker if requested + if self.with_brokerage and self.broker_autoconnect: + self.OnBrokerAuthenticate(None) + + if self.auto_connect and not self.args.session_profile: self._X2GoClient__register_all_session_profiles() def session_auto_connect(self, session_uuid, **kwargs): @@ -800,6 +823,36 @@ class PyHocaGUI(wx.App, x2go.X2GoClient): if not self.is_session_profile(profile_name): profilemanager.PyHocaGUI_ProfileManager(self, 'ADD_EXPLICITLY', profile_name=profile_name) + def OnBrokerAuthenticate(self, evt): + """\ + Gets called if the user requests connecting to a session profile. + + @param evt: event + @type evt: C{obj} + + """ + _broker_logon_window = brokerlogon.PyHocaGUI_BrokerDialogBoxPassword(self, caller=self) + + def OnBrokerDisconnect(self, evt): + """\ + Reset (disconnect from) the broker connection. + + @param evt: event + @type evt: C{obj} + + """ + self._hide_notifications_map = {} + self._temp_launching_pubapp_profiles = [] + self._temp_launching_pubapp_locks = {} + self._temp_disabled_profile_names = [] + self._temp_disabled_session_names = {} + self._remember_shared_folders = {} + + for profile_name in self._X2GoClient__client_connected_profiles(return_profile_names=True): + self._X2GoClient__disconnect_profile(profile_name) + + self.session_profiles.broker_disconnect() + def OnSessionStart(self, evt): """\ Gets called if the user requests to start a new X2Go session. diff --git a/pyhoca/wxgui/launcher.py b/pyhoca/wxgui/launcher.py index fc3299c..9030ddd 100644 --- a/pyhoca/wxgui/launcher.py +++ b/pyhoca/wxgui/launcher.py @@ -86,8 +86,16 @@ VERSION: %s self.VERSION_TEXT = text def setup_process(self): + PROG_OPTIONS = " ".join(sys.argv[1:]).replace("=", " ").split() + try: + _broker_password_index = PROG_OPTIONS.index('--broker-password')+1 + PROG_OPTIONS[_broker_password_index] = "XXXXXXXX" + except ValueError: + # ignore if --broker-password option is not specified + pass if X2GOCLIENT_OS in ('Linux', 'Mac'): import setproctitle + #setproctitle.setproctitle("%s %s" % (self.PROG_NAME, " ".join(PROG_OPTIONS))) setproctitle.setproctitle(self.PROG_NAME) if X2GOCLIENT_OS == 'Windows': @@ -103,40 +111,42 @@ VERSION: %s if sys.argv[0].startswith('./') or sys.argv[0].startswith('python'): sys.path.insert(0, os.getcwd()) os.environ['PYHOCAGUI_DEVELOPMENT'] = '1' - print '### %s running in development mode ###' % self.PROG_NAME + print '### {progname} running in development mode ###'.format(progname=self.PROG_NAME) basepath.reload_base_paths() def check_running(self): if X2GOCLIENT_OS in ('Linux', 'Mac'): + _executable = os.path.basename(sys.argv[0]).replace('.exe', '') + p = subprocess.Popen(['ps', '-U', CURRENT_LOCAL_USER, '-u', CURRENT_LOCAL_USER], stdout=subprocess.PIPE) psA_out = p.communicate() - if psA_out[0].count(self.PROG_NAME) <= 1: + if psA_out[0].count(_executable) <= 1: - if os.path.isdir(os.path.expanduser("~/.x2go/pyhoca-gui/")): - shutil.rmtree(os.path.expanduser("~/.x2go/pyhoca-gui/")) + if os.path.isdir(os.path.expanduser("~/.x2go/{progname}/".format(progname=_executable))): + shutil.rmtree(os.path.expanduser("~/.x2go/{progname}/".format(progname=_executable))) my_pid = str(os.getpid()) - if not os.path.exists(os.path.expanduser("~/.x2go/pyhoca-gui/")): - os.makedirs(os.path.expanduser("~/.x2go/pyhoca-gui/")) - my_pidfile = os.path.expanduser("~/.x2go/pyhoca-gui/display.{pid}".format(pid=my_pid)) + if not os.path.exists(os.path.expanduser("~/.x2go/{progname}/".format(progname=_executable))): + os.makedirs(os.path.expanduser("~/.x2go/{progname}/".format(progname=_executable))) + my_pidfile = os.path.expanduser("~/.x2go/{progname}/display.{pid}".format(progname=_executable, pid=my_pid)) my_display = os.environ['DISPLAY'] open(my_pidfile, 'w').write(my_display) already_running_for_this_display = False - for pidfile in os.listdir(os.path.expanduser("~/.x2go/pyhoca-gui/")): + for pidfile in os.listdir(os.path.expanduser("~/.x2go/{progname}/".format(progname=_executable))): # this is our own pid file... if my_pidfile.endswith(pidfile): continue - display = open(os.path.expanduser("~/.x2go/pyhoca-gui/") + pidfile, 'r').read() + display = open(os.path.expanduser("~/.x2go/{progname}/".format(progname=_executable)) + pidfile, 'r').read() if display.split('.')[0] == my_display.split('.')[0]: other_pid = pidfile.split('.')[1] print - print('One instance of PyHoca-GUI (PID: {other_pid}) is already running for this $DISPLAY {display}'.format(other_pid=other_pid, display=my_display)) + print('One instance of {progname} (PID: {other_pid}) is already running for this $DISPLAY {display}'.format(progname=_executable, other_pid=other_pid, display=my_display)) return True @@ -148,7 +158,7 @@ VERSION: %s _p_names = [] for process in w.Win32_Process(): _p_names.append(process.Name) - return len([ _p_name for _p_name in _p_names if _p_name == self.PROG_NAME]) > 1 + return len([ _p_name for _p_name in _p_names if _p_name == _executable]) > 1 def version(self): @@ -244,6 +254,13 @@ VERSION: %s {'args':['--published-applications-no-submenus'], 'default': _default_options['published_applications_no_submenus'], 'metavar': '<number>', 'help': 'the number of published applications that will be rendered without submenus', }, ] + broker_options = [ + {'args':['-B','--broker-url'], 'default': _default_options['broker_url'], 'help': 'retrieve session profiles via an X2Go Session Broker under the given URL', }, + {'args':['--broker-password'], 'default': _default_options['broker_password'], 'help': 'password for authenticating against the X2Go Session Broker', }, + {'args':['--broker-name'], 'default': _default_options['broker_name'], 'help': 'tweak the wording of \'X2Go Session Broker\'', }, + {'args':['--broker-autoconnect'], 'default': _default_options['broker_autoconnect'], 'action': 'store_true', 'help': 'trigger broker authentication directly after application startup', }, + ] + if X2GOCLIENT_OS == 'Windows': x2go_gui_options.append( {'args':['--lang'], 'default': _default_options['lang'], 'metavar': 'LANGUAGE', 'help': 'set the GUI language (currently available: en, de, nl, es)', }, @@ -277,7 +294,8 @@ VERSION: %s formatter_class=argparse.RawDescriptionHelpFormatter, \ add_help=True, argument_default=None) p_debugopts = p.add_argument_group('Debug options') - p_guiopts = p.add_argument_group('%s options' % self.PROG_NAME) + p_guiopts = p.add_argument_group('{progname} options'.format(progname=self.PROG_NAME)) + p_brokeropts = p.add_argument_group('Brokerage options') p_portableopts = p.add_argument_group('Portable application support') p_backendopts = p.add_argument_group('Python X2Go backend options (for experts only)') @@ -286,7 +304,7 @@ VERSION: %s 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_contribopts, contrib_options), (p_portableopts, portable_options), (p_backendopts, backend_options), ) else: - _option_groups = ((p_guiopts, x2go_gui_options), (p_debugopts, debug_options), (p_portableopts, portable_options), (p_backendopts, backend_options), ) + _option_groups = ((p_guiopts, x2go_gui_options), (p_brokeropts, broker_options), (p_debugopts, debug_options), (p_portableopts, portable_options), (p_backendopts, backend_options), ) for (p_group, opts) in _option_groups: required = False for opt in opts: @@ -341,7 +359,7 @@ VERSION: %s a.start_xserver = a.preferred_xserver if X2GOCLIENT_OS == 'Windows' and a.start_xserver and a.display: - self.runtime_error('You can tell %s to handle XServer startup and then specify a DISPLAY environment variable!' % self.PROG_NAME, parser=p) + self.runtime_error('You can tell %s to handle XServer startup and then specify a DISPLAY environment variable!'.format(progname=self.PROG_NAME), parser=p) if a.display: os.environ.update({'DISPLAY': a.display}) @@ -378,9 +396,9 @@ VERSION: %s if self.check_running(): sys.stderr.write("\n###############################\n### %s: already running for user %s\n###############################\n" % (self.PROG_NAME, CURRENT_LOCAL_USER)) - m = PyHoca_MessageWindow_Ok(wx.App(), shortmsg='ALREADY_RUNNING', title=u'%s (%s)...' % (self.PROG_NAME, self.VERSION), icon='pyhoca-trayicon') + m = PyHoca_MessageWindow_Ok(wx.App(), shortmsg='ALREADY_RUNNING', title=u'%s (%s)...' % (self.PROG_NAME, self.VERSION), icon='{progname}_trayicon'.format(progname=self.PROG_NAME)) m.ShowModal() - version() + self.version() thisPyHocaGUI = None try: diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py index 2a6d3c5..e9a7e96 100644 --- a/pyhoca/wxgui/menus_taskbar.py +++ b/pyhoca/wxgui/menus_taskbar.py @@ -72,18 +72,27 @@ class PyHocaGUI_Menu_TaskbarManageProfile(wx.Menu): self._PyHocaGUI._eventid_profilenames_map[ID_EXPORTPROFILE] = \ self._PyHocaGUI._eventid_profilenames_map[ID_DELETEPROFILE] = profile_name - self.Append(text=_(u"Edit Profile"), id=ID_EDITPROFILE) + if self._PyHocaGUI.session_profiles.is_mutable(profile_name): + self.Append(text=_(u"Edit Profile"), id=ID_EDITPROFILE) + else: + self.Append(text=_(u"View Profile"), id=ID_EDITPROFILE) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileEdit, id=ID_EDITPROFILE) + if not self._PyHocaGUI.args.single_session_profile: + self.AppendSeparator() - self.Append(text=_(u"Use as Template for New Profile"), id=ID_COPYPROFILE) - self.AppendSeparator() + + if self._PyHocaGUI.session_profiles.is_mutable(profile_name): + self.Append(text=_(u"Use as Template for New Profile"), id=ID_COPYPROFILE) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileCopy, id=ID_COPYPROFILE) + self.AppendSeparator() + self.Append(text=_(u"Export Profile"), id=ID_EXPORTPROFILE) - self.Append(text=_(u"Delete Profile"), id=ID_DELETEPROFILE) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileExport, id=ID_EXPORTPROFILE) - self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileEdit, id=ID_EDITPROFILE) - self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileCopy, id=ID_COPYPROFILE) - self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileExport, id=ID_EXPORTPROFILE) - self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileDelete, id=ID_DELETEPROFILE) + if self._PyHocaGUI.session_profiles.is_mutable(profile_name): + self.Append(text=_(u"Delete Profile"), id=ID_DELETEPROFILE) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileDelete, id=ID_DELETEPROFILE) class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu): @@ -133,7 +142,9 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu): if self._PyHocaGUI.profilemanager_disabled: _maintain_profiles_item.Enable(False) - else: + self.AppendSeparator() + + elif self._PyHocaGUI.session_profiles.has_profile_name(self._PyHocaGUI.args.session_profile): ID_SINGLEPROFILEMANAGER = wx.NewId() _maintain_profile_item = self.AppendMenu(id=ID_SINGLEPROFILEMANAGER, text=_(u'Manage Session Profile'), @@ -141,8 +152,13 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu): ) if self._PyHocaGUI.args.session_profile in self._PyHocaGUI.client_connected_profiles(return_profile_names=True): _maintain_profile_item.Enable(False) + self.AppendSeparator() - self.AppendSeparator() + if self._PyHocaGUI.with_brokerage and self._PyHocaGUI.session_profiles.is_broker_authenticated(): + ID_BROKER_DISCONNECT = wx.NewId() + self.Append(id=ID_BROKER_DISCONNECT, text=_(u"Disconnect from session broker")) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnBrokerDisconnect, id=ID_BROKER_DISCONNECT) + self.AppendSeparator() ID_PRINTINGPREFS = wx.NewId() _printingprefs_item = self.Append(id=ID_PRINTINGPREFS, text=_(u"Printing Preferences")) @@ -522,6 +538,7 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu): wx.Menu.__init__(self) + ID_AUTHENTICATE_BROKER=wx.NewId() ID_CONNECT=wx.NewId() ID_PUBAPPSESSIONSTART=wx.NewId() ID_SESSIONSTART=wx.NewId() @@ -534,7 +551,12 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu): _foldersharing_disabled = False - if self._PyHocaGUI.args.single_session_profile and not self._PyHocaGUI.is_session_profile(profile_name): + if self._PyHocaGUI.with_brokerage and not self._PyHocaGUI.session_profiles.is_broker_authenticated(): + _auth_menu_text = _(u'Connect to') + self._PyHocaGUI.broker_name + self.Append(id=ID_AUTHENTICATE_BROKER, text=_auth_menu_text) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnBrokerAuthenticate, id=ID_AUTHENTICATE_BROKER) + + elif self._PyHocaGUI.args.single_session_profile and not self._PyHocaGUI.is_session_profile(profile_name): connect = self.Append(id=ID_CONNECT, text=_(u'Connect %s') % profile_name) connect.Enable(False) else: @@ -779,7 +801,10 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu): if not self._PyHocaGUI.restricted_trayicon: self.AppendSeparator() - self.Append(id=ID_EDITPROFILEWHILECONNECTED, text=_(u"Customize &profile")) + if self._PyHocaGUI.session_profiles.is_mutable(profile_name): + self.Append(id=ID_EDITPROFILEWHILECONNECTED, text=_(u"Customize &profile")) + else: + self.Append(id=ID_EDITPROFILEWHILECONNECTED, text=_(u"View &profile")) self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileEditWhileConnected, id=ID_EDITPROFILEWHILECONNECTED) self._PyHocaGUI._eventid_profilenames_map[ID_EDITPROFILEWHILECONNECTED] = \ @@ -876,7 +901,7 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu): wx.Menu.__init__(self) - if type(caller) == PyHocaGUI_Menu_TaskbarOptionsManager: + if type(caller) == PyHocaGUI_Menu_TaskbarOptionsManager and self._PyHocaGUI.session_profiles.supports_mutable_profiles(): ID_ADDPROFILE = wx.NewId() self.Append(id=ID_ADDPROFILE, text=_(u"Add Profile")) self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileAdd, id=ID_ADDPROFILE) @@ -954,7 +979,10 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu): self._PyHocaGUI.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=_this_id) if not group_name and (not _profile_groups and not _profile_names) and not filter_profiles: - _dummy = self.Append(text=_(u'No session profiles defined'), id=wx.NewId()) + if self._PyHocaGUI.with_brokerage: + _dummy = self.Append(text=_(u'Session broker is not connected'), id=wx.NewId()) + else: + _dummy = self.Append(text=_(u'No session profiles defined'), id=wx.NewId()) _dummy.Enable(False) else: @@ -970,7 +998,7 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu): self.Append(text=_(u'Export Profile Group'), id=_export_id) self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileExport, id=_export_id) - if bind_method is None and not group_name: + if bind_method is None and not group_name and self._PyHocaGUI.session_profiles.supports_mutable_profiles(): _import_id = wx.NewId() self.AppendSeparator() self.Append(text=_(u'Import Session Profiles'), id=_import_id) @@ -1006,18 +1034,25 @@ class PyHocaGUI_Menu_TaskbarSessionManager(wx.Menu): wx.Menu.__init__(self) - ID_AUTHENTICATE = wx.NewId() + ID_AUTHENTICATE_SESSION = wx.NewId() + ID_AUTHENTICATE_BROKER = wx.NewId() ID_EXIT = wx.NewId() - _auth_menu_text = _(u'Connect Server') - self.AppendMenu(id=ID_AUTHENTICATE, - text=_auth_menu_text, - submenu=PyHocaGUI_Menu_TaskbarProfileNames(self._PyHocaGUI, - caller=self, - filter_profiles=[], - disabled_profiles=self._PyHocaGUI.client_connected_profiles(return_profile_names=True) + self._PyHocaGUI._temp_disabled_profile_names, - bind_method=self._PyHocaGUI.OnSessionAuthenticate)) - self.AppendSeparator() + if self._PyHocaGUI.with_brokerage and not self._PyHocaGUI.session_profiles.is_broker_authenticated(): + _auth_menu_text = _(u'Connect to') + ' ' + self._PyHocaGUI.broker_name + self.Append(id=ID_AUTHENTICATE_BROKER, text=_auth_menu_text) + self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnBrokerAuthenticate, id=ID_AUTHENTICATE_BROKER) + self.AppendSeparator() + else: + _auth_menu_text = _(u'Connect Server') + self.AppendMenu(id=ID_AUTHENTICATE_SESSION, + text=_auth_menu_text, + submenu=PyHocaGUI_Menu_TaskbarProfileNames(self._PyHocaGUI, + caller=self, + filter_profiles=[], + disabled_profiles=self._PyHocaGUI.client_connected_profiles(return_profile_names=True) + self._PyHocaGUI._temp_disabled_profile_names, + bind_method=self._PyHocaGUI.OnSessionAuthenticate)) + self.AppendSeparator() _profile_names = self._PyHocaGUI.session_profiles.profile_names _profile_names.sort() diff --git a/pyhoca/wxgui/messages.py b/pyhoca/wxgui/messages.py index 721384d..71656eb 100644 --- a/pyhoca/wxgui/messages.py +++ b/pyhoca/wxgui/messages.py @@ -30,8 +30,6 @@ import basepath # X2Go modules from x2go.defaults import CURRENT_LOCAL_USER as _CURRENT_LOCAL_USER -_icons_location = basepath.icons_basepath - class PyHoca_MessageWindow(wx.Dialog): """\ A simple message window for L{PyHocaGUI}. @@ -93,6 +91,7 @@ class PyHoca_MessageWindow(wx.Dialog): wx.Dialog.__init__(self, parent, wx.ID_ANY, ) self.SetTitle('%s' % title) + _icons_location = basepath.icons_basepath if icon: path_to_icon = os.path.normpath('%s/PyHoca/64x64/%s.png' % (_icons_location, icon)) self.icon = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(path_to_icon, wx.BITMAP_TYPE_ANY)) diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py index 197f70f..8d66cc5 100644 --- a/pyhoca/wxgui/notify.py +++ b/pyhoca/wxgui/notify.py @@ -29,8 +29,6 @@ from taskbar import MakeIcon import x2go.utils as utils -_icons_location = basepath.icons_basepath - class NotSupportedException(exceptions.StandardError): pass class PyHocaNotificationException(exceptions.StandardError): pass @@ -126,6 +124,7 @@ class libnotify_NotifierPopup(object): except KeyError: pass + _icons_location = basepath.icons_basepath if icon: icon = 'file://%s/PyHoca/32x32/%s.png' % (_icons_location, icon) diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py index 130f5f7..1607d2d 100644 --- a/pyhoca/wxgui/profilemanager.py +++ b/pyhoca/wxgui/profilemanager.py @@ -165,7 +165,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): if _to_host: self.profile_config['host'] = [_to_host] if _to_port: self.profile_config['sshport'] = int(_to_port) - self.profile_config['sshproxytunnel'] = 'DEPRECATED_CAN_BE_SAFELY_REMOVE' + self.profile_config['sshproxytunnel'] = 'DEPRECATED_CAN_BE_SAFELY_REMOVED' # we create a backup dict of our profile_config immediately (for being able to reset erroneously made changes) self.profile_config_orig = copy.deepcopy(self.profile_config) @@ -185,7 +185,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.tab_MediaResources = wx.Panel(self.X2GoTabs, -1) self.tab_SharedResources = wx.Panel(self.X2GoTabs, -1) - if not self.session_profiles.is_writable(self.profile_id): + if not self.session_profiles.is_mutable(self.profile_id): self.tab_Profile.Enable(False) self.tab_Session.Enable(False) self.tab_Connection.Enable(False) @@ -380,12 +380,14 @@ class PyHocaGUI_ProfileManager(wx.Dialog): else: self.OKButton = wx.Button(self, -1, _(u"Save")) self.DefaultButton = wx.Button(self, -1, _(u'Reset')) - self.OKButton.SetDefault() self.ApplyButton = wx.Button(self, -1, _(u"Apply")) self.CancelButton = wx.Button(self, -1, _(u"Cancel")) - if not self.session_profiles.is_writable(self.profile_id): + if self.session_profiles.is_mutable(self.profile_id): + self.OKButton.SetDefault() + else: self.OKButton.Enable(False) self.ApplyButton.Enable(False) + self.CancelButton.SetDefault() self.__set_properties() self.__do_layout() @@ -446,11 +448,17 @@ class PyHocaGUI_ProfileManager(wx.Dialog): """ if self.action == 'ADD': - self.SetTitle(_(u"PyHoca-GUI Profile Manager - new profile")) + self.SetTitle(_(u"%s Profile Manager - new profile") % self._PyHocaGUI.appname) elif self.action == 'EDIT_CONNECTED': - self.SetTitle(_(u"PyHoca-GUI Profile Manager - %s (connected)") % self.profile_config['name']) + if self._PyHocaGUI.session_profiles.is_mutable(self.profile_config['name']): + self.SetTitle(_(u"%s Profile Manager - %s (connected)") % (self._PyHocaGUI.appname, self.profile_config['name'])) + else: + self.SetTitle(_(u"%s Profile Manager - %s (connected, immutable)") % (self._PyHocaGUI.appname, self.profile_config['name'])) else: - self.SetTitle(_(u"PyHoca-GUI Profile Manager - %s") % self.profile_config['name']) + if self._PyHocaGUI.session_profiles.is_mutable(self.profile_config['name']): + self.SetTitle(_(u"%s Profile Manager - %s") % (self._PyHocaGUI.appname, self.profile_config['name'])) + else: + self.SetTitle(_(u"%s Profile Manager - %s (immutable)") % (self._PyHocaGUI.appname, self.profile_config['name'])) self.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "")) self._textfield_height = 30 @@ -1562,7 +1570,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SoundPortLabel.Enable(False) self.SoundPort.Enable(False) self.Esd.Enable(False) - if self.session_profiles.is_writable(self.profile_id): + if self.session_profiles.is_mutable(self.profile_id): self.tab_SharedResources.Enable(True) self.RDPServer.Enable(False) _hosts = self.Host.GetValue() @@ -1620,7 +1628,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.DefaultSoundPort.Enable(True) self.DefaultSoundPort.SetValue(True) self.Esd.Enable(True) - if self.session_profiles.is_writable(self.profile_id): + if self.session_profiles.is_mutable(self.profile_id): self.tab_SharedResources.Enable(True) self.RDPServer.SetValue(self.profile_config_bak['rdpserver']) self.RDPOptions.SetValue(self.profile_config_bak['rdpoptions']) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch brokerclient in repository pyhoca-gui. commit a202a63115d3a90aa6c5daa04a4e9908ecdae9ec Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 17 14:16:45 2014 +0100 Focus the user name field on logon if no user name is stored in the session profile. --- debian/changelog | 2 ++ pyhoca/wxgui/logon.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4aefea7..22de7e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low - Show printing preferences when tray icon is in restricted mode. - Session profile manager: the host parameter will be of type ListType for future versions of Python X2Go (>= 0.5.0.0). + - Focus the user name field on logon if no user name is stored in the + session profile. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 08 Jan 2014 21:28:37 +0100 diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py index 511ee53..17f03ef 100644 --- a/pyhoca/wxgui/logon.py +++ b/pyhoca/wxgui/logon.py @@ -191,8 +191,8 @@ class PyHocaGUI_DialogBoxPassword(wx.Dialog): if self.current_profile_config.has_key('user'): self.userTxt.SetValue(self.current_profile_config['user']) - else: - self.userTxt.SetValue(self._PyHocaGUI.args.username) + if not self.current_profile_config['user'] and not self.sshproxy_auth: + self.userTxt.SetFocus() if self.sshproxy_auth: -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch brokerclient in repository pyhoca-gui. commit a5d95b36af68771a4c8f06b780d53852029273ff Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 17 14:19:14 2014 +0100 Re-order cmdline sections (man page, defaults.py). --- debian/changelog | 1 + man/man1/pyhoca-gui.1 | 11 +++++++---- pyhoca/wxgui/defaults.py | 11 ++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 22de7e4..59e98ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low for future versions of Python X2Go (>= 0.5.0.0). - Focus the user name field on logon if no user name is stored in the session profile. + - Re-order cmdline sections (man page, defaults.py). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 08 Jan 2014 21:28:37 +0100 diff --git a/man/man1/pyhoca-gui.1 b/man/man1/pyhoca-gui.1 index 97eeb65..de03803 100644 --- a/man/man1/pyhoca-gui.1 +++ b/man/man1/pyhoca-gui.1 @@ -55,7 +55,7 @@ Enable debugging code of the unterlying Python X2Go module. .TP \*(T<\fB\-\-libdebug-sftpxfer\fR\*(T> Enable debugging code of Python X2Go's sFTP server code (very verbose, and it may even reveal promiscuous data). -.SH GUI OPTIONS +.SH SESSION RELATED OPTIONS .TP \*(T<\fB\-P, \-\-session-profile\fR\*(T> The name of the session profile to be used to make the connection. You can actually pass a komma-separated list of @@ -124,6 +124,12 @@ Disconnect from a server if a session on that server has been suspended. \*(T<\fB\-\-disconnect-on-terminate\fR\*(T> Disconnect from a server if a session on that server has been terminated. .TP +\*(T<\fB\-\-display <hostname>:<screennumber>\fR\*(T> +Set the DISPLAY environment variable to <hostname>:<screennumber>. +.SH BRANDING OPTIONS +The \fBpyhoca-gui\fR provides some feature that allow to easily brand its appearance. Here some options +for tweaking the \fBpyhoca-gui\fR appearance and behaviour. +.TP \*(T<\fB\-\-splash-image\fR \fI<your-splash-image>\fR\*(T> Define an alternative splash image that gets shown on application startup (PNG files only, full path or filename as found in <share>/img). .TP @@ -149,9 +155,6 @@ Grey-out the profile manager menu items and thus disable all profile management \*(T<\fB\-\-disable-notifications\fR\*(T> Disable all applet notifications. .TP -\*(T<\fB\-\-display <hostname>:<screennumber>\fR\*(T> -Set the DISPLAY environment variable to <hostname>:<screennumber>. -.TP \*(T<\fB\-\-logon\-window\-position\fR \fI<x-pos>x<y-pos>\fR\*(T> Give a custom position for the logon window, use negative values to position relative to right/bottom border. .TP diff --git a/pyhoca/wxgui/defaults.py b/pyhoca/wxgui/defaults.py index c6f6615..64086e0 100644 --- a/pyhoca/wxgui/defaults.py +++ b/pyhoca/wxgui/defaults.py @@ -40,12 +40,15 @@ else: _config_backends = ('FILE') default_options = { + + # common 'debug': False, 'quiet': False, 'libdebug': False, 'libdebug_sftpxfer': False, 'version': False, + # session related options 'session_profile': '', 'remember_username': False, 'non_interactive': False, @@ -63,6 +66,9 @@ default_options = { 'resume_all_on_connect': False, 'disconnect_on_suspend': False, 'disconnect_on_terminate': False, + 'display': '', + + # branding 'splash_image': '', 'about_image': '', 'disable_splash': False, @@ -70,9 +76,10 @@ default_options = { 'disable_printingprefs': False, 'disable_profilemanager': False, 'disable_notifications': False, - 'display': '', 'logon_window_position': False, 'published_applications_no_submenus': 10, + + # backends 'backend_controlsession': '', 'backend_terminalsession': '', 'backend_serversessioninfo': '', @@ -81,6 +88,8 @@ default_options = { 'backend_sessionprofiles': '', 'backend_clientsettings': '', 'backend_clientprinting': '', + + # file locations 'client_rootdir': '', 'sessions_rootdir': '', 'ssh_rootdir': '', -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git