This procedure was developed using Xubuntu 7.04 (Feisty), but should work equally well with any Ubuntu derivative. Also, always be careful when editing your system configuration files, installing additional packages, or following any procedures from any site, as you can do harm to your system if a mistake is made.
A word of advice before we start - I would suggest using a DVD player other than gXine, especially if you're running Xubuntu. Boot and I have had a lot of problems getting gXine working with several types of media, including DVDs. Speaking for myself, I prefer either VLC or Ogle for a standalone player, and MythTV if you're building a media center (I'll have a post on MythTV later).
First, we want to add the Medibuntu repository. We're adding this because Medibuntu includes a lot of "restricted" drivers, codecs, and applications that are not in other Ubuntu derivatives due to possible legal problems. Launch the Add/Remove Applications dialog (Applications > System > Add/Remove...), and once the dialog comes up, click the Preferences button. Click on the Third-Party Software tab, and then click the Add... button. The dialog box in Figure 1 should come up.
APT line: box, type (or copy) deb http://packages.medibuntu.org/ feisty free , replacing feisty with the name of your distribution (edgy, gutsy, etc). Click the Add Source button, and then repeat the process starting from clicking the Add... button, but this time typing deb http://packages.medibuntu.org/ feisty non-free and then clicking the Add Source button again. Now click the Close button and you will probably see a dialog box saying that your software information is out of date. Just click the Reload button to continue. At this point, you will most likely get the error dialog box in Figure 2. I believe that this error is due to the fact that this is a repository outside of the normal Ubuntu realm, but it doesn't hurt anything so go ahead and click Close.
Add/Remove Applications dialog and click the Ok button to close it. Next, we're going to open a terminal window. For those of you who are unfamiliar with x-terms, don't worry, I'll walk you through it.
Open your terminal (Applications > Accessories > Terminal) and type
after which you will be asked for you administrator password. Enter the password and hit Enter. A line will come up saying Install these packages without verification [y/N]? - just type y and hit Enter. If you're connected to the Internet, you should see some lines saying that libdvdcss2 is being downloaded and installed. After that finishes, you can also install several handy codecs to play Windows media by typing
sudo apt-get install libdvdcss2
and hitting Enter, its up to you though since the libdvdcss2 library is all that you need to play an encrypted DVD. If at this point if the DVD still won't play, try restarting the computer.
sudo apt-get install w32codecs
Please be aware that I have had problems with getting the following media players to work with encrypted DVDs: gXine, Movie Player, and MPlayer (which surprises me). If you figure out how to get these to work, let us know.
Hopefully this post was helpful to you. If it was, please let us know. Also, if you didn't find it helpful for some reason, let us know that too. We're always looking to improve our HOW-TOs.