spinalcordtoolbox / sct_docker

Docker distribution of Spinal Cord Toolbox
3 stars 3 forks source link

Unable to access the X Display on OSX #29

Closed jcohenadad closed 5 years ago

jcohenadad commented 5 years ago

Continuation of https://github.com/neuropoly/sct_docker/issues/20#issuecomment-516959768

jcohenadad commented 5 years ago

After installing Xquartz, when running:

ssh -Y -p 2222 sct@localhost
fsleyes

The X window gets started (i.e. no more "Unable to access the X Display" issue), however I get the following error:

sct@ebb387dd42c7:~$ fsleyes 
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
16:11:06: Debug: Adding duplicate image handler for 'Windows bitmap file'

(fsleyes:53): Gdk-ERROR **: 16:11:06.151: The program 'fsleyes' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 356 error_code 2 request_code 149 (GLX) minor_code 24)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap

Note: xeyes works properly

jcohenadad commented 5 years ago

Solution found here. To overcome this error:

libGL error: No matching fbConfigs or visuals found

Run the following command:

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

Note: only works for OSX.

jcohenadad commented 5 years ago

Issue will be closed once documentation is updated

jcohenadad commented 5 years ago

documentation updated in 3e9a4ac