Skip to content
Snippets Groups Projects
Commit ea2cd901 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Hotfix 0.11.0b: Fix to fsl.utils.platform.inSSHSession (and new inVNCsession...

Hotfix 0.11.0b: Fix to fsl.utils.platform.inSSHSession (and new inVNCsession property). Update indexed_gzip version.
parent 27f214ac
No related branches found
No related tags found
No related merge requests found
......@@ -146,6 +146,7 @@ class Platform(notifier.Notifier):
self.isWidgetAlive = isWidgetAlive
self.__inSSHSession = False
self.__inVNCSession = False
self.__glVersion = None
self.__glRenderer = None
self.__glIsSoftware = None
......@@ -163,17 +164,14 @@ class Platform(notifier.Notifier):
except ImportError:
self.__canHaveGui = False
# If one of the SSH_/VNC environment
# variables is set, then we're probably
# running over SSH/VNC.
sshVars = ['SSH_CLIENT', 'SSH_TTY']
vncVars = ['VNCDESKTOP', 'X2GO_SESSION', 'NXSESSIONID']
# 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
self.__inSSHSession = any(s in os.environ for s in sshVars)
self.__inVNCSession = any(v in os.environ for v in vncVars)
@property
......@@ -220,6 +218,19 @@ class Platform(notifier.Notifier):
return self.__inSSHSession
@property
def inVNCSession(self):
"""``True`` if this application is running over a VNC (or similar)
session, ``False`` otherwise. Currently, the following remote desktop
environments are detected:
- VNC
- x2go
- NoMachine
"""
return self.__inVNCSession
@property
def wxPlatform(self):
"""One of :data:`WX_UNKNOWN`, :data:`WX_MAC_COCOA`,
......
......@@ -12,5 +12,5 @@ version number and information.
__version__
"""
__version__ = '0.11.0a'
__version__ = '0.11.0b'
"""Current version number, as a string. """
......@@ -2,5 +2,5 @@ six>=1.10.0,<2.0
numpy>=1.11.1,<2.0
matplotlib>=1.5.1,<=2.0.0
nibabel>=2.1,<3.0
indexed_gzip>=0.3.1,<0.4
wxPython==3.0.2.0
indexed_gzip>=0.3.3,<0.4
wxPython>=3.0.2.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment