Advertisement
AndroidKris

Untitled

Jul 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. # -*- sh -*-
  2. # Xsession.d script to set the QT_XCB_FORCE_SOFTWARE_OPENGL env variable when
  3. # the user does not has at least OpenGL 2 support.
  4. #
  5. # This file is sourced by Xsession(5), not executed.
  6.  
  7. if [ "$(which glxinfo)" = "" ] ; then
  8. echo "To detect whether software based rendering is needed for Qt 5 the glxinfo program is a requirement but it was not found on this system."
  9. echo "On Debian (based) systems, install the mesa-utils package."
  10. #echo "On RedHat (based) systems, install the glx-utils package."
  11. else
  12. OPENGL_VERSION=`LANG=C glxinfo | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'`
  13. if [ -n "$OPENGL_VERSION" ] && [ "$OPENGL_VERSION" -lt 2 ]; then
  14. QT_XCB_FORCE_SOFTWARE_OPENGL=1
  15. export QT_XCB_FORCE_SOFTWARE_OPENGL
  16. elif [ -n "$OPENGL_VERSION" ] ; then
  17. echo "OpenGL version: $OPENGL_VERSION."
  18. else
  19. echo "OpenGL version not found."
  20. fi
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement