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

Unable to play: install VLC #3

Open
Elinvention opened this issue Aug 12, 2018 · 12 comments
Open

Unable to play: install VLC #3

Elinvention opened this issue Aug 12, 2018 · 12 comments

Comments

@Elinvention
Copy link

I think the sandbox prevents the program from executing /usr/bin/vlc. If it's possible, how can I grant that permission?

@TingPing
Copy link
Member

TingPing commented Aug 12, 2018

Is it configurable? You can do flatpak run --talk-name=org.freedesktop.Flatpak io.webtorrent.WebTorrent and then configure it to run flatpak-spawn --host vlc

(if that works you can make it permanent with flatpak override --user --talk-name=org.freedesktop.Flatpak io.webtorrent.WebTorrent)

@Elinvention
Copy link
Author

Sorry, where can I find flatpak-spawn? I am using Debian testing.

@TingPing
Copy link
Member

You don't need to find it anywhere, its what you configure inside the application to run.

@bilelmoussaoui
Copy link
Member

The application lets you play videos that use codecs that are not supported by default within WebTorrent using VLC. You can select another executable using an open file dialog.
I think the best way to handle this is to patch the application to use MPV instead of VLC and add MPV to the manifest if it doesn't require a lot of dependencies. Otherwise, the application is not that useful to stream torrents which is one of the best features it has...

@TingPing
Copy link
Member

add MPV to the manifest if it doesn't require a lot of dependencies.

https://github.com/flathub/io.github.GnomeMpv/blob/master/io.github.GnomeMpv.json#L49-L158

@bilelmoussaoui
Copy link
Member

It seems that we can't easily patch the app to use MPV instead of VLC, instead of building the whole MPV within this one, reported upstream so they open files using xdg-open to fix this issue for us.
webtorrent/webtorrent-desktop#1533

I suppose this can be closed as an upstream issue.

@Zorrototo
Copy link

is there a way to be able to select VLC from the file explorer which opens when you want to select the player to use? I don't really understand, what is the problem actually? from my point of view I think it is missing permissions to access the VLC executable. I'm new to Flatpak so I would take any guidance to make the appropriate changes on my side.

@TingPing
Copy link
Member

@Zorrototo Flatpaks are sandboxes, they cannot see or execute anything on the host directly.

@Zorrototo
Copy link

Yep that's what I figured out after posting, that is how flatpacks work so I guess maybe a workaround could be to implement VLC with WebTorrent in the same flatpak, but that seems like complicated.
I found this to be helpful in understanding the permission http://docs.flatpak.org/en/latest/sandbox-permissions.html

I was using this flatpack version of WebTorrent because it is currently broken on Arch based distros recently and this version here worked instantly but with these issues.

@Aex12
Copy link

Aex12 commented Oct 6, 2021

Is it configurable? You can do flatpak run --talk-name=org.freedesktop.Flatpak io.webtorrent.WebTorrent and then configure it to run flatpak-spawn --host vlc

(if that works you can make it permanent with flatpak override --user --talk-name=org.freedesktop.Flatpak io.webtorrent.WebTorrent)

This is the correct answer.

The webtorrent client doesnt have an option to use a custom command for the external player, instead it forces you to select a file, but you can just create a sh file and select it. Just be sure it has +x permission, and it's on the Downloads folder, so the sandbox allow it to access.

echo -e '#!/bin/sh\n\nflatpak-spawn --host vlc $@' > ~/Downloads/spawn-vlc.sh
chmod +x ~/Downloads/spawn-vlc.sh
flatpak override --user --talk-name=org.freedesktop.Flatpak io.webtorrent.WebTorrent

Then run WebTorrent, go to Edit > Preferences > Playback > External player. Click on "CHANGE" and select the file ~/Downloads/spawn-vlc.sh

It will work after that.

@S7venLights
Copy link

How would one use flatseal to allow Webtorrent access to specific file paths of video players, using the 'filesystem' permissions?
Would that even help?
Cos that .sh method is a bit of a hack that goes over my head...

@pchmykh
Copy link

pchmykh commented Feb 23, 2024

What if VLC is also installed as Flatpak?

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.

7 participants