Open hideki2k02 opened 5 months ago
nobody runs two Discord clients
this is a bad assumption to make as people can run multiple clients for many reasons, including trying different versions of the app, development, alt accounts, etc. and i personally do this for vencord development
this workaround is a variation on armcord's workaround, so it's interesting that it doesn't work when it seemingly works for them (or at the very least no one has flagged an issue with it).
feel free to open a PR to make the doc change, but keep the above two comments into account doing so
this is a bad assumption to make as people can run multiple clients for many reasons, including trying different versions of the app, development, alt accounts, etc. and i personally do this for vencord development
Yeah it was bad now that i think about it, but still you'll probably only be using one client for RPC. Otherwise you can use the wrapper mentioned here (Adapt it to your client/needs).
no one has flagged an issue with it). I've used ArmCord in the past and arRPC never worked, i've tried looking around but the answer is always "arRPC is weird and people dont know how it works"
I'll leave the Issue Open/wont make a PR for now so more people can test my solution and the "more experienced" can try to improve it.
In my case I wrote this simple script and created a .desktop file to run it for some reason if I symlink to xdg-run/discord-ipc-0 and give an app access to it when I try to start the app for the second time it won't start because bwrap will say the file is already symlinked (makes sense) but for some weird reason when I hard-link the file bwrap just ignore it and works normally, it would be fine if I just had to hard-link the file but if I do that vesktop will say that the file is busy, so I have to delete it and wait til vesktop start talking to the file
#!/usr/bin/bash
# Delete hard link
rm $XDG_RUNTIME_DIR/discord-ipc-0 &
# Open vesktop
flatpak run dev.vencord.Vesktop &
# Recreate hard link
sleep 10
ln -f $XDG_RUNTIME_DIR/.flatpak/dev.vencord.Vesktop/xdg-run/discord-ipc-0 $XDG_RUNTIME_DIR/discord-ipc-0
Can confirm I'm seeing the same issues in this thread using the Flatpak version. If I use discord-ipc-*
, then the rich presence with another Flatpak app doesn't work. If I use discord-ipc-0
, then it works the first time, but I cannot start that app again with the same bwrap error mentioned by Wa1t5. Maybe this is a bug in Flatpak?
To be clear my steps are:
bwrap: Can't make symlink at /run/user/1000/discord-ipc-0: File exists
Seems like Flatpak has a fix for this recently merged to main. flatpak/flatpak@a1bb185
I can't seem to get RPC working despite the flatpak fixes; I'm on SteamOS I used flatseal but couldn't get it functioning
I can't seem to get RPC working despite the flatpak fixes; I'm on SteamOS I used flatseal but couldn't get it functioning
I don't think the fixes have made it to a stable release yet.
The bubblewrap changes should be available in Flatpak 1.15.7 and newer, if your distro has that already.
However, I could not get Rich Presence to work, not even on the first run. The Steam Flatpak already seems to be set up to work with the Discord Flatpak, but (a) the Discord Flatpak sets up the sockets a little bit different from Vesktop, so the Discord documentation does not directly apply to Vesktop, and (b) the Steam Flatpak is not set up to access the Vesktop sockets.
The bubblewrap changes should be available in Flatpak 1.15.7 and newer, if your distro has that already.
However, I could not get Rich Presence to work, not even on the first run. The Steam Flatpak already seems to be set up to work with the Discord Flatpak, but (a) the Discord Flatpak sets up the sockets a little bit different from Vesktop, so the Discord documentation does not directly apply to Vesktop, and (b) the Steam Flatpak is not set up to access the Vesktop sockets.
The last time I tested vesktop + steam my fix worked fine, I know it's a bit inconvenient to have to setup a .desktop file but it works most of the times and save the headache of having to configure it every time you launch vesktop
The current guide asks for the permission to access
xdg-run/discord-ipc-*
however that is currently not working and should be replaced byxdg-run/discord-ipc-0
. Below are also a few of my findings:Native Version:
discord-ipc-0
so no need to do it manually)--filesystem=xdg-run/discord-ipc-0
(discord-ipc-* does not work/nobody runs two Discord clients)Flatpak Version:
discord-ipc-0
to/run/user/1000/.flatpak/dev.vencord.Vesktop/xdg-run/discord-ipc-0
discord-ipc-0
and--filesystem=xdg-run/discord-ipc-0