2

From my computer:

$ cat /etc/issue && uname -a
Ubuntu 14.04.1 LTS \n \l

Linux abc-pc 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I am using Qt 5.4 and QtCreator 3.3.0

I have read this answer regarding the opengl errors, but I am not sure if that applies to me too.

The programs run very finely on my computer, but a peer does ssh from his own computer on my computer and runs the same program and the following errors are shown on his computer.

Doing ssh means that he is actually working on my computer so when I am not getting these errors why is he?

libGL error: failed to load driver: swrast
Connected to  "xyz"
QOpenGLShader: could not create shader
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShaderProgram::uniformLocation( imageTexture ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed: 
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed: 
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( pixelSize ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed: 
1
3

Try connecting with ssh -X, then running the command DISPLAY=:0 after logging in, before starting the program.

I.e.

$ ssh -X YOURCOMP
...
$ DISPLAY=:0
$ ./[run gl program]

All in all, it might let you access the remote machine's graphics drivers. For instance, if you just ran glxinfo | grep OpenGL, you will not get the expected result through ssh, unless you do both ssh -X, and DISPLAY=:0 (as shown in the first link).

You can get glxinfo from mesa-utils.


Also, a nice GL program to test with is glxgears which is also from the mesa-utils package. If this works, and your program doesn't, it suggests that the problem might be because of something else.

4
  • Thanks, I'll try that. But, kindly explain in your answer what does that do and why it is helpful. – Aquarius_Girl Feb 27 '15 at 8:30
  • Added a little explanation :) – swalog Feb 27 '15 at 8:40
  • @TheIndependentAquarius Did you get around to trying it? – swalog Feb 28 '15 at 23:11
  • Didn't work. Writing Display=0 opened the application on my own computer. Not what I want is this. – Aquarius_Girl Mar 3 '15 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.