Now with Comments

Want to say something?

Read more...
Back
Enable DVD Playback in Ubuntu in ONE Command PDF Print E-mail
User Rating: / 31
PoorBest 
Written by Anthony Hildoer   
Thursday, 17 July 2008 22:23

It took me some time to figure out the surefire way to get DVD playback working in Ubuntu. I have seen MANY tutorials and forums all giving clues to the solution, but noone seems to post a complete step by step solution. This solution works for me every time. I use it to configure 4 different systems with completely different components. Simply run this script as root, reboot*, and enjoy the show with the totem command, or Movie Player in the Sound & Video submenu of the programs menu.

* If you don't reboot, it probably will not work. I have not bothered figuring out what service needs to restart to make things play nice. Maybe someone can tell me, and I will add an automatic service restart to the script.

 

Download Script or copy and paste the following code into a file:

#!/bin/bash
 
# This is a single command to enable DVD playback on any version of ubuntu desktop.
 
################################################################################
#
# This script distributed free of charge by HildoerSystems.com
#
# This script comes with no warranty or guarantee. Please review the script
# before you run it to ensure that it will not cause adverse effects on your
# system.
#
# If you have any questions or comments, please e-mail: Anthony@HildoerSystems.com
#
################################################################################
 
ubuntuDistro=`lsb_release -a 2>&1 | grep Codename | sed 's/\s*//g' | cut -d: -f2`
 
echo
echo Adding Medibuntu Repository for $ubuntuDistro
 
sudo wget http://www.medibuntu.org/sources.list.d/$ubuntuDistro.list -O /etc/apt/sources.list.d/medibuntu.list
sudo wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
sudo aptitude update 
sudo aptitude -y install medibuntu-keyring 
sudo aptitude update
sudo aptitude -y dist-upgrade
 
echo 
echo Installing DVD plugins and tools
sudo aptitude -y install totem-xine libdvdnav4 libdvdcss2 libdvdread3
sudo aptitude -y purge totem-gstreamer
 
echo
echo
echo All Done. Now Reboot.
 

Last Updated on Friday, 31 July 2009 21:25
 
Comments (4)
DVD playback still not working...
1 Tuesday, 04 November 2008 22:44
Jonah
I copied and pasted the above into my terminal, appeared to work perfectly, restarted... but when I insert the DVD and the movie player opens, or when I open the player manually and try to play the DVD, the player closes immediately. What am I missing?
i did it!!
2 Thursday, 11 June 2009 10:11
Danilo
I've download your script, just put chmod +x permissions and execute as sudo. wait for the downloads, reboot like you say and it work.... i can now see dvd movies in my ubuntu intrepid
works good
3 Saturday, 11 July 2009 00:16
jules
works great, easier than doing it manually, now i will save this script for future use!
Didnt work for me... :(
4 Monday, 15 March 2010 12:55
R S
I copied and pasted the code as suggested...
I didnt get an error message...
But My optical Drive still isn't mounting Cds or DVDs it says that there's no media in it...
I have the jaunty jackalope 32 bit.
Kindly help me

Add your comment

Your name:
Your email:
Subject:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:
Content View Hits : 131509