Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running GUI from a container on a mac resolve in "libGL error: No matching fbConfigs or visuals found"

I'm trying to run a container based on ubuntu:15.10 from my Mac.

I run the following command

docker run -i -v /tmp/.X11-unix:/tmp/. -e DISPLAY=192.168.0.104:0 --privileged mycompany/mycontainer

(The IP was taken from my en0: inet using ifconfig)

I'm getting the following error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  26

This container runs on another team member Ubuntu OS without any issues.

Any ideas what is causing this error?

like image 608
Ika Avatar asked Nov 14 '16 21:11

Ika


1 Answers

If your container is attempting to run Chrome in the script then you can use Chrome's SwiftShader software renderer - which works with XQuartz 2.7.11:

chromium-browser --use-gl=swiftshader
like image 198
Pierz Avatar answered Sep 29 '22 09:09

Pierz