Skip to content

Commit 1a35f44

Browse files
committed
[FIX] Errors parsing $DISPLAY
The format for ``$DISPLAY`` is ``<host>:<display>[.<screen>]``. When screen is specified, the config object fails. This patch fixes #2362
1 parent 8384523 commit 1a35f44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nipype/utils/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ def get_display(self):
305305
def _mock():
306306
pass
307307

308-
# Store a fake Xvfb object
309-
ndisp = int(sysdisplay.split(':')[-1])
308+
# Store a fake Xvfb object. Format - <host>:<display>[.<screen>]
309+
ndisp = sysdisplay.split(':')[-1].split('.')[0]
310310
Xvfb = namedtuple('Xvfb', ['new_display', 'stop'])
311-
self._display = Xvfb(ndisp, _mock)
311+
self._display = Xvfb(int(ndisp), _mock)
312312
return sysdisplay
313313
else:
314314
if 'darwin' in sys.platform:

0 commit comments

Comments
 (0)