# How to Configure Discord RPC Integration with rpc-bridge in osu-winello

> Configure Discord RPC with osu-winello and rpc-bridge. Run osu-wine --fixrpc to enable Discord Rich Presence for osu! in your Wine prefix effortlessly.

- Repository: [NelloKudo/osu-winello](https://github.com/nellokudo/osu-winello)
- Tags: how-to-guide
- Published: 2026-03-07

---

**Run `osu-wine --fixrpc` to automatically download, install, and register rpc-bridge as a Windows service in your Wine prefix, enabling Discord Rich Presence for osu!.**

The `nellokudo/osu-winello` project provides a built-in helper for **Discord RPC integration with rpc-bridge**, eliminating manual configuration. This integration forwards game events from the Wine environment to Discord's Rich Presence API using a lightweight Windows-native service.

## How Discord RPC Works in osu-winello

### The rpc-bridge Architecture

rpc-bridge acts as a translation layer between osu! running in Wine and Discord's native IPC on Linux. The [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh) script defines the bridge version and download URL via the `DISCRPCBRIDGEVERSION` (set to `1.2`) and `DISCRPCLINK` variables at lines 22 and 36, respectively.

### Key Components and File Locations

| Component | File Path | Purpose |
|-----------|-----------|---------|
| Core logic | [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh) | Contains the `discordRpc` function and download logic |
| User interface | `osu-wine` | Maps `--fixrpc` flag to the discordrpc command |
| Bridge binary | `${WINEPREFIX}/drive_c/windows/bridge.exe` | The installed Windows service executable |

## Installing rpc-bridge via the Command Line

### Using the --fixrpc Flag

The simplest method to configure Discord RPC integration is running the built-in fix command:

```bash
osu-wine --fixrpc

```

This command triggers the `discordRpc` function in [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh) (lines 864-880), which handles the complete installation pipeline: checking for existing installations, cleaning old registry entries, downloading the binary, and registering the service.

### Manual Installation Method

For debugging or custom setups, you can invoke the function directly after sourcing the main script:

```bash
source /path/to/osu-winello.sh
discordRpc

```

## Technical Implementation Details

### Version Management and Download Logic

The script hardcodes the rpc-bridge version for stability. In [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh) at line 22, `DISCRPCBRIDGEVERSION=1.2` defines the target release. Line 36 constructs the GitHub release URL stored in `DISCRPCLINK`, pointing to the official `rpc-bridge` repository's release assets.

### The discordRpc Function Workflow

The installation follows a strict sequence defined in [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh) lines 864-880:

1. **Existence check**: Verifies if `bridge.exe` exists at `${WINEPREFIX}/drive_c/windows/bridge.exe` (lines 864-866)
2. **Registry cleanup**: Removes any stale service entries using `waitWine reg delete 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\rpc-bridge' /f` (line 870)
3. **Download**: Fetches the release zip to `/tmp/bridge.zip` using the `DownloadFile` helper (line 873)
4. **Extraction**: Unzips to `/tmp/rpc-bridge` (line 875)
5. **Service registration**: Executes `bridge.exe --install` within the Wine environment to create the Windows service (line 877)
6. **Cleanup**: Removes temporary files from `/tmp` (lines 878-880)

### Service Registration Process

The critical step occurs at line 877 where `waitWine /tmp/rpc-bridge/bridge.exe --install` runs the bridge executable with installation flags. This creates the `rpc-bridge` service in the Wine registry, allowing osu! to communicate with Discord's IPC socket through the bridge.

## Verifying and Troubleshooting

### Checking Installation Status

Verify that the bridge installed correctly by checking for the executable:

```bash
test -f "$HOME/.local/share/osu-winello/wineprefixes/osu-wineprefix/drive_c/windows/bridge.exe" && echo "rpc-bridge installed"

```

### Reinstalling or Removing rpc-bridge

If Discord Rich Presence stops working, force a reinstall by running `osu-wine --fixrpc` again. The script detects the existing `bridge.exe` (line 864) and prompts for reinstallation.

To manually remove the service and binary:

```bash
waitWine reg delete 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\rpc-bridge' /f
rm -f "${WINEPREFIX}/drive_c/windows/bridge.exe"

```

## Summary

- **Primary command**: Run `osu-wine --fixrpc` to automatically configure Discord RPC integration with rpc-bridge in osu-winello.
- **Core implementation**: The `discordRpc` function in [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh) handles downloading version 1.2 of rpc-bridge, cleaning registry entries, and installing `bridge.exe` as a Windows service.
- **Installation path**: The bridge executable resides at `${WINEPREFIX}/drive_c/windows/bridge.exe` after successful setup.
- **Troubleshooting**: Re-run the fix command to reinstall, or manually delete the registry key and binary to reset the integration.

## Frequently Asked Questions

### What is rpc-bridge and why do I need it for Discord RPC?

rpc-bridge is a lightweight Windows-native service that translates IPC calls from osu! running in Wine to Discord's Rich Presence API on Linux. You need it because Discord's native Linux client cannot directly detect games running inside Wine prefixes; the bridge acts as a forwarding layer that reports your current map, status, and playtime to Discord.

### Where does osu-winello install the rpc-bridge executable?

According to the source code in [`osu-winello.sh`](https://github.com/nellokudo/osu-winello/blob/main/osu-winello.sh), the bridge executable is installed at `${WINEPREFIX}/drive_c/windows/bridge.exe`. For default installations, this path resolves to `$HOME/.local/share/osu-winello/wineprefixes/osu-wineprefix/drive_c/windows/bridge.exe`. The script checks for this file at line 864 to determine if a previous installation exists.

### Can I use Discord RPC without running osu-wine --fixrpc?

No, the integration requires the rpc-bridge service to be registered inside the Wine prefix. While you could theoretically download and install `bridge.exe` manually using Wine command-line tools, the `osu-wine --fixrpc` command automates the specific registry entries, service registration, and version management required for osu! to communicate with Discord. Manual setup would require replicating the exact steps found in the `discordRpc` function.

### How do I fix Discord Rich Presence if it stops working?

First, try reinstalling the bridge by running `osu-wine --fixrpc` again, which will prompt you to overwrite the existing installation. If that fails, manually clean up by deleting the Windows service registry entry with `waitWine reg delete 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\rpc-bridge' /f` and removing the binary at `${WINEPREFIX}/drive_c/windows/bridge.exe`, then run the fix command once more.