[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 1277eedccf20cd1f1d7c490b00120394f00a169a

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:54:23 CEST 2013


The branch, twofactorauth has been updated
       via  1277eedccf20cd1f1d7c490b00120394f00a169a (commit)
      from  709f65d7b1be2bc3d3bfd68aee87c36716b85350 (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               |   12 +++++++++---
 pyhoca/wxgui/basepath.py |   12 ++++++++----
 2 files changed, 17 insertions(+), 7 deletions(-)

The diff of changes is:
diff --git a/pyhoca-gui b/pyhoca-gui
index fd58285..aa971ef 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -43,7 +43,7 @@ import exceptions
 
 from x2go import X2GOCLIENT_OS as _X2GOCLIENT_OS
 
-PROG_NAME = os.path.basename(__file__)
+PROG_NAME = os.path.basename(sys.argv[0])
 PROG_PID  = os.getpid()
 
 if _X2GOCLIENT_OS in ('Linux', 'Mac'):
@@ -60,6 +60,9 @@ from x2go import x2go_cleanup as _x2go_cleanup
 from pyhoca.wxgui import __VERSION__ as _version
 from pyhoca.wxgui import PyHocaGUI
 
+if _X2GOCLIENT_OS == 'Windows':
+    from pyhoca.wxgui import basepath
+    os.environ.update({'NXPROXY_BINARY': basepath.nxproxy_binary, })
 
 __author__ = "Dick J. Kniep, Mike Gabriel"
 __version__ = _version
@@ -114,8 +117,8 @@ if check_running():
 
 
 app = sys.argv[0]
-if app.startswith('./') or os.path.dirname(__file__).endswith('trunk'):
-    sys.path.insert(0, os.path.join(os.path.dirname(__file__)))
+if app.startswith('./') or os.path.dirname(PROG_NAME).endswith('trunk'):
+    sys.path.insert(0, os.path.join(os.path.dirname(PROG_NAME)))
     os.environ['PYHOCAGUI_DEVELOPMENT'] = '1'
     print '### PyHoca-GUI running in development mode ###'
 
@@ -207,6 +210,9 @@ def parseargs():
 
     if a.display:
         os.environ.update({'DISPLAY': a.display})
+    else:
+        if not a.start_xserver:
+            os.environ.update({'DISPLAY': 'localhost:0'})
     
     return a, logger, liblogger
 
diff --git a/pyhoca/wxgui/basepath.py b/pyhoca/wxgui/basepath.py
index b3cf1cf..4620518 100644
--- a/pyhoca/wxgui/basepath.py
+++ b/pyhoca/wxgui/basepath.py
@@ -19,21 +19,25 @@
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 import os
-from x2go import X2GOCLIENT_OS
+from x2go import X2GOCLIENT_OS as _X2GOCLIENT_OS
 
 if os.environ.has_key('PYHOCAGUI_DEVELOPMENT') and os.environ['PYHOCAGUI_DEVELOPMENT'] == '1':
     _base_location = os.path.abspath(os.path.curdir)
     _icons_location = os.path.join(_base_location, 'icons')
     _images_location = os.path.join(_base_location, 'img')
+    if _X2GOCLIENT_OS == 'Windows':
+        _nxproxy_location = os.path.join(_base_location, 'contrib', 'nxproxy-mswin', 'nxproxy.exe')
 else:
-    if X2GOCLIENT_OS == 'Windows':
-        _base_location = os.path.join(os.environ['ProgramFiles'], 'PyHoca-GUI')
+    if _X2GOCLIENT_OS == 'Windows':
+        _base_location = os.path.abspath(os.path.curdir)
         _icons_location = os.path.join(_base_location, 'icons')
         _images_location = os.path.join(_base_location, 'img')
+        _nxproxy_location = os.path.join(_base_location, 'nxproxy', 'nxproxy.exe')
     else:
         _icons_location = '/usr/share/icons'
         _images_location = '/usr/share/pyhoca/img'
 
 icons_basepath = _icons_location
 images_basepath = _images_location
-
+if _X2GOCLIENT_OS == 'Windows':
+    nxproxy_binary = _nxproxy_location


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