Playing music and movies on Ubuntu Linux

advertisement

Ubuntu PenguinThis article is part of a series of guest posts by Garikai Dzoma on helping new users migrate successfully to the Ubuntu operating system. Garikai started using Ubuntu Linux in 2007 andis an active member of the Zimbabwe Ubuntu LoCo team.

The first thing anyone ever notices after installing Ubuntu is that they cannot play mp3s, .avi/.vob/.mpeg/ or any of their videos unless you are one of those freaks that happened to have .ogg media files in your music collection. With this discovery comes shock, anger and finally frustration.

From here it can go two ways: the cowards plug in their pirated Windows 7 disk ( we are assuming no dual booting here) and reinstall Windows and the somewhat brave rush to Google their best friend of things anon. The latter will mostly stumble upon http://ubuntuforums.org or some dark irc alley such as irc.ubuntu.com where they will mostly likely be told to RTFM.  At this point our poor user will curse the Pengiuns and swear to never use Linux ever again because it is “unfriendly”.

While this is true for other distributions like Gentoo (in Gentoo you literary have to make the operating system yourself), Ubuntu has worked hard to make the distribution as intuitive as possible.

It is now trite, but let I feel the need to repeat it: Ubuntu is deliberately shipped without any of the “restrictive” codecs needed to play CDs and DVDs. This is for legal reasons since in some countries like France (Sarkozy does not like software sharing much! He has another law coming to tighten the hold on all those indulging in such.)

Installing this software is easy if you have an internet connection. In fact Ubuntu is not much fun if you’re not connected. Please see below for those with Wi-Fi enabled laptops.  Although there are point-and-click methods that can be used such as through the Ubuntu Software Center feature, the command method is recommended and outlined below. Indeed it is the simplest method.

Installing the codecs.

  1. Go to the applications list and click on terminal.
  2. Type the following command in your terminal: sudo apt-get install ubuntu-restricted-extras
  3. If you are running kubuntu instead type:sudo apt-get install kubuntu-restricte-extras
  4. Press the return key a.ka. press enter.
  5. You will be asked to enter your password. Nothing will appear on the screen as you do so. This is a normal security measure.
  6. After you have finished typing your password type enter.
  7. The apt tool will generate dependency checks and determine the packages to be installed. You will be prompted to confirm the instalation type Y and then press enter.

N.B. The above command will not only install all the required codecs to play DVDs, mp3s and Cds but it will also install Microsoft fonts, the Java Runtime Environment and Adobe Flash plugin among other things.

  1. You may also want to run the command: apt-get install  vlc

This installs the popular VLC player.

Laptop with no internet connection

If you have a laptop which is enabled please go to the nearest ZOLspot. The first 15 minutes is free so you need not worry about paying anything.

  1. Make sure your Wi-Fi hardware is switched on and then click on NetworkManager tab in the top panel.
  2. Choose the ZOL Wi-Fi essid and click connect.
  3. Open your browser and and try to visit any internet url e.g http://www.google.co.zw
  4. Your session will be hijacked and you will be presented with the ZOlspot Login page
  5. Select the free trial option
  6. Click on the terminal icon and type the following command: sudo cp /etc/apt/sources.list  /etc/apt/sources.list.bak
  7. Type your password when prompted and press enter.
  8. Type the following command in the terminal: sudo gedit /etc/apt/sources.list&
  9. Delete everything in that file i.e Ctrl+A and the press Delete
  10. Visit http://www.ubuntu.org.zw/node/6
  11. Choose your distribution  for example if you are using the latest release 11.04 a.k.a natty copy the lines:
  12. deb http://archive.ubuntu.org.zw/ubuntu natty main restricted universe multiverse
  13. deb http://archive.ubuntu.org.zw/ubuntu natty-updates main restricted universe multiverse
  14. deb http://archive.ubuntu.org.zw/ubuntu natty-security main restricted universe multiverse
  15. deb http://archive.ubuntu.org.zw/ubuntu natty-proposed main restricted universe multiverse
  16. Paste these into the open file and click save
  17. Close the gedit program
  18. Type the following command in the terminal: sudo apt-get update
  19. Follow steps 1-8 above.


advertisement

12 Comments

  1. JamesM

    Where ubuntu is careful to trod LinuxMint is unintimidated. Many of the restricted codecs and drivers you have described have to be installed by the user on ubuntu. On LinuxMint they are available out of the box. Try LinuxMint which has now evolved to be a much more polished operating system for new users to linux.

    Reply
    1. Macd

      l second JamesM, start with LinuxMint if new user then venture into Ubuntu. lt comes with everything ready to go!

      Reply
  2. factolove

    Nice there i like man, when i was still a newbie I used to just play the movie then wait for the error message and use the wizard to download lol. There is also ubuntu ultimate edition comes with apps and all the funny stuff. check it out…
    you’ll just love it guys

    Reply
  3. Lostcoz

    Why do I need to “install codecs”. Why do I even need to bother with dealing with codecs? 

    “Type in sudo apt-get install ubuntu-restricted-extras”. What?? I’m expected to actually do that? Dude, Linux is not for ordinary people

    Reply
    1. Garikai

      I disagree with the assertion that Linux is not for ordinary people; it is not for everyone though. You will care to  notice however that whenever there is a new version of windows you will do anything to learn the new system no matter how different it is. I bet you did not use Windows 7 in its early days. Installing drivers was a nightmare- and it still is if you do not have an internet connection. You will be still required to learn how to configure and install a plethora of antiviruses and Service packs! Linux is just a different paradigm most people would refer to your condition as the Windows Syndrome a.ka. the belief that it has to be done the Windows way only. Well my friend in Open Source we have an acronym TOWTDI ( There are Other ways To Do It)

      Reply
    1. Garikai

      Ubuntu is simpler to manage than Windows in some ways. In fact installing Ubuntu is a great deal simpler and faster. A normal Ubuntu Desktop Installation will take about 15 minutes and a Server installation 10 with the most basic questions asked. There are other GUI ways of installing codecs but this article was meant to wet your feet in the command line. If you get over your fear of commands you will be hooked!

      Reply
  4. hattentojou

     
    Hi, I performed dance”AKB48” at wedding party.
    AKB48 is very famous idol in Asia.
    I succeed to please guests.
    AKB48  has something attractive.

    Thank you.

    Reply
  5. Pingback: Solving Ubuntu 13.10′s Remote desktop from Windows bug | Matias Vangsnes

Post a Comment

Both Name and Email are optional.
Even if entered, your Email address will not be published. It will just be used for discussion notification.