nbdd0121 / wsld

WSL Daemon - Stable X11 connection and time synchronisation for WSL2
Apache License 2.0
299 stars 26 forks source link

Is it possible to run 2 instances of wsld? #15

Open gomarion opened 3 years ago

gomarion commented 3 years ago

Hello! I've been using WSLD on Ubuntu 20.04 and it's been working wonderfully! I'm wondering though if it is at all possible to run 2 instances of VcXsrv Server corresponding to 2 different distros?

I'm asking because I'm just recently trying Arch on WSL 2 and as I'm playing around with both instances of WSL, I was wondering if I could make wsld work for both instances simultaneously?

So far, I tried setting the DISPLAY of the first instance (Ubuntu) to =:0 and the 2nd instance (Arch) to =:1, but I could not make it work for the Arch instance.

One thing I checked though is that /tmp/.X0-lock for the Arch instance is not corresponding to the PID of wsld. So I'm assuming I'm doing something wrong with the setup. Or perhaps it's not possible?

Thank you and you have a great day!

nbdd0121 commented 3 years ago

There shouldn't be any blockers preventing multiple instances of wsld being used. I don't have multiple distros installed so I am not certain what's wrong there.

How did you configure .wsld.toml and environment variables in Arch?

gomarion commented 3 years ago

Hello Gary,

I wasn't able to correctly configure both distros to run side-by-side with 2 WSLD's. I can only manage to run one correctly. I was able to migrate all the things I needed from Ubuntu to Arch on that same day, so I didn't need to run X on the Ubuntu distro anymore (I'm still running Ubuntu in a terminal to run some services because I had issues with WSLArch and Systemd). But as far as Arch and WSLD, they are both running perfectly ever since! In fact, it's running even better now probably because of your latest updates and me understanding even better how WSLD works with these distros. :D

I will, however, re-visit this when I install another distro which I'm planning to do in the next couple of months and see if I can indeed run multiple instances of WSLD's and distros. I'll let you know when that time comes. :)

JYInMyHeart commented 3 years ago

Hello Gary,

I wasn't able to correctly configure both distros to run side-by-side with 2 WSLD's. I can only manage to run one correctly. I was able to migrate all the things I needed from Ubuntu to Arch on that same day, so I didn't need to run X on the Ubuntu distro anymore (I'm still running Ubuntu in a terminal to run some services because I had issues with WSLArch and Systemd). But as far as Arch and WSLD, they are both running perfectly ever since! In fact, it's running even better now probably because of your latest updates and me understanding even better how WSLD works with these distros. :D

I will, however, re-visit this when I install another distro which I'm planning to do in the next couple of months and see if I can indeed run multiple instances of WSLD's and distros. I'll let you know when that time comes. :)

Could u please help me to config wsld in arch or manjaro. Wsld doesn't work well in my computer.

gomarion commented 3 years ago

Hello Gary, I wasn't able to correctly configure both distros to run side-by-side with 2 WSLD's. I can only manage to run one correctly. I was able to migrate all the things I needed from Ubuntu to Arch on that same day, so I didn't need to run X on the Ubuntu distro anymore (I'm still running Ubuntu in a terminal to run some services because I had issues with WSLArch and Systemd). But as far as Arch and WSLD, they are both running perfectly ever since! In fact, it's running even better now probably because of your latest updates and me understanding even better how WSLD works with these distros. :D I will, however, re-visit this when I install another distro which I'm planning to do in the next couple of months and see if I can indeed run multiple instances of WSLD's and distros. I'll let you know when that time comes. :)

Could u please help me to config wsld in arch or manjaro. Wsld doesn't work well in my computer.

Hey @JYInMyHeart , the defining moment for me was applying the autostartup setup. Once I did that, things have been working correctly. In my Arch install, I added the codes in this sample to my .bash_profile. Then I just made sure that both of these following files have the ownership and group to my user name: /tmp/.X0-lock and /tmp/.X11-Unix/X0. I also gave /tmp/.X11-Unix/X0 file the full 777 permission.