Hacking SUSE 10.1 3D, XGL, multimedia

Tagi:
Artykuł może być już niekatualny - Zawarte w nim porady mogą nie działać prawidlowo na nowszych wydaniach openSUSE
Serwis thejemreport.com zamieścił na swoich stronach opis [ang] jak w pełni wykorzystać SUSE 10.1 Opisane zostało: instalacja 3D NVIDIA instalacja 3D ATI Instalacja Atheros wireless network drivers instalacja Javy uruchomienie odtwzrzania filmów DVD uruchomienie XGL/Compiz
Hacking SUSE Linux 10.1 | |
|
|
Written by Jem Matzan | |
Friday, 19 May 2006 | |
When you're done 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 plugins 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 guideSUSE 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 (Click here for more information on DMCA reform). 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 Prentice Hall Professional Technical Reference entitled SUSE Linux 10.1 Kick Start. It will be available as an electronic download for a very low cost, starting on June 2. If you would like to be notified when this guide is released, send an email about it to jem at thejemreport.com PrerequisitesThis 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 me at jem at thejemreport.com. The non-OSS extras CDThe 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 YaSTThe 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:
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 packagesMost of the steps below demand that the following packages be installed:
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 driversThe 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 this package:
ath_pci module by hand or just restart the computer to activate your wireless network.
ATI video driversSUSE Linux 10.1 ships with the newly revamped open source 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:
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:
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:
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:
And for a 64-bit system:
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):
And for 64-bit systems:
Update your system environment variables with this command:
Next, you need to tell SUSE that you want to use this driver instead of the standard one:
Lastly, you have to tell YaST which driver to load (that's a zero in the example, not a letter):
Now reboot your computer by typing the following command:
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 driversSUSE 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:
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):
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:
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:
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:
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):
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 supportTo 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:
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 supportGo 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 machinesYou 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 machinesYou 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:
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:
Then unpack it from its archive by using this command:
The file will un-tar to its own directory, so you can now safely delete the tar archive:
Now you need to compile the DVD decoding library. Change to the directory first:
And then run the configure program with this command (don't leave out the dot and slash):
When it's done configuring, run the make command to build the files:
Finally, it's time to install the library:
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/CompizThe 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:
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
Comment that line out by putting a # in front of it, then duplicate it, using Xgl instead of Xorg:
Then save and exit the editor. While still in the root terminal, run this command:
Attention ATI users: You must add these lines to the video card Device line in /etc/X11/xorg.conf:
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 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:
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:
For more information about XGL/Compiz config options, see /usr/share/doc/packages/xgl/README.suse. Welcome to your dream desktop OSAnd that's all you need to do to make SUSE Linux into a super-powered desktop operating environment. Aside from running Windows and OS X binaries, SUSE Linux 10.1 can do everything that proprietary operating systems can and more. If you have trouble with the directions in this guide, or if you run into problems that aren't covered here, click the link below to visit The Jem Report's discussion forum -- we'll do our best to help you. Please note that you are not entitled to support through this forum; it is offered purely as a gesture of goodwill. |
Gość Data: 2006-05-23 13:06:58Odpowiedz
mm
wszystko fajnie, ale mógłby to ktoś przetłumaczyć...
Gość Data: 2006-05-23 13:11:46Odpowiedz
w sumie polecen konsolowych nie trzeba tlumaczyc i po nich mozna sporo wywnioskowac ale dolaczam sie do postulatu przetlumaczenia tekstu
Gość Data: 2006-05-23 15:54:41Odpowiedz
dobry duszek
Kopiując w ten sposób artykuły łamie Pan prawa autorskie (bez względu, czy są to artykuły po polsku czy po chińsku), a to może grozić pozwem do śądu !
Gość Data: 2006-05-23 16:17:10Odpowiedz
http://creativecommons.org/licenses/by-nc-nd/2.5/
Gość Data: 2006-05-23 16:19:52Odpowiedz
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.
dobry duszku poklikaj sobie w google zanim bedziesz sie odzywal znasz licencje creativecommons a dodatkowo masz wypisaną strone domene i oryginalnego autora wiec idz sie najpierw pouczyc zanim ciebie do wiezienia zamkna za glupote
Gość Data: 2006-05-23 17:42:53Odpowiedz
gość
czemu szykanujesz dzieciaka, po prostu podkreslił, że nie powinno się bezmyślnie wklejać artykułów, nawet na licencji commocreative, zwłaszcza w jezyku ang. na polskim portalu, gdzie jak można zauważyć wiele osób nie radzi sobie z tym językiem
Gość Data: 2006-05-23 17:48:07Odpowiedz
administrator
spokojnie panowie spokojnie dobry duszku wszystko ok tylko nie strasz sądem obrońco też masz racje ale nie jest to ezmyśle kopiownie prawdopodobnie w to miejsce jutro pojawi sie przetłumaczony artykuł bo dzięki temu że został tu opublikowany znaleźli się chetni do tłumaczenia pozdrawiam
Gość Data: 2006-05-23 18:13:07Odpowiedz
i jak tu dogodzić ludziom jak można być
do narzekania to z tym problem to z tamtym, ale do pomocy mało chętnych.
Gość Data: 2006-05-23 21:08:20Odpowiedz
tlumaczenie
ok przetlumaczylem juz calosc i poslalem, czekam kiedy admin zrobi korekte i publikacje :D
Gość Data: 2006-05-24 11:43:57Odpowiedz
...
To ważny artykuł. Proszę admina o udostępnienie nadesłanego tłumaczenia.
Gość Data: 2006-05-24 11:49:17Odpowiedz
jest udostępnione pod przetlumaczonym oryginalnym tytułem
Hakowanie Suse linux 10.1
http://www.susek.info/suse.php/content/view/586/52/
Twój komentarz został donany
Gość Data: 2009-03-17 23:07:18Odpowiedz
Co za tortury dla mniejavascript:ac_smil
Jestem tylko prostym robotnikiem,mam openSUSE,a ten angielski nie dociera do mnie.Z systemem radzę sobie,i jestem bardzo zadowolony.Ale dla mojego małego muzgu ta dawka angielskiego całkiem przewróci mi we łbie.Litości!Może coś po nepalsku napiszecie???,albo po czesku-tyż się pośmieję.AAAAAA h.j z tym!!!
Komentarze (12)