-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flatpak'ed Discord Rich Presence support #273
Conversation
NOTE: This comment was posted by the test instance of buildbot Started test build 154 |
NOTE: This comment was posted by the test instance of buildbot Build 154 successful
|
I'm a bit confused architecturally how this would work |
This removes the need to start Discord before Steam
NOTE: This comment was posted by the test instance of buildbot Started test build 159 |
NOTE: This comment was posted by the test instance of buildbot Build 159 successful
|
@nanonyme we start |
Are you essentially trying to make two sandboxed apps talk to each other? |
Yes.
|
I think this is rather questionable approach. Should instead be some portal proxying communication between the two apps. |
Definitely a portal would be better, but I doubt that either flatpak
team would do that just for Discord, or Discord's developers would care
about flatpak.
For now, I think it's better than nothing.
|
NOTE: This comment was posted by the test instance of buildbot Started test build 958 |
NOTE: This comment was posted by the test instance of buildbot Build 958 successful
|
Have you now done testing on this? |
I still don't know which (if any) of my games on Steam supports Discord RP, so I didn't actually test this with games. Yet the send-presence sample client seems to work fine. |
Is there any point to add the support if no games support it? Do some games support it? |
Some games with Discord-RP support are mentioned by Discord, but I own none of them. |
https://www.libretro.com/index.php/upcoming-retroarch-1-7-4-details-on-discord-integration/ RetroArch supports Discord RP. |
What if we instead just patch this line https://github.com/discordapp/discord-rpc/blob/master/src/connection_unix.cpp#L68? |
@nanonyme RP clients aren't obliged to use this library, they can implement communication with Discord themselves. |
Started test build 568 |
Build 568 successful
|
@gasinvein if you've tested Steam still runs with this, I'm fine with merging. My only test machine is currently borken. |
Yes, Steam is expected to work as usual. |
Sorry for the slight OT, but do you think a similar work should be done for Mumble in order to fix #997?
On the plus side: mumble it's a open source project, so if we wanted to experiment with things we could try to |
It looks like Mumble is doing the same bad thing Discord does - puts its socket directly under |
is there any convention for the path to use inside |
Just about any sub-directory works. Using app id is more or less guaranteed unique path. |
I'm preparing a MR for Mumble. I notice that if i delete the subdir in
❯ ls /run/user/1000/ -lah
drwxr-xr-x 2 carlo carlo 80 14 nov 16.33 mumble ❯ ls /run/user/1000/mumble -lah
totale 0
drwxr-xr-x 2 carlo carlo 80 14 nov 16.33 .
drwx------ 21 carlo carlo 580 14 nov 16.33 ..
srwxrwxrwx 1 carlo carlo 0 14 nov 16.33 MumbleOverlayPipe
srwxr-xr-x 1 carlo carlo 0 14 nov 16.33 MumbleSocket
[📦 com.valvesoftware.Steam com.valvesoftware.Steam]$ ls $XDG_RUNTIME_DIR -lah
drwxr-xr-x 0 carlo carlo 40 14 nov 16.32 mumble What am I missing here? Should the subdir never be deleted during flatpak's runtime? I read somewhere that XDG_RUNTIME_DIR can be garbage collected if not touched in 6 hours. Does it happen to directories as well? |
You mean delete the subdir before running Steam flatpak, or while it's already running? For the former, the solution is to add |
Yeah, I meant while Steam flatpak is running |
Then it's kinda expected behaviour. |
oh ok! So we have to assume either that:
|
btw, instead of bumping this old PR, I opened mine for Mumble: #1008 |
RP clients talks to Discord through socket
$XDG_RUNTIME_DIR/discord-ipc-0
, however, we can't export it from flatpak's sandbox. Instead, a "proxied" socket$XDG_RUNTIME_DIR/discord/ipc-0
is exported.On the app's side, we have to add a symlink to make Discord RP available to games under the path they expect.
See flathub/com.discordapp.Discord#29 for details.
Testing is desirable.