Home > Net >  MobaXterm does not display the whole image received from WSL
MobaXterm does not display the whole image received from WSL

Time:02-21

I am using WSL1 in Windows 10 with Ubuntu 18.04 LTS.
Configured everything fine to use OpenCV with C , but when I wanted to display an image, I always received the below error.

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.5.5-dev) /opt/opencv/modules/highgui/src/window_gtk.cpp:635: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

After searching on the internet, I've found that I should use some kind of X Server to display the images, so I've installed MobaXterm to try it out. I have also added the export DISPLAY=:0.0 to the ~/.bashrc file.

Now, when I try to display my image, a window pops up, but only a part of the image is displayed.
Displayed image


Does anyone have any idea what should be the problem, why is only a part displayed of the image?
Thank's for everything in advance!

CodePudding user response:

Maybe you can try with another option such as gWSL or XShell? If these are working, then it would be probably an issue related with MobaXterm and you can contact with the developer of this application. If the problem continues, then it should be further investigated.

CodePudding user response:

So, I did not find out the solution for the problem, but I have installed VcXsrv, and everything is working fine, there is no display problem with it.

  • Related