17 April, 2008

SUSE 10.1 Guide :Get your TUX on !

When you're done downloading and installing SUSE Linux 10.1 OSS, your desktop system is not complete. You might still need support for Java programs, MP3 audio files, and browser plug-ins for Macromedia Flash, Adobe Acrobat, RealPlayer, and Windows Media Video. You may also want to add support for playing DVD videos on your computer, and to try out the new XGL graphical toys. Here's how to effectively make SUSE Linux 10.1 into the perfect desktop OS.

Why you need this guide

SUSE Linux 10.1 OSS -- as the name implies -- is comprised entirely of free, open source software. What you will be doing in this tutorial (with the exception of configuring XGL and Compiz) is installing proprietary add-ons that add functionality. All of the browser plugins are proprietary and will require you to agree to restrictive software licenses. The DVD playback capabilities are in violation of the U.S. Digital Millennium Copyright Act (and similar laws in other countries), which many believe to be unconstitutional and a violation of consumer fair use rights. (Further information on DMCA reform is available here.)

In other words, installing the DVD decoding software could be illegal where you live; therefore I'm not telling you to do it, but I'll tell you how it's done -- for educational and informational purposes only, of course.

Furthermore, if you morally or ethically disagree with proprietary software and refuse to use it, this guide will be meaningless to you.

If you need a more thorough guide that covers installation and system-wide configuration, I've written one for Sam's Publishing entitled SUSE Linux 10.1 Kick Start. It will be available as an electronic download for a very low cost, starting on June 7.

Prerequisites

This guide assumes that you have already installed SUSE Linux 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 me.

The non-OSS extras CD

The standard SUSE Linux 10.1 OSS 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 here (.iso download link). 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 10.1 OSS 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 this term: madwifi

In the right pane, most people will need to select these two packages:
  • madwifi
  • madwifi-kmp-default
If you have a multi-CPU, Hyper-Threaded, or dual-core system, select the SMP packages as well. If you're using Xen and need to have Atheros support in your virtual machines, select the Xen-related madwifi drivers. After you have installed these 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 website, 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 website; 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 arc.

0 comments:

Post a Comment