Nipype XQuartz Error on Test Configuration

Hello all.

I have installed Nipype and all of its components and went to run the test configuration and received the following error: RuntimeError: Xvfb requires root permissions to run in OSX. Please make sure that an X server is listening and set the appropriate config on either $DISPLAY or nipype’s “display_variable” config. Valid X servers include VNC, XQuartz, or manually started Xvfb.

The error itself is referenced here: https://github.com/nipy/nipype/issues/1400
I AM running Nipype on a MacOS (High Sierra) but my question is that when I
echo $DISPLAY in bash I do get a value. Specifically: /private/tmp/com.apple.launchd.4rcsM6jtla/org.macosforge.xquartz:0
I am using XQuartz which is currently open.

Are there settings I need to change to get the test_config to run without erring? Alternatively, will this be a problem for running pipelines or can it be ignored?

Thank you for any help.
Lauren

what is your nipype version?:

python3 -c "import nipype; print(nipype.__version__)"

My Nipype version is 0.14.0.
I am running python 2.7 as opposed to python 3 for compatibility purposes, if this matters. If it does I apologize for missing that; it didn’t seem to be the case from my reading.

@oesteban - this was reported as an issue and it’s still open

Will this affect actual workflows in any way? I’m not sure if it is a problem with the test_configuration only or if this will cause problems during actual analyses. Past threads when googled seem to indicate the former but I’d like to be sure before I start attempting to create pipelines if it is the latter.

This problem may affect workflows that integrate tools that require an available display (as in real or virtual screen).

During testing, some of these tools are run and will require the display. When no physical display is attached (which is done just checking the value of the $DISPLAY environment variable) then nipype tries to create a virtual display with that tool, Xvfb. This fails for OSX because Xvfb needs to be run as root.

However, in your setting this should not happen since you have a value for your $DISPLAY.

Try setting the the display variable via nipype options. You can create a file $HOME/nipype.cfg with the following content:

[execution]
display_variable = :0

then, make sure the $DISPLAY variable is not set (unset $DISPLAY), and finally check if tests run correctly.

Please let us know if that resolved the issue.