This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository python-x2go. commit c462c9a46351a95abbfa36ba0a8dd47140c3dbbf Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Apr 15 20:53:19 2014 +0200 Only check running X-Servers that have the same WMI SessionId as the current X2Go application. --- debian/changelog | 2 ++ x2go/xserver.py | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 95841e3..f2bb1c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,8 @@ python-x2go (0.5.0.0-0x2go1) UNRELEASED; urgency=low - Rename hook method HOOK_no_known_xserver_found to HOOK_no_installed_xservers_found. Call this new hook if no installed X-Servers could be found on the system. + - Only check running X-Servers that have the same WMI SessionId as the + current X2Go application. * debian/control: + Add dependencies: python-requests, python-simplejson. * python-x2go.spec: diff --git a/x2go/xserver.py b/x2go/xserver.py index cc8fc13..5242e9a 100644 --- a/x2go/xserver.py +++ b/x2go/xserver.py @@ -153,13 +153,12 @@ class X2GoClientXConfig(inifiles.X2GoIniFile): """ _running = [] _wmi = wmi.WMI() - _p_names = [] - for process in _wmi.Win32_Process(): - _p_names.append(process.Name) + _my_wmi_sessionid = [ _p.SessionId for _p in _wmi.Win32_Process() if _p.ProcessId == os.getpid() ][0] + _process_list = _wmi.Win32_Process() for xserver_name in self.installed_xservers: process_name = self.get_xserver_config(xserver_name)['process_name'] - if process_name in _p_names: + if [ _p.Name for _p in _process_list if _p.Name == process_name and _p.SessionId = _my_wmi_sessionid ]: # XServer is already running _running.append(xserver_name) continue -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git