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

Add MPV and possibly Flatpak talk permissions #74

Open
DEFCON001 opened this issue Aug 6, 2022 · 4 comments
Open

Add MPV and possibly Flatpak talk permissions #74

DEFCON001 opened this issue Aug 6, 2022 · 4 comments

Comments

@DEFCON001
Copy link

DEFCON001 commented Aug 6, 2022

Adding the MPV and Flatpak session talk permissions by default will allow these workarounds for the mpv external player (FreeTubeApp/FreeTube#1735 (comment)) and mpv flatpak player (FreeTubeApp/FreeTube#1735 (comment)) to work without the use of flatpak-overide or Flatseal after 0b495c9. Once the code takes into account that it is installed in a flatpak, this will be required by default for the app to work smoothly. I can understand not implementing the talk bus for the entirety of Flatpak on the system (ie: the workaround for when mpv is installed as a Flatpak), but the MPV talk permission (for when MPV is installed as a binary on the system) only access one program and would seem safe from easily "escaping the sandbox".

org.freedesktop.Flatpak is the dbus bus name for flatpak, but I don't know the bus name for mpv you would need to use for the talks permission, and can't seem to find it online (it might be io.mpv.Mpv as that is what flatpak calls it, but I honestly don't know if flatpak names and dbus bus names are connected at all).

@bbhtt
Copy link
Contributor

bbhtt commented Aug 15, 2023

Flatpak spawn is a huge access and doesn't make sense to me when A) FreeTube can play the videos by itself B) External player is optional and there are too many to support C) Maybe it'd be better to include at least MPV in this flatpak at the cost of increased size/maintenance

The alternative is to wait for a portal solution. I've closed my PR that did the solution OP wanted.

@stdedos
Copy link

stdedos commented May 28, 2024

Is there any way I can use e.g. Flatseal for now to make it work?

I have added the bus via Flatseal to Freetube

image

but it doesn't seem to start the host mpv (FWIW, I don't even see flatpak-spawn, mpv, etc via e.g. htop)

I can appreciate the (maybe theoretical) permissions issue, but I'd like a solution "for now"

@bbhtt
Copy link
Contributor

bbhtt commented May 28, 2024

Add org.freedesktop.Flatpak as an override in the talk section. Then in Freetube edit the command.

Flatpaked MPV FreeTubeApp/FreeTube#1735 (comment)

Host MPV FreeTubeApp/FreeTube#1735 (comment)

@stdedos
Copy link

stdedos commented May 28, 2024

Okay, so I guess I am doing it right. I have this FreeTubeApp/FreeTube#5188 issue now. It seems to me that maybe my mpv is out-of-date (and subsequently its youtube-dl) - I'm trying to update it now.

So, yes - the instructions still work. What doesn't work is "external playback of a playlist" (FreeTubeApp/FreeTube#5188), which is a bug (maybe known already). Thank you @bbhtt

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

Successfully merging a pull request may close this issue.

3 participants