4

I am running an Arch Linux Machine on Hyper-V with Windows X11 Server (VcXsrv) for GUI. It works wonderfully well (since it brings the X Windows as native Window in Windows 10 - I can do Alt+Tab etc.; it is almost like Windows 10 my window manager :-)) except for one problem: Windows would "disappears" if I lock or suspend my machine possibly due to the issue mentioned here: WSL2 X11 programs "disappear". The worst part is that all the processes are intact.

It seems like TCP/IP is the issue; but why should TCP/IP be a problem if I am in the same machine? Can I make it to not disconnect during lock or suspend?

Alternatively, is there anyway to re-attach the X Windows if I can store the Window IDs or something like that? It seems like a trivial problem but no direct solution seems to exist.

I can use screen to save my terminal work (but even then the terminal window would be open), but X is the problem. I read about xpra here Reattach to lost X11 session, but I doubt it can create sessions in Windows?

The steps to reproduce this issue is really simple:

  1. Create a VM using Hyper-V.
  2. Use Hyper-V's "Connect" to open a console.
  3. Start VcXsrv on Windows.
  4. Type DISPLAY=<host.ip.address:0.0> xterm.
  5. Lock or suspend Windows.

What about disowning?

My starting script looks like this:

#!/usr/bin/bash

"${@}" &>/dev/null &

disown

Could disowning in my starter script be the problem? Once in a while I logout of my Hyper-V's console (especially after starting the GUI programs) - will that be a problem?

Edit: Keeping the Hyper-V's console open will also not solve the problem. Even executing it in foreground without disown didn't help.

Nishant
  • 773

0 Answers0