Playing digitally restricted DVDs on GNU/Linux

Most commercially produced movies released on DVD are encrypted. The original purpose of this was to reduce piracy. Today however it is mostly an inconvenience for consumers. In order to play these discs you need to install a library that enables decryption.

The entertainment industry has attacked free software developers and distributors in the past. There have been a number of well known cases. As a result these libraries are not included in most distributions. If it is legal (consult a lawyer if needed) where you are this is the procedure to install the required software on Ubuntu 18.04 and Linux Mint 19:

(step 0-1 are needed on Ubuntu 18.04 only)

0. Search for and open "software updater" from the activities/dash search menu in the top left corner
1. Click on settings and under the Ubuntu Software tab make sure Community-maintained free and open-source software (universe) and Software restricted by copyright or legal issues (multiverse) are checked and hit close (if prompted to to reload do so)

2. Open up a terminal
3. Enter the following commands and hit enter (enter your password and accept the installation when prompted)

sudo apt install libdvdnav4 libdvdread4 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg
sudo apt install ubuntu-restricted-extras
sudp apt install vlc

* During the installation you may be prompted to answer questions- the answers to the questions are to accept the defaults

At this point you can probably stick in a commercial video DVD and select to play it with the VLC video player. Open VLC and go to Media > Open Disc and hit Play to start playing a DVD video disc.

(the rest has not been tested on 18.04/Linux Mint 19) If this is a new computer you may need to set the region code as well. Region codes allow the entertainment industry to charge different prices in different regions of the world. This prevents you from playing a disc sold in another region. Until this code is set you can't play DVDs from any region.

Enter the following code:

sudo regionset

There are a limited number of times you can change the region code. It will eventually be locked permanently. Enter your password and answer the questions when prompted.

Enter the region below where you live:

REGION 1 -- USA, Canada
REGION 2 -- Japan, [censored], South Africa, Middle East, Greenland
REGION 3 -- S.Korea, Taiwan, Hong Kong, Parts of South East Asia
REGION 4 -- Australia, New Zealand, Latin America (including Mexico)
REGION 5 -- Eastern Europe, Russia, India, Africa
REGION 6 -- China
REGION 7 -- Reserved for Unspecified Special Use
REGION 8 -- Reserved for Cruise Ships, Airlines, etc...
REGION 0 or REGION ALL -- Discs are uncoded and can be played Worldwide, however, PAL discs must be played in a PAL-compatible unit and NTSC discs must be played in an NTSC-compatible unit.

3. Start VLC; other DVD players may work as well although some may require additional steps