Life without Windows or OS X

GNU/Linux is quite possibly the most important free software achievement since the original Space War, or, more recently, Emacs. It has developed into an operating system for business, education, and personal productivity. GNU/Linux is no longer only for UNIX wizards who sit for hours in front of a glowing console. Are you thinking about switching to Linux and want to learn how to use it? Have you been using GNU/Linux for some time and want to learn even more? This is the place for you.

Friday, June 09, 2006

SUSE Linux 10.1:The non-OSS extras CD

Something I found on the web....

Out of the box people with SUSE Linux 10.1 can't play a DVD, can't listen to MP3s or watch streaming video in their browser.SUSE Linux 10.1 does not come with the codecs and players necessary to enjoy the internet. It's up to you to add these capabilities to the system. If your haveing problems look to this guide for some help.Any problems please email jem@thejemreport.com.


If you want things to work out of the box look to 'PCLinuxOS'


Prerequisites
This guide assumes that you have already installed SUSE Linux OSS 10.1, and are now seeking to add support for Java, Macromedia Flash, Adobe Acrobat, Windows Media, RealPlayer, ATI or Nvidia graphics cards, XGL/Compiz interface enhancements, and commercial DVD movies. Feel free to ignore the portions of the guide that do not apply to your situation, but don't skip over the parts that show you how to add sources to YaST or any other general instructions.
Furthermore, this guide assumes you are using the default desktop environment, KDE. If you're using GNOME or a window manager, you're on your own as far as getting to the YaST utility and any other KDE-specific instructions listed below. In general, however, the majority of the information in this guide is environment-agnostic.
Lastly, Hacking SUSE Linux 10.1 applies only to the x86 and AMD64/EM64T processor architectures. It does not cover the PowerPC architecture. If someone who has a PPC machine is willing to contribute a section specific to PPC, please email jem at thejemreport.com.

The non-OSS extras CD

The standard SUSE Linux OSS 10.1 CD set (or DVD) does not include the non-free extras CD. This applies to the CD torrent provided by OpenSUSE.org as well -- it only includes the five installation CDs. While this guide recommends using Internet sources for all of your software adding and updating, if you want to do everything from discs, you will need to download the ~400MB extras ISO from this address. It's good for both AMD64 and x86. Write that ISO to a CD only if you need to work from physical installation media after the operating system is already installed (like if you don't have a broadband Internet account, or if the computer you're installing to will not have a regular network connection).

Adding sources to YaST

The next order of business is to prepare SUSE to install software from alternate sources. In addition to making this guide easier to follow in the long-run, it also eliminates the need for your physical installation media (CDs or DVD).
Go into the YaST utility by clicking on the green Gecko menu in the lower left corner of your screen. Select System, then click on YaST (Control Center). You'll be prompted for your root password. Go ahead and type it in and press the Enter key.
You're now in YaST, and the Software category is already selected by default. Click on the Installation Source icon. This will bring up a window that will allow you to add software repositories so that you can download the add-on software. You'll notice that your CD or DVD installation media is already listed. Go ahead and disable it by clicking the Enable Or Disable button -- we're going to add an Internet address that will replace your discs. That way if you need to add software from the CDs or DVD, you can get the packages from the Internet instead of putting a disc into your computer. If you need to, you can just as easily enable the CD/DVD source later.
Click the Add button, then click on HTTP in the popup menu. Add the following Internet address to the Server Name field and then click on OK:
packman.unixheads.com/suse/10.1 (or select a mirror from this list)
Now repeat this process and add the following servers to your installation sources:
download.opensuse.org/distribution/SL-10.1/inst-source/
download.opensuse.org/distribution/SL-10.1/non-oss-inst-source/
Without adding the preceding sources, it will not be possible to follow the rest of these steps. You can now close the Installation Source window by clicking Finish in the lower right.
Required packages
Most of the steps below demand that the following packages be installed:

gcc
make
kernel-source
kernel-syms
kdeadmin3

Check the YaST Software Manager to see if they are installed. If they are not, install them and continue with these directions when you are finished.
Atheros wireless network drivers
The original release of SUSE Linux OSS 10.1 did not contain drivers for Atheros-based wireless network cards. There is now a package available, however. Go to the Software Manager in YaST, then search for these packages:

