HGL
extended-salmon

RPC with native discord, flatpak heroic

"native discord" but I really mean an arRPC server running and discord in a chromium browser (which does work like native discord app would) what kind of tweaks do I need to do to get RPC working? heroic is flatpak but discord is native
14 Replies
CommandMC
CommandMC2y ago
Communication with Discord is done via a 3rd party library. Internally, this talks to an IPC socket at $XDG_RUNTIME_DIR/discord-ipc-0 (along with some other paths). Is this socket present on your install? The full list of path can be found at https://github.com/discordjs/RPC/blob/9e7de2a6d917591f10a66389e62e1dc053c04fec/src/transports/ipc.js#L16-L23
extended-salmon
extended-salmonOP2y ago
i'm pretty sure it is, yes
CommandMC
CommandMC2y ago
GitHub
Rich Precense (discord rpc)
Contribute to flathub/com.discordapp.Discord development by creating an account on GitHub.
CommandMC
CommandMC2y ago
(to clarify, make those changes yourself with (1) Flatseal and (2) by simply adding that symlink)
extended-salmon
extended-salmonOP2y ago
i was wondering about that, but
Ask the applications maintainers to do this, don't do it yourself to ensure you continue to get updates.
this point suggests that heroic should do this or is that something the flatpak app can't do?
CommandMC
CommandMC2y ago
We cannot control which path is picked by the library, someone would have to add support on their end You might even be able to just give Heroic access to XDG_RUNTIME_DIR/discord-ipc-0
extended-salmon
extended-salmonOP2y ago
why doesn't heroic ask for the permission upon install?
CommandMC
CommandMC2y ago
Oh, I just noticed, we already do: https://github.com/flathub/com.heroicgameslauncher.hgl/blob/master/com.heroicgameslauncher.hgl.yml#L36 So symlinking the file ($XDG_RUNTIME_DIR/discord-ipc-0 -> $XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-0) is all you need to do, and we can't do that (since we can't access it)
extended-salmon
extended-salmonOP2y ago
i see, let me try
CommandMC
CommandMC2y ago
Hang on, seems like this is also done by the install script https://github.com/flathub/com.heroicgameslauncher.hgl/blob/93d2c4fa5c37d7f0b8a2ba2fbd8045a51500202d/com.heroicgameslauncher.hgl.yml#L167-L169 Hm, those links that are created don't seem to point to any valid sockets... Wonder why this wasn't an issue before I'll look into it in a few hours
afraid-scarlet
afraid-scarlet2y ago
Added that a while ago according to the doc of discord flathub Maybe the files changed?
extended-salmon
extended-salmonOP2y ago
https://github.com/flathub/xyz.armcord.ArmCord#flatpak-applications armcord (a discord wrapper with arRPC) seems to suggest different steps to take with a different path for the symlink i couldn't make rpc from heroic flatpak work myself tho
GitHub
GitHub - flathub/xyz.armcord.ArmCord
Contribute to flathub/xyz.armcord.ArmCord development by creating an account on GitHub.
CommandMC
CommandMC2y ago
Are those not the exact same steps? Files are still in those places, they're just... not there in the runtime
extended-salmon
extended-salmonOP2y ago
thanks for looking into it, I hope this can be fixed or that there's at least a workaround that can be done (but i think heroic might need a patch since my setup works fine)

Did you find this page helpful?