FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.53k stars 78 forks source link

Uxplay with WSL not working #309

Closed podpah closed 3 months ago

podpah commented 3 months ago

I have a Linux distro on WSL. I've ran the following on powershell:

New-NetFirewallRule -Name "Allow mDNS" -DisplayName "Allow mDNS" -Protocol UDP -LocalPort 5353 -Action Allow -Direction Inbound
netsh interface portproxy add v4tov4 listenport=5353 listenaddress=0.0.0.0 connectport=5353 connectaddress=<WSL2_IP>

And this is the avahi-daemon output:

Found user 'avahi' (UID 115) and group 'avahi' (GID 124).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
Successfully called chroot().
Successfully dropped remaining capabilities.
No service file found in /etc/avahi/services.
Joining mDNS multicast group on interface eth0.IPv6 with address fe80::215:5dff:fe6e:c5f6.
New relevant interface eth0.IPv6 for mDNS.
Joining mDNS multicast group on interface eth0.IPv4 with address 172.24.127.0.
New relevant interface eth0.IPv4 for mDNS.
Joining mDNS multicast group on interface lo.IPv6 with address ::1.
New relevant interface lo.IPv6 for mDNS.
Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
New relevant interface lo.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for fe80::215:5dff:fe6e:c5f6 on eth0.*.
Registering new address record for 172.24.127.0 on eth0.IPv4.
Registering new address record for ::1 on lo.*.
Registering new address record for 127.0.0.1 on lo.IPv4.
Withdrawing address record for fe80::215:5dff:fe6e:c5f6 on eth0.
Withdrawing address record for 172.24.127.0 on eth0.
Withdrawing address record for 127.0.0.1 on lo.
Host name conflict, retrying with Bender-2
Registering new address record for fe80::215:5dff:fe6e:c5f6 on eth0.*.
Registering new address record for 172.24.127.0 on eth0.IPv4.
Registering new address record for ::1 on lo.*.
Registering new address record for 127.0.0.1 on lo.IPv4.
Server startup complete. Host name is Bender-2.local. Local service cookie is 2637258130.

And when I run Uxplay:

% uxplay -n Bender -nh
UxPlay 1.68: An Open-Source AirPlay mirroring and audio-streaming server.
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
using system MAC address 00:15:5d:6e:c5:f6
Initialized server socket(s)

But it's not showing up on Apple devices for AirPlay

fduncanh commented 3 months ago

look at #278 (someone else using WSL)

fduncanh commented 3 months ago

should we close this (or will you)?

fduncanh commented 3 months ago

closing. hope issue is resolved. reopen if necessary

podpah commented 3 months ago

Sorry - hadn't noticed there was an update the issue. I checked out 278. I removed my network configurations, applied his + mDNS forwaring with the udp-redux and it still won't show up on my network. I didn't set up XServer but I don't actually use Uxplay for video, just audio which is why there's the error that you see on the output I sent, but it's initializing just fine so I don't think it would be that

fduncanh commented 3 months ago

For just audio, uxplay -vs 0 -async is probably what you want.

We havent attempted to test on WSL. Should we? You can build uxplay natively on windows using msys2 (see the README:https://github.com/FDH2/UxPlay#building-uxplay-on-microsoft-windows-using-msys2-with-the-mingw-64-compiler

podpah commented 3 months ago

Added those flags in and it says video disabled, but still can't find it

I would say I think you should but I'm totally biased rn. I'm guessing the user base using uxplay on wsl is pretty niche compared to the Linux users so objectively it might not be worth it. Although if there's Windows support too, maybe one official setup guide might be worth?

fduncanh commented 3 months ago

The setup guide for Windows is here: https://github.com/FDH2/UxPlay#building-uxplay-on-microsoft-windows-using-msys2-with-the-mingw-64-compiler

Its very easy.

fduncanh commented 3 months ago

we will look into WSL, because of time constraints this may not be right away. based on #278 its not obvious, and the native windows build is likely to have better video support. I believe WSL is aimed at command line use (?)

podpah commented 1 month ago

@fduncanh yeah I would agree WSL is indeed focused on CLI use, but it also has support for GUI applications. https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

(Sorry for the late reply I forgot to say this and just remembered now)