madwifi
madwifi-kmp-default
You only need these two packages; the rest are for specific situations that probably do not apply to you. After you have installed both packages, you can load the ath_pci module by hand or just restart the computer to activate your wireless network.

ATI video drivers
SUSE Linux 10.1 ships with the newly revamped open source radeon driver. That may be fine for 2D rendering, but it doesn't do direct rendering for 3D graphics. To get hardware 3D acceleration (and for XGL support), you still need the proprietary ATI fglrx driver.
Go to the ATI Web site, click on Drivers & Software, then Linux Display Drivers and Software, then on the driver appropriate to your video card. 32-bit SUSE installations need the x86 drivers, and 64-bit SUSE needs the x86_64 versions. After you have clicked the link for your card, yet another link comes up. Click it, scroll down to the downloads table, then right-click the ATI Driver Installer download link and save it to your home directory. You do not need to download any of the other packages.
After the file transfer completes, close all open programs, then press ctrl-alt-F1 to switch to the first virtual terminal. You'll see a text-mode login prompt; log in as root. When you're at the command prompt, type in this command:
init 3
You'll see a bunch of text scroll by, and then a message saying that runlevel 3 has been reached. Press Enter to get the command prompt back, then type the following command in to switch to the directory you downloaded the ATI driver to:
cd /home/username/
Substitute your user name for "username" in the above example. Now you need to change the ATI installer permissions so that it can be run from the command line.
For long file names, you don't have to type the whole name into a terminal window. Instead, just type the first few letters and then press the Tab key, and the file name will be automatically completed for you. This is useful in situations like the one you're in now, where there is a long and complex file name to type in. So type the following command into your terminal, and use the Tab key to complete the ATI driver file name, then press Enter to execute the command:

chmod +x ./ati-driver

That will make the program executable; this must be done before you can run it. Now it's time to run the installer. Again, use tab completion instead of typing the name in. You have to add the ./ before the filename to tell the terminal program that the file you are referring to is in the current directory. If you don't specify that, the terminal will look in other places for the file. It sounds crazy, yes, but that's the way GNU/Linux is (and Unix before it). For the below example, the entire file name is typed in. Please note that this may not be the same file name that you downloaded -- it is only an example. You should use tab completion when you type this command in so that you don't accidentally mis-type the long file name. The part of the example that will not change is the switch statement after the file name (the part with the dashes). Here's the example command for the ATI driver installer for a 32-bit system:

./ati-driver-installer-8.24.8-x86.run --buildpkg SuSE/SUSE101-IA32
And for a 64-bit system:

./ati-driver-installer-8.24.8-x86_64.run --buildpkg SuSE/SUSE101-AMD64
After a few dozen lines of text, a driver package will be created. Go ahead and run it with the following command (the first example is for 32-bit systems):

rpm -ivh fglrx_6_9_0_SUSE101-8.24.8-1.i386.rpm

And for 64-bit systems:
rpm -ivh fglrx64_6_9_0_SUSE101-8.24.8-1.x86_64.rpm

Update your system environment variables with this command:

ldconfig

