https://bugs.winehq.org/show_bug.cgi?id=50045
Bug ID: 50045 Summary: [Feature request] Mapping Windows Named Pipes to Unix Domain Sockets Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: wineserver Assignee: wine-bugs@winehq.org Reporter: 0e4ef622@gmail.com Distribution: ---
The main motivation for this feature is Discord Rich Presence. This would enable games running under wine to support Rich Presence with a natively running Discord application. Note that it is possible to emulate this feature using an external "proxy" program running in the same wineprefix.
Here are 2 such programs: https://github.com/0e4ef622/wine-discord-ipc-bridge https://github.com/openglfreak/winestreamproxy
Although they work, I believe it's possible and more ideal to have wineserver simply serve a file descriptor connected to the socket when a game connects to the named pipe.
https://bugs.winehq.org/show_bug.cgi?id=50045
Anya maniikarabera@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maniikarabera@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=50045
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- Very recent versions of Windows support AF_UNIX sockets. Naïvely I think we'd want to implement those instead.
https://bugs.winehq.org/show_bug.cgi?id=50045
--- Comment #2 from Matthew 0e4ef622@gmail.com --- I don't think that would help since the game uses named pipes.
The way Rich Presence works is as follows:
On Windows:
When Discord is started, it creates a named pipe at `\.\pipe\discord-ipc-0` and listens for connections.
When a game supporting Rich Presence is started, it connects to that pipe and the two programs communicate using JSON.
On Linux, it's basically identical, but instead of a named pipe, it's a unix socket in, e.g. `/tmp/discord-ipc-0`. (The actual path depends on system configuration, but that's irrelevant).
So just implementing AF_UNIX sockets wouldn't help, the game wouldn't touch them.
https://bugs.winehq.org/show_bug.cgi?id=50045
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- If that's what you're trying to do, I don't think it'll work. Named pipes are, broadly speaking, more complicated than that. A better approach would be, I think, to use a winelib executable to read messages from the win32 pipe and write into a Unix socket. That looks from cursory examination like what both of the linked projects do, although the first skirts the tricky bits of winelib by instead making direct syscalls, and the second involves some other service I didn't inspect very closely.
https://bugs.winehq.org/show_bug.cgi?id=50045
Peter Oliver bugs.winehq.org@mavit.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs.winehq.org@mavit.org.u | |k
https://bugs.winehq.org/show_bug.cgi?id=50045
soredake broaden_acid002@simplelogin.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|broaden_acid002@simplelogin | |.com |