https://github.com/enderice2/rpc-bridge
Enable Rich Presence between your Wine applications and the native Discord client on Linux and macOS.
https://github.com/enderice2/rpc-bridge
c discord discord-rpc linux linux-gaming lutris mac-gaming macos mingw rich-presence steam wine winehq
Last synced: about 2 months ago
JSON representation
Enable Rich Presence between your Wine applications and the native Discord client on Linux and macOS.
- Host: GitHub
- URL: https://github.com/enderice2/rpc-bridge
- Owner: EnderIce2
- License: mit
- Created: 2023-10-13T00:53:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-09T03:38:29.000Z (about 2 months ago)
- Last Synced: 2025-04-09T04:27:05.270Z (about 2 months ago)
- Topics: c, discord, discord-rpc, linux, linux-gaming, lutris, mac-gaming, macos, mingw, rich-presence, steam, wine, winehq
- Language: C
- Homepage: https://enderice2.github.io/rpc-bridge/
- Size: 7.43 MB
- Stars: 82
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Discord RPC Bridge for Wine


Simple bridge that allows you to use Discord Rich Presence with Wine games/software.
Works by running a small program in the background that creates a [named pipe](https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipes) `\\.\pipe\discord-ipc-0` inside the prefix and forwards all data to the pipe `/run/user/1000/discord-ipc-0`.
This bridge takes advantage of the Windows service implementation in Wine, eliminating the need to manually run any programs.
---
## Installation & Usage
Installation will copy itself to `C:\windows\bridge.exe` and create a Windows service.
Logs are stored in `C:\windows\logs\bridge.log`.#### Installing inside a prefix
##### Wine (~/.wine)
- Double click `bridge.exe` and click `Install`.
- 
- To remove, the same process can be followed, but click `Remove` instead.*Note, an [extra step](https://github.com/EnderIce2/rpc-bridge?tab=readme-ov-file#macos) is needed on MacOS*
##### Lutris
- Click on a game and select `Run EXE inside Wine prefix`.
- 
- The same process can be followed as in Wine.##### Steam
- Right click on the game and select `Properties`.
- Under `Set Launch Options`, add the following:
- 
- The `bridge.sh` script must be in the same directory as `bridge.exe`.#### If you use Flatpak
- If you are running Steam, Lutris, etc in a Flatpak, you will need to allow the bridge to access the `/run/user/1000/discord-ipc-0` file.
- ##### By using [Flatseal](https://flathub.org/apps/details/com.github.tchx84.Flatseal)
- Add `xdg-run/discord-ipc-0` under `Filesystems` category
- 
- ##### By using the terminal
- Per application
- `flatpak override --filesystem=xdg-run/discord-ipc-0 `
- Globally
- `flatpak override --user --filesystem=xdg-run/discord-ipc-0`##### MacOS
The steps for MacOS are almost the same, but due to the way `$TMPDIR` works, you will have to install a **LaunchAgent**.
- Download the latest build from the [releases](https://github.com/EnderIce2/rpc-bridge/releases)
- Open the archive and make the `launchd.sh` script executable by doing: `chmod +x launchd.sh`
- To **install** the LaunchAgent, run `./launchd install` and to **remove** it simply run `./launchd remove`.The script will add a LaunchAgent to your user, that will symlink the `$TMPDIR` directory to `/tmp/rpc-bridge/tmpdir`.
*Note: You will need to launch the `bridge.exe` file manually in Wine at least once for it to register and launch automatically the next time.*
## Compiling from source
- Install the `wine`, `gcc-mingw-w64` and `make` packages.
- Open a terminal in the directory that contains this file and run `make`.
- The compiled executable will be located in `build/bridge.exe`.## Credits
This project is inspired by [wine-discord-ipc-bridge](https://github.com/0e4ef622/wine-discord-ipc-bridge).
---