Next, you need to tell SUSE that you want to use this driver instead of the standard one:
aticonfig --initial --input=/etc/X11/xorg.conf
Lastly, you have to tell YaST which driver to load (that's a zero in the example, not a letter):
sax2 -r -m 0=fglrx
Now reboot your computer by typing the following command:

reboot

The next time your system starts, you'll have hardware 3D video acceleration. Please note that every time you update your kernel, you must re-install the ATI video driver.

Nvidia video drivers
SUSE Linux 10.1 no longer includes the proprietary Nvidia graphics driver, nor is it available through YaST anymore. If you want hardware 3D acceleration for your Nvidia-based graphics card, you will have to enable it the old fashioned way -- by going to the Nvidia Web site; clicking on Download Drivers; then on Linux, FreeBSD, and Solaris Drivers; then on your architecture; and lastly, on the driver download itself. Save it to your home directory (or somewhere that isn't too difficult to get to via the command line).
The Nvidia installer demands to be installed outside of a graphical environment. Close all open programs, then press ctrl-alt-F1 to get to the virtual terminal. You'll be prompted for login information; log in as root. After you've logged in, use this command to exit X.org:
init 3
Press enter when it says that init level 3 has been reached, and you'll find yourself at a command prompt again. Navigate to the directory that contains the Nvidia driver (replace "username" with your user name):

cd /home/username/

For long file names, you don't have to type the whole name into a terminal window. Instead, just type the first few letters and then press the Tab key, and the file name will be automatically completed for you. This is useful in situations like the one you're in now, where there is a long and complex file name to type in. So type the following command into your terminal, and use the Tab key to complete the Nvidia driver file name, then press Enter to execute the chmod command:

chmod +x ./NVIDIA

The installer is now executable, so go ahead and run it with this command, again using tab completion to fill in the file name after the first few characters:

./NVIDIA

The installation utility will come up. Choose Yes (or whatever is the default) for all of the options. When the installer is finished, it will bring you back to the command line. Use this command to restart your computer:

reboot

When next you log into SUSE Linux, you should have hardware 3D acceleration enabled. To check, run this program from a terminal program (the computer screen icon in the lower left, between the house icon and the life preserver):

glxinfo

Dozens of lines of text should result from this command. Look near the top for the Direct Rendering line. If it says Yes, you're all set. If it says no, go back and re-check all of your steps to make sure there were no errors, that you downloaded the correct driver for your processor architecture, and that you followed the directions exactly.
Please note that every time you update your kernel, you must re-install the Nvidia video driver.
Java support

To add support for the Java language both for standalone applications and as a browser plugin for Web applets, go into YaST, then select Package Management. In the Search box, type in sun and click Search. A bunch of packages will show up in the right-hand pane. Click the checkbox next to the following packages:

java-1_5_0-sun
java-1_5_0-sun-alsa
java-1_5_0-sun-devel
java-1_5_0-sun-plugin

Note to 64-bit users: The Java 1.5.0 packages in the AMD64/EM64T edition of SUSE Linux 10.1 are 64-bit, whereas the Java 1.4.2 packages are 32-bit. Since the Firefox package is 32-bit, you will have to install version 1.4.2 if you want to be able to use Java applets. Firefox will use 1.4.2 if you have both versions installed, so you can install both Java 1.4.2 and 1.5.0, though outside of Firefox I'm not sure what effect that will have on Java-aware programs.

There is no harm in selecting all of the java-1_5_0-sun packages (you'll notice that there are a few more that weren't selected), but they are not necessary for running Java programs. If you're a Java programmer you may want at least some of the other packages. When you're done selecting them, click on Accept. When it's done installing, click on Finish in the popup window to go back to YaST.

Your computer will now be able to run Java programs and applets.
Flash, Acrobat, Windows Media, MP3, and RealMedia support
Go back into the YaST software manager. In the Search box, type in w32codec-all and click on Search. A single package should appear in the right-hand pane. Click the checkbox next to it if it is not already installed. Some people may see a lock icon there instead; this means that the package is already installed.
Erase your previous search term in the Search box, type in acroread and click on Search. Click the checkbox next to the acroread package in the right-hand pane.
Now search for flash and click Search. Select that package for installation by clicking its checkbox and agreeing to its license.
Search for realplayer and click Search. Click its checkbox. You only need the RealPlayer package itself -- the other search results are not necessary.
Search for mplayer and click Search. Click the checkbox next to mplayerplug-in. You can also install the other package -- MPlayer -- if you want to, but you've already got a number of video players on your computer.
When you've done all of this, click on Accept. Other packages will be dependent on some of these, so you may have to click Continue in the Automatic Changes screen that comes up. After that, all of the packages you just selected will be installed and your Firefox Web browser will have all of the plugins it needs. You'll also have the ability to play MP3 music files. A popup window will appear when it's done -- just click on Finish and you'll be brought back to YaST.

DVD playback on 32-bit machines

You must add the sources listed above and then perform a software update via the ZENworks update tool (from the Gecko menu, go to System, then Configuration, then Update Software). This will replace your Xine libraries with DVD-capable versions from Packman.
After you've installed all software updates, go to your Gecko menu, then select Internet, then Web Browser, then click on Web Browser (Konqueror). When Konqueror opens, copy and paste in this address if you are using 32-bit SUSE Linux:
http://download.videolan.org/pub/libdvdcss/1.2.9/rpm/libdvdcss2-1.2.9-1.i386.rpm
Or just click here if you want a link. Konqueror will ask you what you want to do with the file. Click the Open With button, and in the ensuing popup window, click on System, then Configuration, then KPackage (if you do not have KPackage installed, bookmark the DeCSS RPM, then go back to the YaST software manager and install the kdeadmin3 package, then restart this process). The KPackage program will read the DVD decoding package from the Web. Click on the Install button at the bottom of the KPackage window, then click on Install in the next window too. You will be asked for your root password; type it in and press Enter. Shortly thereafter, the DVD decoding library will be installed. Click on the Done button, then close KPackage and Konqueror.
You now have the ability to play commercial DVD movies on your computer -- put one in and try it, if it's legal where you are. A popup message should appear when you put in a DVD movie. If it asks you if you want to play the movie with Kaffeine, click on Yes and you'll go straight to the video player. In some instances the disc may be recognized as a data disc, and SUSE will ask you if you want to open the DVD with K3b. In that case, click on Ignore, then go to the Gecko menu, select Multimedia, then Video Player, then click on Media Player (Kaffeine). When Kaffeine starts, click on the Open DVD icon.

DVD playback on 64-bit machines

You must add the sources listed above and then perform a software update via the ZENworks update tool (from the Gecko menu, go to System, then Configuration, then Update Software). This will replace your Xine libraries with DVD-capable versions from Packman.
After you've installed all software updates, go to your Gecko menu, then select Internet, then Web Browser, then click on Firefox. When it opens, copy and paste in this address if you are using 64-bit SUSE Linux (there is currently no 64-bit binary RPM):

http://download.videolan.org/pub/libdvdcss/1.2.9/libdvdcss-1.2.9.tar.gz

Select the Save As option, then click on the Home icon in the left pane and save it there. The file isn't very big, so it should download almost immediately. You can close the Web browser now, and open a terminal by clicking the monitor icon in the lower left corner of your screen (it's between the house icon and the life preserver). Now use this command to switch to root permissions:
su
It'll ask for your root password -- go ahead and type it in, then press Enter. Now you need to decompress the file you just downloaded. Type this in:

gzip -d libdvdcss-1.2.9.tar.gz

Then unpack it from its archive by using this command:

tar xvf libdvdcss-1.2.9.tar

The file will un-tar to its own directory, so you can now safely delete the tar archive:

rm libdvdcss-1.2.9.tar

Now you need to compile the DVD decoding library. Change to the directory first:

cd libdvdcss-1.2.9

And then run the configure program with this command (don't leave out the dot and slash):
./configure
When it's done configuring, run the make command to build the files:
make
Finally, it's time to install the library:

make install

You now have DVD playback support. It won't work until your library path is updated. There are a variety of ways to do that, but the easiest is just to restart your computer.
Now let's test it out. Put a movie disc into your DVD drive and wait for SUSE to recognize it. A popup window will ask you what you'd like to open the disc with; select Kaffeine and click OK. Since this is the first time you've started Kaffeine, an installation check will come up -- just click Next. After that, you'll be asked if you would like to set Kaffeine as your default player for a variety of formats, and if you'd like to create a desktop icon. Do whatever you want to with these options -- they are immaterial to DVD playback. When Kaffeine finally opens, your DVD should go to the root menu or, if there is no menu, start playing the first chapter.
Some DVDs and DVD players are finicky, and might not automatically start playing a movie disc. If you put a DVD into your drive and it doesn't bring up the Kaffeine player, open your gecko menu, select Multimedia, then Video Player, then click on Kaffeine (Media Player). When Kaffeine starts, click on the Play DVD icon.
Using XGL/Compiz
The reason why I'm putting this section last in the article is because it needs to be done after your video drivers are installed. It's also the section that is least likely to work for you (and most likely to destroy your nice, new SUSE Linux 10.1 installation) because the video card support is so slim and the code is so immature. If you have an Nvidia card of the GeForce 4 TI-4200 era or newer or an ATI card of the Radeon X300 era or newer, and if the drivers installed without a hitch, XGL will probably work on your system. There are three very negative possibilities by following the directions below: anything that uses the SDL library for 3D rendering will look transparent and will generally be unusable. Secondly, your 3D frame rate can drop significantly (on one test system, I saw glxgears go from 16000 to 12000 after enabling XGL), and lastly, you can totally hose your X.org environment. If the worst should happen, you can usually log in through SSH on another computer and change your xorg.conf and displaymanager configuration files back to the way they were (or use SaX); sometimes this will un-hose a system. Proceed at your own risk. All things considered, XGL is a bunch of useless, distracting GUI tricks that will sap your 3D rendering performance, and I can almost guarantee that you will get sick of this XGL crap after you have impressed all of your friends with it and come to the sober realization that wobbly windows, faded window controls, and the raindrop effect serve no meaningful purpose to desktop computing. So if you don't have a compliant video card, console yourself with the fact that XGL isn't all that wonderful anyway.
Before you begin, make sure you have a compatible video card. You'll need one of the following: an ATI Mobility 9700 SE or better; an ATI X300 or better; or an Nvidia GeForce 4 TI-4200 or better. The best-case scenario is an Nvidia GeForce 6000 or 7000 series card; ATI cards prior to the X300 (but after the 8500) may or may not work depending on many factors. If you don't meet these requirements, do not mess with XGL right now -- wait for it to improve compatibility with a wider array of graphics chips.

Last warning: I had a lot of trouble with ATI graphics cards and XGL in SUSE 10.1. Specifically, SaX kept forgetting my monitor settings which meant that X failed to start, which would force me to re-configure with SaX, which in turn would erase the ATI-specific xorg.conf hacks, which would cause more problems. So after a lot of work I could get XGL and Compiz to start for a single X session, but I never did find a good way to make SaX stop screwing up my configuration files. Testing went very well with an Nvidia card, but I lost a lot of 3D performance with XGL.
Start by installing XGL and Compiz. Here are the specific SUSE packages that must be added:

xgl
compiz
libsvg
libsvg-cairo

If XGL was installed before you added your Nvidia or ATI video driver, you must remove and reinstall XGL. If any of the other packages were already installed, leave them alone. When you're done installing everything, open a Konsole or GNOME Terminal, use the su command to switch to root, then edit the /etc/sysconfig/displaymanager file. On line 126 you should see an entry like this:
DISPLAYMANAGER_XSERVER="Xorg"
Comment that line out by putting a # in front of it, then duplicate it, using Xgl instead of Xorg:
#DISPLAYMANAGER_XSERVER="Xorg"
DISPLAYMANAGER_XSERVER="Xgl"

Then save and exit the editor. While still in the root terminal, run this command:

SuSEconfig --module xdm

Attention ATI users: You must add these lines to the video card Device line in /etc/X11/xorg.conf:
Option "KernelModuleParm" "agplock=0"
Option "EnablePrivateBackZ" "yes"

Close all open programs and press ctrl-alt-backspace to restart the X server. The next time you log in, XGL will be enabled. To try it out, run these two stacked commands from a terminal window:
compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher water && gnome-window-decorator &
Compiz will replace your current window manager and use a GNOME-like window decoration. This is necessary to get the full effect of XGL/Compiz. Now play around and experience some of the XGL tricks for yourself.
If you're sold on XGL and want Compiz to start by default in KDE, create a file called compiz.desktop in the ~/.kde/Autostart/ directory and add these lines to it:
[Desktop Entry]
Encoding=UTF-8
Exec=compiz --replace decoration wobbly fade minimize cube rotate zoom scale move resize place switcher water & gnome-window-decorator &
GenericName[en_US]=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-autostart-after=kdesktop
You can configure XGL/Compiz options through the GNOME Control Center, in the Desktop Effects Settings section. To start this program from KDE, open up a Konsole window and type this:
gnome-control-center
For more information about XGL/Compiz config options, see /usr/share/doc/packages/xgl/README.suse.

0 Comments:

Post a Comment

<< Home