discordjs / RPC

A simple RPC client for Discord
MIT License
467 stars 192 forks source link

IPC Path Problem On Ubuntu 18.04 #36

Closed PolyMeilex closed 6 years ago

PolyMeilex commented 6 years ago

Problem

So... On Ubuntu 18.04 path to discord ipc is /run/user/1000/snap.discord/discord-ipc-{Id} instead of /run/user/1000/discord-ipc-{Id} with cause Could not connect error

WorkAround For Ubuntu Users

Hard code new path to every discord-rpc/src/transports/IPC.js file on your computer. Path is on line 128.

return `${prefix.replace(/\/$/, '')}/snap.discord/discord-ipc-${id}`;
devsnek commented 6 years ago

my library matches with discord's reference implementation: https://github.com/discordapp/discord-rpc/blob/7c41a8ec1969b9b4b0c2360c6b632ebd16a92b69/src/connection_unix.cpp#L29

open an issue on that repo if you find the behaviour unsatisfactory.