Skip to content

WSL Support using npipereplay #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
barraIhsan opened this issue Sep 28, 2024 · 0 comments
Open

WSL Support using npipereplay #247

barraIhsan opened this issue Sep 28, 2024 · 0 comments

Comments

@barraIhsan
Copy link

Currently, when running rpc_client.connect(), it will trigger raise DiscordNotFound inside WSL2.

However, npipereplay allows us to access windows pipes from wsl.

For example, a neovim plugin to display discord rpc, they managed to get it working using npipereplay (using the same way as WSL1).

And I managed to get it working by running socat and npipereplay that is executed using systemd
(neovim is running on my wsl, and discord is running on my windows host)
image
image

But, when I tried running jerry—a program that integrate pypresence to get discord rpc working— inside my wsl and enable the discord rpc support, it triggered the raise DiscordNotFound. jerrydiscordpresence.py (raw)

Traceback (most recent call last):
  File "/usr/local/bin/jerrydiscordpresence.py", line 14, in <module>
    rpc_client.connect()
  File "/usr/lib/python3.12/site-packages/pypresence/presence.py", line 43, in connect
    self.loop.run_until_complete(self.handshake())
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pypresence/baseclient.py", line 108, in handshake
    raise DiscordNotFound
pypresence.exceptions.DiscordNotFound: Could not find Discord installed and running on this machine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant