From e3e4ccb55f7464436b1cc81558ed39a2de2ce322 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Mon, 27 Mar 2017 17:48:59 +0100 Subject: [PATCH] Platform.inSSHSession was returning True in VNC sessions. --- fsl/utils/platform.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fsl/utils/platform.py b/fsl/utils/platform.py index 73462188a..b61c5d8bd 100644 --- a/fsl/utils/platform.py +++ b/fsl/utils/platform.py @@ -162,13 +162,18 @@ class Platform(notifier.Notifier): self.__canHaveGui = wx.App.IsDisplayAvailable() except ImportError: self.__canHaveGui = False - - # If one of these environment - # variables is set, then we're - # probably running over SSH. - self.__inSSHSession = 'SSH_CLIENT' in os.environ or \ - 'SSH_TTY' in os.environ + + # If one of the SSH_ environment + # variables is set, and we're + # not running in a VNC session, + # then we're probably running + # over SSH. + inSSH = 'SSH_CLIENT' in os.environ or \ + 'SSH_TTY' in os.environ + inVNC = 'VNCDESKTOP' in os.environ + + self.__inSSHSession = inSSH and not inVNC @property -- GitLab