Skip to content
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/Vesktop Flatpak rich pressence with Tidal-hifi flatpak. #496

Open
corngoblin opened this issue Nov 2, 2024 · 4 comments
Open

Discord/Vesktop Flatpak rich pressence with Tidal-hifi flatpak. #496

corngoblin opened this issue Nov 2, 2024 · 4 comments

Comments

@corngoblin
Copy link

corngoblin commented Nov 2, 2024

Is there something I can set within flatsteel to allow the Tidal-hifi flatpak to display what's playing in a discord/vesktop flatpak?

I know there is a weird fix posted here #314, but there has to be a cleaner way to do this no?

I've been monkeying with settings in flatsteel all last night trying to get it to work. Lol

The appimage works if this is ran.

ln -sf $XDG_RUNTIME_DIR/{.flatpak/dev.vencord.Vesktop/xdg-run,}/discord-ipc-0     

Right now, this is what it shows without anything done except the above command.

 flatpak run com.mastermindzh.tidal-hifi 
Wayland socket is available, running natively on Wayland.
To disable, remove the --socket=wayland permission.
[2:1101/213302.505114:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:1101/213302.935866:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:1101/213302.935910:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
LaunchProcess: failed to execvp:
xdg-settings
Failed to connect to Discord, retrying in 10 seconds... (Attempt 1/5) 
[2:1101/213306.995104:ERROR:bus.cc(571)] Failed to get the ownership of org.mpris.MediaPlayer2.chromium.instance2: org.freedesktop.DBus.Error.ServiceUnknown
Started preventing app suspension with id: 0 
Failed to connect to Discord, retrying in 10 seconds... (Attempt 2/5) 
Failed to connect to Discord, retrying in 10 seconds... (Attempt 1/5) 
Failed to connect to Discord, retrying in 10 seconds... (Attempt 3/5) 
Failed to connect to Discord, retrying in 10 seconds... (Attempt 2/5) 
Released inhibitor with id: 0 

Thank you for your time.

@Mar0xy
Copy link
Contributor

Mar0xy commented Nov 2, 2024

Please test this flatpak to see if it works on vesktop (and maybe also still works on discord) as I myself don't really use flatpaks

flathub/com.mastermindzh.tidal-hifi#36 (comment)

@corngoblin
Copy link
Author

corngoblin commented Nov 2, 2024

Same issue.

Thank you for taking the time to try and solve it.

@cebxan
Copy link

cebxan commented Nov 8, 2024

The problem is that the dependency used by tidal-hifi (xhayper/discord-rpc) only looks for discord-ipc-0 in the folder $XDG_RUNTIME_DIR/app/com.discordapp.Discord/ when it detects it's being used inside a Flatpak.

https://github.com/xhayper/discord-rpc/blob/70f0c0480502c79c851162bf64693a14dcf061d4/src/transport/IPC.ts#L56

We could file a request to add a check for $XDG_RUNTIME_DIR/discord-ipc-0 and we can symlink the Vesktop file or any other client's to $XDG_RUNTIME_DIR/discord-ipc-0. Sadly that still requires manual intervention but I feel the maintainer could reject the request if we ask for a specific client folder. What do you think?

@ungive
Copy link

ungive commented Nov 27, 2024

Not related to solving the problem with tidal-hifi, but might be interesting for anyone following this issue.

You can have a Discord status for tidal-hifi in Vesktop (Flathub) on Linux with my app Music Presence:
https://musicpresence.app / https://github.com/ungive/discord-music-presence

Right now there is no stable release for Linux (I'm in the process of implementing that), but we've started testing Music Presence for Linux today and I came across this issue too (sandboxed Discord via snap/flathub not working). Fixed it in my own fork of discord/discord-rpc (C++ version):

If you want to test this right now, feel free to join the Discord server: https://discord.gg/musicpresence. There's a pinned message in the #linux channel with instructions how to run it.

grafik
grafik

$ tree -rf $XDG_RUNTIME_DIR/.* | grep discord-ipc | grep Vesktop
│   │   ├── /run/user/1000/.flatpak/dev.vencord.Vesktop/xdg-run/discord-ipc-0

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

No branches or pull requests

4 participants