File tree Expand file tree Collapse file tree 3 files changed +6
-20
lines changed Expand file tree Collapse file tree 3 files changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ before_install:
18
18
- if $INSTALL_DEB_DEPENDECIES; then sudo ln -s /run/shm /dev/shm; fi
19
19
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
20
20
- sudo apt-get update
21
+ - sudo apt-get install xvfb
21
22
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq --no-install-recommends
22
23
fsl afni elastix; fi
23
24
- if $INSTALL_DEB_DEPENDECIES; then travis_retry sudo apt-get install -qq fsl-atlases;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ dependencies:
14
14
- sudo apt-get update
15
15
override :
16
16
# Install apt packages
17
- - sudo apt-get install -y fsl-core fsl-atlases fsl-mni152-templates fsl-feeds afni swig python-vtk
17
+ - sudo apt-get install -y fsl-core fsl-atlases fsl-mni152-templates fsl-feeds afni swig python-vtk xvfb
18
18
- echo 'source /etc/fsl/fsl.sh' >> $HOME/.profile
19
19
- echo 'source /etc/afni/afni.sh' >> $HOME/.profile
20
20
- mkdir -p ~/examples/ && ln -sf /usr/share/fsl-feeds/ ~/examples/feeds
Original file line number Diff line number Diff line change @@ -64,17 +64,6 @@ def __init__(self, value):
64
64
def __str__ (self ):
65
65
return repr (self .value )
66
66
67
-
68
- def _unlock_display (ndisplay ):
69
- lockf = os .path .join ('/tmp' , '.X%d-lock' % ndisplay )
70
- try :
71
- os .remove (lockf )
72
- except :
73
- return False
74
-
75
- return True
76
-
77
-
78
67
def _exists_in_path (cmd , environ ):
79
68
'''
80
69
Based on a code snippet from
@@ -987,22 +976,18 @@ def _run_wrapper(self, runtime):
987
976
988
977
vdisp = Xvfb (nolisten = 'tcp' )
989
978
vdisp .start ()
990
- vdisp_num = vdisp .vdisplay_num
979
+ try :
980
+ vdisp_num = vdisp .new_display
981
+ except AttributeError : # outdated version of xvfbwrapper
982
+ vdisp_num = vdisp .vdisplay_num
991
983
992
984
iflogger .info ('Redirecting X to :%d' % vdisp_num )
993
985
runtime .environ ['DISPLAY' ] = ':%d' % vdisp_num
994
986
995
987
runtime = self ._run_interface (runtime )
996
988
997
989
if self ._redirect_x :
998
- if sysdisplay is None :
999
- os .unsetenv ('DISPLAY' )
1000
- else :
1001
- os .environ ['DISPLAY' ] = sysdisplay
1002
-
1003
- iflogger .info ('Freeing X :%d' % vdisp_num )
1004
990
vdisp .stop ()
1005
- _unlock_display (vdisp_num )
1006
991
1007
992
return runtime
1008
993
You can’t perform that action at this time.
0 commit comments