[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 98924c78afc15ae5fd4a1fe449892c33e5055008
X2Go dev team
git-admin at x2go.org
Sat Sep 14 15:54:10 CEST 2013
The branch, twofactorauth has been updated
via 98924c78afc15ae5fd4a1fe449892c33e5055008 (commit)
from a2c003bb4a46c001b9e3c5881186a634585d4593 (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:
SessionProfile.py | 15 +++++++++++++++
X2goXserver.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
x2goLogon.py | 6 ++++++
3 files changed, 69 insertions(+)
create mode 100644 X2goXserver.py
The diff of changes is:
diff --git a/SessionProfile.py b/SessionProfile.py
index b5cca14..3a54ac3 100644
--- a/SessionProfile.py
+++ b/SessionProfile.py
@@ -114,6 +114,21 @@ class processINI:
result += p + '=' + str(self.__dict__[p])
return result + ')'
+class XServer(processINI):
+ """
+ XServer object that contains all data that is generally necessary
+ """
+ defaultValues = { 'XServer':{'binary':'XMing','parameters':'','stopcommand':''}
+ }
+ def __init__(self, logger, fileName=None):
+ self.logger = logger
+ if fileName is None:
+ fileName = os.path.normpath(os.path.expanduser('~/.x2goclient/xserver'))
+ processINI.__init__(self, fileName, logger)
+ self.fillDefaultsSection()
+ self.bldSessionObj()
+
+
class Settings(processINI):
"""
Settings object that contains all data that is generally necessary
diff --git a/X2goXserver.py b/X2goXserver.py
new file mode 100644
index 0000000..a845f1a
--- /dev/null
+++ b/X2goXserver.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ Copyright (C) 2010 by Dick Kniep <dick.kniep at lindix.nl>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the
+ Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Contributors to the code of this programme:
+ Jörg Sawatzki <joerg.sawatzki at web.de>
+ Mike Gabriel <m.gabriel at das-netzwerkteam.de>
+"""
+
+import os
+import subprocess
+
+def startXserver(XServerParms):
+ """
+ This routine will start an XServer if it is not running
+ already
+ """
+ processname = XServerParms.binary
+ for line in os.popen("ps xa"):
+ fields = line.split()
+ pid = fields[0]
+ process = fields[4]
+
+ if process.find(XServerParms.binary) > 0:
+ # XServer is already running
+ return
+
+ p = subprocess.Popen([XServerParms.binary,XServerParms.parameters], shell=True)
+ sts = os.waitpid(p.pid, 0)[1]
+
+
\ No newline at end of file
diff --git a/x2goLogon.py b/x2goLogon.py
index 724ad0b..c1e1f89 100644
--- a/x2goLogon.py
+++ b/x2goLogon.py
@@ -37,6 +37,7 @@ import X2goMaintProfile
from Message import Message
import x2go
import pyhocaguiImages
+import platform
try:
from agw import knobctrl as KC
@@ -530,6 +531,11 @@ def startX2Go(parent):
parent.printProfile = SessionProfile.Printing(parent.logger)
parent.settingsProfile = SessionProfile.Settings(parent.logger)
+ if platform.system() == 'Windows':
+ parent.settingsProfile = SessionProfile.XServer(parent.logger)
+ import X2goXserver
+ X2goXserver.startXserver(parent)
+
if parent.args.profile:
parent.SessionProfiles = SessionProfile.x2goProfiles(parent.logger, parent.liblogger, parent.args.profile)
else:
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