Update
There is now an unofficial PPA for VLC 3 on Ubuntu 16.04
Instructions to install:
1 2 3 | sudo add-apt-repository ppa:jonathonf/ffmpeg-3 sudo add-apt-repository ppa:jonathonf/vlc-3 sudo apt update && sudo apt install vlc |
Overview
While it is possible to install VLC from the Canonical repositories or even a PPA, the latest version available through those channels for Ubuntu 16.04 (and derivatives) is 2.2. To get the absolutely latest version (3.0.1 as of this writing) it is necessary to use a Snap or Flatpack install.
These instructions will walk you through the process of installing Flatpak, the VLC app, and creation of a script that can be used as the default launcher for video files from within a file manager.
Flatpak Installation
The first thing we need to do is install the flatpak
package and add the flathub
package repository.
1 2 3 | sudo add-apt-repository ppa:alexlarsson/flatpak sudo apt update && sudo apt install flatpak sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo |
VLC Installation
We can now install the VLC
package.
1 | sudo flatpak --user install flathub org.videolan.VLC |
Default Launcher
To be able to use the newly installed package as the default application from within a file manager, we first need to create a script.
The following creates a ~/bin/vlc.sh
script
1 2 3 4 5 6 7 8 | VLC_SCRIPT=~/bin/vlc.sh cat > $VLC_SCRIPT <<- EndOfFile #!/bin/bash flatpak run org.videolan.VLC "$1" EndOfFile chmod +x $VLC_SCRIPT |
Next, open a file manager, right click on a video file and select the script as the associated application while marking it as the default action.
Uninstall
To uninstall the VLC
package
1 | sudo flatpak uninstall --app org.videolan.VLC |
flathub
repository1 2 3 4 5 6 7 8 | # Remove dependencies sudo flatpak uninstall --runtime org.freedesktop.Platform sudo flatpak uninstall --runtime org.freedesktop.Platform.ffmpeg sudo flatpak uninstall --runtime org.freedesktop.Platform.GL.nvidia-340-106 sudo flatpak uninstall --runtime org.freedesktop.Platform.Locale # Remove repo sudo flatpak remote-delete flathub |
flatpak
itself1 2 3 | sudo apt remove flatpak sudo add-apt-repository --remove ppa:alexlarsson/flatpak sudo apt update |