Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: 
share|improve this question

migrated from stackoverflow.com Apr 10 '15 at 10:05

This question came from our site for professional and enthusiast programmers.

    
askubuntu.com/questions/47062/… This post on askubuntu provides a thorough discussion of this problem. – Lee Jacobs Mar 9 '15 at 7:40

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.

share|improve this answer
    
Thanks, I'll try that. But, kindly explain in your answer what does that do and why it is helpful. – TheIndependentAquarius 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. – TheIndependentAquarius Mar 3 '15 at 16:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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