microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.26k stars 310 forks source link

Copy from WIndows app to GUI app in WSL does not work. #1010

Open caedmon-kitty opened 1 year ago

caedmon-kitty commented 1 year ago

Windows build number:

22624.0

Your Distribution version:

22.04

Your WSL versions:

WSL version: 1.1.5.0 Kernel version: 5.15.90.1 WSLg version: 1.0.50 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22624.1465

Steps to reproduce:

  1. Copy text in firefox or chrome browser on Windows using Right click/copy
  2. Click middle mouse button in terminal emulator or emacs running under wsl.

I expect the standard X11 behavior - the copied text to be pasted. Instead the Main windows terminal window displays the error "X11: Failed to convert selection to data from clipboard"

WSL logs:

weston.log

WSL dumps:

No response

Expected behavior:

I expect the standard X11 behavior - the copied text to be pasted. Instead the Main windows terminal window displays the error "X11: Failed to convert selection to data from clipboard"

My main development systems are Linux based (RHEL and Ubuntu). I have used X11 for more than 20 years. We are evaluating using iIndows and WSL for a development environment. But if this basic functionality does not work then it is a nogo for us.

Actual behavior:

Instead the Main windows terminal window displays the error "X11: Failed to convert selection to data from clipboard"

caedmon-kitty commented 1 year ago

Forgot to say when I disable the wayland server in wsl and using x410.exe copy/paste works fine. But x410.exe has major problems with openGL so cannot use it.

rromanv commented 1 year ago

For now, I could make it work just on Firefox, running on Wayland.

I enable the dom.events.testing.asyncClipboard, dom.events.asyncClipboard.readText and dom.events.asyncClipboard.clipboardItem

then on terminal, MOZ_ENABLE_WAYLAND=1 firefox