Is it possible to connect to a WSLg VAIL connnection from a different Windows logon session from the session running WSL?

MinusOne 0 Reputation points
2025-03-08T15:15:15.2566667+00:00

Is it possible to allow permissions to connect to WSLg VAIL connection from outside the windows logon session that wsl is being run?

If running a WSL instance as a service, is it possible to connect to the RDP Server HVSession from an interactive session? I've captured the launch command

msrdc /wslg /silent /v:0C320E75-9189-4757-BC59-FAFB9A7B468B /hvsocketserviceid:00000001-FACB-11E6-BD58-64006A7986D3 /plugin:WSLDVC_PACKAGE /wslgsharedmemorypath:WSL\0C320E75-9189-4757-BC59-FAFB9A7B468B\wslg C:\Program Files\WSL\wslg.rdp

Trying to launch this command in another session on the same host results in an error (0x4).

Using WinObj I can see that the shared memory directory is located under the users session folder: Sessions\1\BaseNamedObjects\WSL\0C320E75-9189-4757-BC59-FAFB9A7B468B\wslg

I've tried using Winobj to grant the second user permissions to the shared memory NTObject and also used powershell to create a symlink for the shared memory area under the second users session folder but still get the same error.

Are there any permissions on the hvsocket or am I missing a simple way to access a WSLg FreeRDP hvsocket connection from a different Windows logon session?

Running the command via RunAs in the second session with the service account details does result in the command succeeding but this isn't a good solution.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,835 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.