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
Discord can't access /proc #115
Comments
I believe this should still work : https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc) |
The Steam Flatpak package does the things mentioned in the wiki page, so does that mean that this should automatically work for (all?) Steam games? It doesn't for me. Is there some extra step I'm missing, either in Steam or Discord or the game itself? |
I believe discord detects running steam games by reading running processes from /proc, which seems to be prohibited by the flatpak. As long as the game itself does not use the discord-rpc interface, discord does not get any information. |
Have you done the symlink the page suggests to do?
Just wanna clarify that this is a flatpak restriction, nothing we can do specifically about this. I'm inclined to close this because I don't think this is something that we can ever fix. RPC is supported and non-RPC games can't work assuming Discord is reading /proc. |
As I say, the Steam Flatpak package does that. |
I just tried an RPC client outside of Flatpak, PreMID and it worked after the symlink for non-flatpak apps. Do you have an application using RPC in Steam that I can try to test? |
Iʼm not sure. I couldnʼt find a list of Discord-supporting native Linux games distributed via Steam. I know that, for example, Among Us on Windows integrates with Discord. However, if you run on Linux with Steamʼs Proton fork of Wine, the differences between Discord on Windows and Linux are going to complicate the situation, so that's not a good test. |
What are you testing for then? Is this about process access (can't fix) or rich presence (doesn't seem broken)? 🤔 |
It turns out that the Steam Flatpak bundles a small example game from the Discord RPC library. It can be launched in the following way while Steam is running: flatpak enter com.valvesoftware.Steam /app/bin/send-presence There seems to be no documentation, but you can read the source to discover the available commands. To answer my own question:
On this settings page, it will say “No game detected”, but this canʼt be trusted. When a game connects via RPC, it will say this even if things are working correctly and a status message is properly shown. |
Oh cool! It works so I guess this issue is only about /proc then. |
Sorry if I don't understand the issue correctly but I was wondering the following two things: (1) com.valvesoftware.Steam.CompatibilityTool.Proton-GE Something like: com.valvesoftware.Steam.Utility.Discord As I almost always have Discord open when I open Steam. This way they share the same internal /proc ipc data, right? (2) Since access to the system /proc is forbidden, couldn't these programs fake each other and duplicate or link the respective internal /proc files? Since both programs are on the same system, wouldn't hard linking the directories work since a program should be able to write to it's own /proc file. Or are these bad ideas? Would that be even more difficult or cause more problems? |
Making Discord a Steam extension is possible however that's definitely not happening, I'm not sure if it's possible to share /proc with a bridge system but I wouldn't want to maintain that personally. |
This is the usual problem I have with discord. It just won't recognize my games. On the snap and native version, it recognizes the game too easily. But for the flatpak version, it doesn't recognize my games, it only recognizes stuff like bash, sandbox, and such. And I have to manually add in the game's names. Please find a way to fix this.
The text was updated successfully, but these errors were encountered: