Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Rich presence #7

Closed
Leeo97one opened this issue May 5, 2018 · 13 comments · Fixed by #12
Closed

Rich presence #7

Leeo97one opened this issue May 5, 2018 · 13 comments · Fixed by #12

Comments

@Leeo97one
Copy link

How can we let this flatpak notify a Discord client about rich presence?

@TingPing
Copy link
Member

TingPing commented May 5, 2018

Probably not possible but I'm not familiar with it, do you have a link to any more information?

@TingPing
Copy link
Member

TingPing commented May 5, 2018

I guess this is better handled here anyway: flathub/com.discordapp.Discord#29

@Amosar
Copy link

Amosar commented Dec 8, 2018

The flatpak version of discord now support RPC https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)
Can you support this on this flatpak please?
You can found a WIP for steam her flathub/com.valvesoftware.Steam#273

@TingPing
Copy link
Member

TingPing commented Dec 8, 2018

Maybe @gasinvein can make a PR.

@gasinvein
Copy link
Member

Done. I don't have a Play Music account, so please test this #12 (comment) build.

@Amosar
Copy link

Amosar commented Dec 9, 2018

Thanks for you work on this support @gasinvein :)
But your patch doesn't work :/
The script seems to not create the simlink into the flatpak container :

amosar@amosar-Fix:/run/user/1000$ flatpak run --command=/bin/bash com.googleplaymusicdesktopplayer.GPMDP/x86_64/stable
bash-4.4$ ls -l $XDG_RUNTIME_DIR/
total 4
drwxr-xr-x 3 amosar amosar 60 10 déc.  00:02 app
srwxrwxr-x 1 amosar amosar  0 10 déc.  00:02 at-spi-bus
srwxrwxr-x 1 amosar amosar  0 10 déc.  00:02 bus
drwxr-xr-x 2 amosar amosar 60  9 déc.  18:36 discord
dr-x------ 2 amosar amosar  0  1 janv.  1970 doc
lrwxrwxrwx 1 amosar amosar 22 10 déc.  00:02 flatpak-info -> ../../../.flatpak-info
drwxr-xr-x 2 amosar amosar 80 10 déc.  00:02 pulse
-rw------- 0 amosar amosar 56 10 déc.  00:02 Xauthority
bash-4.4$ ls -l $XDG_RUNTIME_DIR/discord/
total 0
srwxrwxr-x 1 amosar amosar 0  9 déc.  18:36 ipc-0

If I run your loop manually and then I run gpmdp into the container then the integration work

@gasinvein
Copy link
Member

gasinvein commented Dec 10, 2018

@Amosar

flatpak run --command=/bin/bash com.googleplaymusicdesktopplayer.GPMDP/x86_64/stable

This way the code in the wrapper script wouldn't work, because the wrapper isn't executed at all.
Run the warpper google-play-music-desktop-player directly from sandbox shell, or use desktop launcher.

@Amosar
Copy link

Amosar commented Dec 10, 2018

I have tried but that doesn't work, this is why I have tried to run the loop manually

@gasinvein
Copy link
Member

That's strange. Can you please run bash -x google-play-music-desktop-player (from inside sandbox) and post output here?

@Amosar
Copy link

Amosar commented Dec 10, 2018

I have found something new when I have launch your commande, but thats weird
If I run your command directly the process number is small than 10 and discord refused to use it
But if I kill it with CTRL+C then I run your command again this work.
this one not work
discord

And this one work
discord2

@gasinvein
Copy link
Member

gasinvein commented Dec 11, 2018 via email

@Amosar
Copy link

Amosar commented Dec 11, 2018

Yes it create it because it can communicate with the discord container and bash -x google-play-music-desktop-player execute the loop as expected.

@nanonyme
Copy link

I suggest hunting down where that min PID assumption comes from. It's invalid for Flatpak

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants