In case you encounter the following issue when running OpenGL program in a virtual machine
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x180fb10
OpenGL Warning: Retry with 0x8002 returned 0 visuals
Segmentation fault (core dumped)
You may set the LIBGL_ALWAYS_INDIRECT environment variable to 1 before running my GLUT programs, as follows.