Fork me on GitHub
#emacs
<
2020-12-01
>
bartuka14:12:08

hi, I am trying emacs on wsl2, how can I integrate both clipboards? would like to M-w something and C-v on windows apps

genmeblog14:12:01

Use XServer for that. You can use X410 (paid) or XOrg free server from Cygwin (for example). Cygwin X should be run with the following arguments: Xwin :0 -multiwindow -ac +iglx -wgl -clipboard -listen tcp

genmeblog14:12:22

Clipboard is passed both ways, ie win->wsl and wsl->win

bartuka14:12:41

I am using X410 and the option to share clipboard is enabled.

bartuka14:12:53

idk if I need to do something on the ubuntu side (or emacs)

bartuka14:12:54

uhm.. I restarted the X410 and emacs and now M-w is hanging 😕

genmeblog14:12:56

Oh, strange... it works for me well.

bartuka14:12:38

even using emacs -Q does not work

genmeblog14:12:03

maybe Windows firewall is blocking something?

bartuka14:12:36

idk, I'm new to windows .. still trying to figure out how to debug this

genmeblog14:12:26

I don't know how to do this 😕

genmeblog14:12:17

Just a random reddit post from the past (3y ago): I use Emacs (25.3) with VcXsrv (X Server for Windows) and clipboard sharing works like a charm (but only after latest Creator Update for Windows 10, earlier you had to patch sources of Emacs to prevent it from hanging). (here: https://www.reddit.com/r/bashonubuntuonwindows/comments/6xx3k5/emacs_functions_for_the_windows_clipboard/)

genmeblog14:12:58

So maybe you haven't updated Windows to the newest one?

bartuka14:12:08

uhm.. there are a couple of updates pending here. let me try. thanks

genmeblog14:12:14

the bigger updates should be initiated manually by you, they are not automatic anymore.

🚀 3
bartuka14:12:29

@tsulej it worked! thanks for the help

bartuka14:12:34

I am being so brave and not cursing windows too much bc of every annoyance. I'll give myself a cookie now =)

genmeblog16:12:46

that's great! cookie is obligatory now 🙂