-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Can't install on snap #33
Comments
Sorry, don't know anything about snaps. Also, the build instructions build the plugin for your system's VLC, if the version of the VLC from your package repository differs from the one in the snap, e.g. VLC 2.2 vs VLC 3.0, then the plugin won't work. You can't use a plugin built for VLC 2.2 in VLC 3.0 (same with any other combination of 2.1, 2.2 and 3.0). |
It sounds like snaps can't be modified, so you can't add the plugin file in there. The next best thing would be to copy over all the VLC plugins from the snap somewhere into your home directory and then run vlc with Can you run the |
Here is the output https://github.com/giuseppe-dandrea/tree-snap-vlc-output/blob/master/output.txt |
Alright, it does include the SDK, so it's possible to build the plugin against it, it just won't be pretty. Can you tell where is the snap located at? I see |
The path of the snap directory is simply /snap, in the root, in this folder there is the list of all snap applications, so the full path is /snap/vlc and you can see from the output that in this folder there are the folders for the versions (just the 158 in that case) and the symlink to the current version (current). Thanks a lot for the help |
Tried to ask in the snap forum too for more info, but seems that there isn't a way without recompiling the snap... https://forum.snapcraft.io/t/call-for-testing-vlc-3-0-0-rc1/3202/44 |
Right, it's a security feature. Anyway, I'm convinced that we can make it work. Try this to build the plugin binary against the VLC SDK from the snap: sudo apt-get install build-essential pkg-config git
cd ~
git clone https://github.com/nurupo/vlc-pause-click-plugin
cd vlc-pause-click-plugin
git checkout 1.0.0
cp -a /snap/vlc/current/usr/lib/pkgconfig .
sed -i "s|^prefix=.*|prefix=/snap/vlc/current/usr|g" pkgconfig/*.pc
export PKG_CONFIG_PATH="${PWD}/pkgconfig"
make Now place the plugin whenever you want on your system, for this example I will just use mkdir -p ~/.config/vlc/plugins
cp libpause_click_plugin.so ~/.config/vlc/plugins Now start VLC, telling it to check VLC_PLUGIN_PATH=/home/giuseppe-dandrea/.config/vlc/plugins /snap/vlc/current/bin/vlc changing the username in the path yours, but there is a little complication here, as it seems that you don't start the snap VLC by directly running |
All the commands worked but the last, wich said that /snap/vlc/current/bin/vlc doesn't exist. In fact in that folder there are only two files, but if I try to run them these are the output:
https://github.com/giuseppe-dandrea/tree-snap-vlc-output here i pushed the content of the folder. I usually start vlc by typing vlc in the terminal or I have a script that exec vlc with the media argument, anyway don't have a desktop icon or start it by double-click on the media. |
Does typing |
@nurupo the snap vlc, wich is the only version installed |
Oh, then just do VLC_PLUGIN_PATH=/home/giuseppe-dandrea/.config/vlc/plugins vlc assuming you have the |
No it doesn't work, the command starts vlc but in the preferences there aren't new checkboxes, tried with |
Try it a bit differently then export VLC_PLUGIN_PATH=/home/giuseppe-dandrea/.config/vlc/plugins
vlc |
If that doesn't work there are a few possibilities here
You could look into 1 on your own, check that the path, file permissions, etc. are correct there. I have no idea how to check 2. For 3, repeat the build process from scratch and pastebin output of the sudo apt-get install build-essential pkg-config git
cd ~
git clone https://github.com/nurupo/vlc-pause-click-plugin
cd vlc-pause-click-plugin
git checkout 1.0.0
cp -a /snap/vlc/current/usr/lib/pkgconfig .
sed -i "s|^prefix=.*|prefix=/snap/vlc/current/usr|g" pkgconfig/*.pc
export PKG_CONFIG_PATH="${PWD}/pkgconfig"
make
sudo apt-get install build-essential pkg-config git
cd ~
git clone https://github.com/nurupo/vlc-pause-click-plugin
cd vlc-pause-click-plugin
git checkout 1.0.0
cp -a /snap/vlc/current/usr/lib/pkgconfig .
sed -i "s|^prefix=.*|prefix=/snap/vlc/current/usr|g" pkgconfig/*.pc
export PKG_CONFIG_PATH="${PWD}/pkgconfig"
make
ldd libpause_click_plugin.so |
Ok then,
|
Can you run: VLC_PLUGIN_PATH=/home/giuseppe-dandrea/.config/vlc/plugins vlc --verbose 2 (replace then close VLC and and pastebin the output? |
Ok this helped, it show that vlc is exploring the folder with the plugin (ps. tried to copy the plugin also in a folder called video_filters in the plugin folder), but tried with or without the plugin file and it loads 508 modules. |
So, since the number of plugins doesn't change, then VLC simply doesn't/can't load it. Can you provide output of Something like ldd /snap/vlc/current/usr/lib/vlc/plugins/video_filter/libpuzzle_plugin.so Not sure if that's the correct path to the plugin though, fix it if it's not. |
Actually, do Also, what is your distribution release version? My current guess is that VLC is not loading the plugin due to libc incompatibilities or due to some missing shared library dependencies (i.e. the |
I'm using Deepin 15.5 based on Debian with i3wm Here is the output
|
Alright, it appears like the snap VLC is built on Ubuntu Xenial using gcc 5.4.0. We build the plugin using you system's gcc and linking it against your system's libc version, which are newer than the ones in Ubuntu Xenial. Meaning the the plugin might not be binary compatible with what VLC expects when it loads a plugin. This is just an educated guess though, I'm not 100% sure. The plugin is more likely to work if we build it on Ubuntu Xenial. How willing are you to install Docker on your system so that we could try building the plugin using the Ubuntu Xenial container to see if it makes VLC load the plugin? I can guide you through the entire thing, it's actually easy, pretty much the build instructions you have used to build the plugin plus a couple of docker commands. |
Ok no problem, but never used Docker before, let me know how to do. |
Well, first install it. Not sure if your distribution packages it, but I'm using Debian and it doesn't, so I have to add Docker's package repository to get it https://docs.docker.com/install/linux/docker-ce/debian/. Deepin 15.5 looks to be based on Debian Stretch, so installing Docker sums up to sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo echo "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install docker-ce To build the plugin in a Ubuntu Xenial container do mkdir result
# This will create a temporary ubuntu 16.04 container with your system's $PWD/result
# being mounted in container's /result and your system's /snap in container's /snap
# and will start bash inside of the container
sudo docker run --rm -it -v $PWD/result:/result -v /snap:/snap ubuntu:16.04 /bin/bash
# Now you are in a bash session inside the container, which you can see by the changed
# command prompt, which would be something like root@11212a8998fc, so whatever
# you do here won't affect your system
apt-get update
# Now we follow the instructions on building the plugin
apt-get install build-essential pkg-config git
# Make sure the GCC version is 5.4.0
gcc --version
cd /result
git clone https://github.com/nurupo/vlc-pause-click-plugin
cd vlc-pause-click-plugin
git checkout 1.0.0
cp -a /snap/vlc/current/usr/lib/pkgconfig .
sed -i "s|^prefix=.*|prefix=/snap/vlc/current/usr|g" pkgconfig/*.pc
export PKG_CONFIG_PATH="${PWD}/pkgconfig"
make
# Now that we have built the plugin, let's exit the container, which will also destroy it
logout
# Free disk space by deleting the downloaded Ubuntu 16.04 base image
sudo docker rmi ubuntu:16.04
# You should have the plugin in result/vlc-pause-click-plugin directory
# Change the ownership to your user, as it is owned by root because we
# were running as root inside the container
sudo chown giuseppe:giuseppe -R result Now try making VLC use the plugin you got in |
Followed all the steps, no error message, gcc version 5.4.0... Only 508 plugins and no new checkboxes in the preferences.. I think that there's no way to install new plugins in snap vlc without recompile it. Thanks a lot for the help, if you have new ideas I'm happy to try, otherwise I could close the issue. |
Do you keep the plugin name the same, i.e. |
Yes the name is the same
|
What does LD_BIND_NOW=1 VLC_PLUGIN_PATH=/home/giuseppe/.config/vlc/plugins vlc --verbose 2 output? |
Was hoping to see this message pop up but it didn't. Yeah, it's hard to say why it's not working. You can close the issue now. Don't forget to uninstall Docker, it always runs in the background, which you probably don't want if you are not going to use it: sudo service docker stop
sudo apt-get purge docker-ce
sudo sed -i '/docker/d' /etc/apt/sources.list
sudo apt-key del 0EBFCD88 should do it. |
Ok, thanks again for the help. |
Is there a way to install the plugin if I installed vlc 3 through snap? I'm using a debian-based distro of linux but the debian instruction doesn't work, maybe because snap installs the applications in a read-only partition in the root directory. Tried to copy the .so file in /snap/vlc/usr/lib etc.. but can't write in the directory. Is there another way to install the plugin or to copy the file in that directory? (Tried to change the permissions but without success)
The text was updated successfully, but these errors were encountered: