Category : xserver

I’m trying to run the example GLFW program on WSL2 with vcxsrv as the X server. There are no problems running the current program with the two lines commented out. When I uncomment only glCear(CL_COLOR_BUFFER_BIT);, it lags a bit when I drag the window around. When I uncomment only glfwSwapBuffers(window) the program crashes as soon ..

Read more

I want to make a method that sets handler for specific event (e. g. using hash table). But to set event handler I need event mask, and to handle event, I need event type. Can I cast one to the other somehow? For example, to handle ExposureEvent I use handler_[ExposureMask] = [this]() { XWindowAttributes new_attributes; ..

Read more

I have Debian installed on my WSL2, running VcXsrv, but cannot get opencv to display image. I have both libgtk2.0-dev and pkg-config installed. When I try to use imshow, I get the following error terminate called after throwing an instance of ‘cv::Exception’ what(): OpenCV(4.5.1-dev) /home/scs/opencv/modules/highgui/src/window.cpp:679: error: (-2:Unspecified error) The function is not implemented. Rebuild the ..

Read more

Recently I found windows terminal from MicroSoft store and gave it a try. It works pretty well except X11 forwarding. Nothing can be captured by VcXsrv. I tried almost every combination of the ssh commands ssh -X(AYC) [email protected] And also different settings of DISPLAY env variable export DIPSLAY=localhost:$number.0 export DIPSLAY=localhost:127.0.0.1:$number.0 export DIPSLAY=localhost:$machine_ip:$number.0 However none of ..

Read more

I’m trying to run a simple C++/OpenCV program that does some image manipulations and shows intermediate results with imshow(…). Everything works fine until I try to run it remotely by ssh. In this case imshow(…) gives me an error: Unable to init server: Could not connect: Connection refused (Demo:15036): Gtk-WARNING **: 11:03:09.688: cannot open display: ..

Read more

How to run graphical Linux desktop applications from Windows 10’s Bash Shell? First, I installed Windows Subsystem for Linux (WSL) following steps as shown in here as follows: (1) Installed Windows 10 Pro Insider Preview Build 19619. (2) Installed Ubuntu Linux distribution. (3) Changed the distribution version from WSL 1 to WSL 2. Second, to ..

Read more