How-To: Watch DVDs on Fedora Linux

The goal of this post is to help you be able to watch DVDs on Fedora Linux. If you are using a different Linux distribution, this method should be able to be applied by altering it to your respective distro.

CONTENTS

  1. BACKGROUND
  2. DIRECTIONS
    1. Install rpmfusion Repository
    2. Install (all the) Codecs
    3. Install DVD Tools/Libraries and VLC Media Player
    4. Install libdvdcss
  3. Wrapping Up
    1. How To Update libdvdcss in the Future

BACKGROUND

I am slowly in the process of getting ready to replace my current “home media PC” (a.k.a my laptop) with a new computer using Fedora. I used my current Fedora desktop to try watching DVDs, and I found that without adding libdvdcss, I was only able to watch some DVDs but not all DVDs (ex: I could not watch Redbox movies). After a bit of digging and key pounding, I can gladly say that I have been able to watch every DVDI have tried so far, including ones that did not work previous to installing libdvdcss.

This specific guide was written using a system running Fedora 21, but this should work for at least Fedora 20 and Fedora 22.

DIRECTIONS

Note: The ‘-y’ option in the dnf command tells dnf to not prompt for confirmation for the installation. If you would like to see exactly what is being installed and be prompted for confirmation before the install begins, then remove the ‘-y’ option from the commands.

Note: All dnf commands can be replaced by using yum instead of dnf. The first command would have to be changed to ‘yum -y localinstall’, but otherwise you can just do a drop-in replacement of yum wherever dnf is used, if you prefer to use yum.

Install rpmfusion Repository

This repository contains extra packages that are not included in the default Fedora repositories, including packages, such as VLC media player, that we will be installing later in this process.

dnf -y install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Install (all the) Codecs

It is possible not every one of these codecs is needed, but I had installed all of them to ensure I didn’t miss anything that would get DVD playing working correctly.

dnf -y install gstreamer-ffmpeg gstreamer-plugins-base gstreamer-plugins-good gstreamer-plugins-good-extras gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-devel gstreamer-plugins-base-devel gstreamer1-libav gstreamer1-plugins-bad-freeworld gstreamer1-plugins-ugly

Install DVD Tools/Libraries and VLC Media Player

Note: You don’t have to install VLC media player if you have another media player that you prefer, however VLC is a great media player with support for a ton of video and audio formats.

dnf -y install libdvdread libdvdnav lsdvd vlc

Install libdvdcss

libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.

libdvdcss basic description from VideoLAN website

More information on libdvdcss and what it does can be found at the following two links:

  1. If not already installed, install git.
    sudo dnf -y install git
  2. Create a directory to clone (download) the libdvdcss Git repository. This can be created most anywhere of your choosing, just make sure to the path in the commands below with the path you chose.
    mkdir ~/bin
  3. Clone (download) the libdvdcss Git repository
    cd ~/bin
    git clone https://code.videolan.org/videolan/libdvdcss.git
  4. Autoreconf, configure, make, and install the libdvdcss library
    cd libdvdcss
    autoreconf -i
    ./configure --prefix=/usr
    make
    sudo make install

Wrapping Up

Watch DVDs on Fedora Linux - Watching the DVD of The Incredibles

Watching the Incredibles with VLC media player on Fedora 21

Hopefully at this point you can watch your DVDs using Fedora. Make sure to keep the libdvdcss library updated; directions on how to do so are listed below.

If you have any questions or comments, then feel free to leave a comment at the bottom of this page.

How To Update libdvdcss in the Future

New versions of libdvdcss will be released and like any piece of software it is good to keep it up to date. Since we did not install it using the package manager (it was not an option at the time of writing), we will need to do a few manual steps to update it.

cd ~/bin/libdvdcss/
make clean
git pull
autoreconf -i
./configure --prefix=/usr
make
sudo make install

snmpenum.pl Not Working on Kali Linux

Recently I was asked by someone to help figure out why snmpenum.pl was not working on Kali Linux.  Though the solution was simple, it took more time than it should have to get there.

Note: snmpenum.pl can be downloaded directly using the following link – http://dl.packetstormsecurity.net/UNIX/scanners/snmpenum.zip

snmpenum.pl is a tool to enumerate SNMP information on any host with an open SNMP port (usually UDP 161).  For it to work, you need to specify, in order, the IP of the host you want to enumerate, the community string to use, and the name or full path to a tab delimited file containing the following information:

<Type of host, ex: Cisco>   <Name of Enumeration Item>   <MIB.in.dotted.decimal.notation>

Here are the contents of the example file for Linux hosts that comes with snmpenum.pl:

Linux   RUNNING PROCESSES       1.3.6.1.2.1.25.4.2.1.2
Linux   SYSTEM INFO             1.3.6.1.2.1.1.1
Linux   HOSTNAME                1.3.6.1.2.1.1.5
Linux   UPTIME                  1.3.6.1.2.1.1.3
Linux   MOUNTPOINTS             1.3.6.1.2.1.25.2.3.1.3
Linux   RUNNING SOFTWARE PATHS  1.3.6.1.2.1.25.4.2.1.4
Linux   LISTENING UDP PORTS     1.3.6.1.2.1.7.5.1.2.0.0.0.0
Linux   LISTENING TCP PORTS     1.3.6.1.2.1.6.13.1.3.0.0.0.0

Now the specific error we were getting was as follows:

root@kali:~/tmp# perl snmpenum.pl 192.168.1.1 public linux.txt 


----------------------------------------
    UPTIME
----------------------------------------

" is expected in dotted decimal notation..1.2.1.1.3

For some reason or another it was not liking the MIB, stating it was not in dotted decimal notation.  After (too much) troubleshooting and investigating both the snmpenum.pl code as well as the linux.txt file, I realized that the linux.txt file was in Windows/DOS format, containing CRLF (carriage return, line feed) line terminators.

root@kali:~/tmp# file linux.txt 
linux.txt: ASCII text, with CRLF line terminators

CRLF line termination characters cause issues when used on Linux (http://en.wikipedia.org/wiki/Newline).  Linux only uses LF to signify a new line, so it treats the CR character as an actual character in the file, and in this case, causes a character to be added to the end of the MIB, in turn making the MIB not in dotted decimal notation.

The quick fix was to use the dos2unix tool on the file to remove the Windows line termination characters and replace them with *nix line termination characters.  After this, we were able to run snmpenum.pl without any issues.

# If the tool is not already installed:
apt-get update && apt-get install dos2unix

# Then run
root@kali:~/tmp# dos2unix linux.txt 
dos2unix: converting file linux.txt to Unix format ...

root@kali:~/tmp# file linux.txt 
linux.txt: ASCII text