Install Latest VLC in Ubuntu 16.04

Update

There is now an unofficial PPA for VLC 3 on Ubuntu 16.04

Instructions to install:

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.

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.

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

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

sudo flatpak uninstall --app org.videolan.VLC

To remove the flathub repository

# 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

To uninstall flatpak itself

sudo apt remove flatpak
sudo add-apt-repository --remove ppa:alexlarsson/flatpak
sudo apt update

Leave a Reply