cggh / biipy

Docker image for bioinformatics analysis.
MIT License
6 stars 2 forks source link

Jupyter qtconsole gives X Error: BadAccess (attempt to access private resource denied) #10

Closed alimanfoo closed 8 years ago

alimanfoo commented 8 years ago

Attempting to run the Jupyter qtconsole results in an error that looks like this:

$ biipy_run.sh v1.5.0 jupyter qtconsole
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x4a00005
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xd6
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x4a00010
...

There is a workaround, which is to create a script like:

#!/bin/bash
QT_X11_NO_MITSHM=1 jupyter qtconsole

...then execute this script, e.g., if called "jupyterqt.sh" then:

$ biipy_run.sh v1.5.0 jupyterqt.sh

...however it might be worth ensuring QT_X11_NO_MITSHM=1 is in the environment already, e.g., with an ENV call in the Dockerfile.

hardingnj commented 8 years ago

Sounds reasonable. So nothing else required other than adding that line to the dockerfile? Or is it better to let users run with the --env flag?