Search code examples
opencvopengl-esraspberry-piraspbianimshow

GdkGLExt-WARNING **: Window system doesn't support OpenGL


I am using Opencv in raspberry pi 2. It was working fine but after upgrading it to raspbian Jessie it is showing following error when cv::imshow() function is called: GdkGLExt-WARNING **: Window system doesn't support OpenGL and crashes. Tried installing libgl1-mesa-dri but it is already the latest version. Can anyone tell what is the issue?


Solution

  • The problem is solved by replacing tightvncserver with vnc4server along with other packages as shown in the bash script below:

    #! /bin/bash
    
    # Make sure only root can run our script
    if [[ $EUID -ne 0 ]]; then
       echo "This script must be run as root" 1>&2
       exit 1
    fi
    dpkg --purge tightvncserver
    dpkg -i xbitmaps_1.1.1-2_all.deb
    dpkg -i x11-apps_7.7+4_armhf.deb
    dpkg -i x11-session-utils_7.7+1_armhf.deb
    dpkg -i xbase-clients_1%3a7.7+7_all.deb
    dpkg -i vnc4server_4.1.1+X4.3.0-37.6_armhf.deb
    # Restart vnc running script in background
    systemctl restart vncboot.service