0

I am connecting to a local server that runs MATLAB (version 2015a) via ssh with the X forwarding option (ssh -X).

However when I start MATLAB I get this warning:

libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: nouveau
libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed (/usr/local/MATLAB/R2015a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /lib64/libLLVM-3.5-mesa.so))
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
MATLAB is selecting SOFTWARE OPENGL rendering.

When I start MATLAB as root then instead of Permission denied in the first line, I get:
libGL error: failed to authenticate magic 1

The graphics are terrible, even the text (See the screenshot below). I suppose this issue is related to forwarding the graphics to guest system via ssh. So I thought the display option in MATLAB can be set to the guest-system X-display which I did by:
matlab -display guest-ip:0

Even then I am getting the OpenGL error and there is no graphical output (matlab runs in shell and figure windows do not pop up).

The host has centos-7 and the guest has fedora-20 and both have mesa-libGLU installed. What is the right way to forward high quality graphics?


Host system enter image description here

Guest system (for comparison) enter image description here

1
  • I think hardware OpenGL only works locally, not via remote X, and as a consequence Matlab switches to software rendering of OpenGL. Try to use Matlab's "painters" renderer instead: mathworks.com/help/matlab/ref/…
    – A. Donda
    May 1, 2015 at 16:21

1 Answer 1

1

I had this same issue and solve it using the guide from: http://cplusadd.blogspot.com/2012/01/speeding-up-matlab-over-x11-forwarding.html If you log into machine A via ssh from machine B, and then run the matlab terminal command in the home directory of A, create a file in the home directory titled java.opts with the contents:

-Dsun.java2d.pmoffscreen=false

Then ssh using these options:

ssh -c arcfour,blowfish-cbc -Y -C username@server

For myself, this made running matlab over ssh much, much better.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .