LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1067|回复: 9

看不懂英文的,请不要进来,绝对精典,请求加精

[复制链接]
发表于 2006-11-25 13:57:13 | 显示全部楼层 |阅读模式
Return to Quick Linux Tips
Fedora Core 6 Tips and Tricks (v0.5)
Last modified: Wednesday November 22, 2006
This is based on my Fedora Core 5 Tips and Tricks page. Just getting started here, comments welcome. Recent changes are highlighted in yellow.

I do want to update this guide to include specific x86_64 instructions but I do not yet have an x86_64 system to experiement with. If you have some time and an x86_64 system please E-mail Me and let me know if you can help.


Add support for other repositories
Install MP3 plug-in
Install Macromedia Flash/Shockwave Plug-in
Install DVD player
Install MPlayer Media Player
Install VLC (VideoLAN Client)
Install RealPlayer 10 Media Player
Install Java J2RE and Mozilla Plug-in
Install NTFS driver
Install Internet Explorer
Install Other Odds and Ends
Other Useful Resources

--------------------------------------------------------------------------------

Add support for other repositories
Fedora comes with a ton of software but there are still plenty of packages of interest to most users that are not included for a variety of reasons. This is where you find the MP3 plug-in and a ton of other packages.
These instructions can vary depending on 32bit or 64bit architecture. If there is a difference it will be noted. If you don't know which architecture you're running you can run the following command:

$ uname -m
x86_64
...or...
i686

I'm still working on the 64 bit specific instructions so your feedback is very important.
Before you add repositories it's probably a good idea to make sure your system is fully updated first. It's still early but right now the Livna and freshrpms repositories seems to be the most useful. The easiest way to get started is to install the freshrpms-release packages:

Both 32 and 64 bits:
# rpm -ihv http://ayo.freshrpms.net/fedora/ ... 1.1-1.fc.noarch.rpm
32 bit version:
# rpm -ihv http://rpm.livna.org/fedora/6/i386/livna-release-6-1.noarch.rpm
64 bit version:
# rpm -ihv http://rpm.livna.org/fedora/6/x86_64/livna-release-6-1.noarch.rpm

To automatically install/update the Macromedia Flash version 7.0 plug-in copy This File to your /etc/yum.repos.d directory. You can browse the packages available there at http://rpm.livna.org/fedora/6/i386/ and http://zod.freshrpms.net/.


--------------------------------------------------------------------------------

Install MP3 Plug-in
Since you've been following along this next step is about as easy as it gets. Just use yum  to automatically install the MP3 plug-ins for xmms and Rhythmbox like this:
# yum -y install xmms-mp3 xmms-faad2 gstreamer-plugins-ugly libmad libid3tag

While you're here you might as well install my personal favorite (this week at least) music player Banshee:
# yum -y install banshee

The -y  flag is to automatically answer yes to any question. If you want to be able to say no you can ignore that flag.
While you're there I highly recommend the grip CD ripper which supports both MP3 and Ogg formats. Once again installation is quite simple:

# yum -y install grip


--------------------------------------------------------------------------------

Install Macromedia Flash/Shockwave plug-in
Flash Plug-in 7.0
If you set up the repositories correctly above you should just need to do this to install the Flash plug-in version 7.0:
# yum -y install flash-plugin

You can get more information about this plug-in at http://macromedia.mplug.org/. Before the plug-in gets installed you'll need to agree to the terms of the license.
There is a problem with fonts not being handled correctly in the current version of the flash plug-in and until Macromedia gets around to fixing the plug-in you'll need to do the following workaround.

# mkdir -p /usr/X11R6/lib/X11/fs/
# ln -s /etc/X11/fs/config /usr/X11R6/lib/X11/fs/config

Flash Plug-in 9.0
Unless you've been hiding under a rock you've probably heard that at long last Adobe has released a BETA of their new Flash plug-in version 9.0. The new plug-in has better performance, works with some sites that didn't work with the older plug-in and fixes some sound syncronization issues. Being a BETA it is not yet perfect and has been known to crash or lock up the browser. If you want/need the newer plug-in you'll need to download it and install it manually for now as there is no automated method yet.

If you want the new version and have the old version installed you will want to rmeove it first:

# rpm -ev flash-plugin

Then download the Flash 9.0 plug-in from http://labs.adobe.com/downloads/flashplayer9.html and click on Download Installer for Linux. Then install it as follows:
# gtar xzvf FP9_plugin_beta_101806.tar.gz
# cp flash-player-plugin-9.0.21.55/libflashplayer.so /usr/lib/mozilla/plugins/

Special 64-bit instructions:
Now the problem with 64 bit, even on Windows, is that most plug-ins are still for some reason only available in a 32 bit version. This is a problem because a 64 bit version of Firefox can only use 64 bit plugins. There are several ways to solve this but by far the easiest is to just force the use of the 32-bit Firebox. Both versions are installed by default, you just need to make a little change to make sure only the 32-bit version gets run.
Edit the file /usr/bin/firefox as root and go down to about line 40 and comment out the following code:

# Force 32 bit version
#if [ -x "/usr/lib64/firefox-1.5.0.8/firefox-bin" ]
#then
#  MOZ_LIB_DIR="/usr/lib64"
#fi

Then when you restart Firefox you'll be running the 32 bit version and the plug-ins you installed above will work just fine.
--------------------------------------------------------------------------------

Install DVD player
Currently I find the DVD player that works best is the Xine Multimedia Player which is found in the Livna repository so installing it is just this simple:
# yum -y install xine xine-lib xine-skins xine-lib-extras-nonfree libdvdcss

This will install the xine DVD/VCD/CD player. Now to get xine to automatically play a DVD upon insertion instead of the Totem player which can't actually play DVDs, go to the System -> Preferences -> Removable Drives and Media. Once that comes up select Multimedia Make sure Video DVD Discs is turned on and put in the following for the command:
xine --auto-play --auto-scan dvd

Does anytone know how to automate changes to the Gnome configuration files?
--------------------------------------------------------------------------------

Install MPlayer Media Player
At some point you're probably going to want to play a QuickTime, AVI or ASF file so you'll want the MPlayer media player. Fortunately with the FreshRpms repositories it's also very easy to download and install. Once again there are conflicts between the Livna and FreshRpms repositories and you'll have to disable one of them.
To prevent potential problems of updates in the Livna repository from messing up the mplayer  and mencoder  packages add the following line highligted in bold to the file /etc/yum.repos.d/livna.repo :

gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna
exclude=mplayer* mencoder*

[livna-debuginfo]

Then you can go ahead and install mplayer and all it's dependencies:
# yum -y install mplayer mplayer-skins mplayer-fonts mplayerplug-in

This command line will download the whole kit and kaboodle. that if you want to play content from a command line that you use the gmplayer  version which will include a skin-able control panel. This will install the plug-in to play a wide variety of media within your browser window. Restart your web browser after that whole mess is done installing and you'll also have a plug-in for Mozilla so you can play embedded content. While you're at it be sure to configure mplayer to use the ALSA sound system rather than the default. It just works better. Edit the file ~/.mplayer/config and add the following line:
ao=alsa

And finally you'll probably also want some additional codecs to play all that proprietary video that seems to have infected the Internet. Go to the MPlayer Download page and download the essential Binaries Codec Package. You'll need to install those files in /usr/local/lib/win32. Here are the steps. Remember the exact file names may change at some point.

# gtar xjvf essential-20061022.tar.bz2
# mkdir /usr/local/lib/win32
# mv essential-20061022/* /usr/local/lib/win32


--------------------------------------------------------------------------------

Install VLC (VideoLAN Client)
Multimedia can be the achilles heel of Linux, but with just a little work you should be able to play just about anything your friends can. Besides Mplayer the other great video player is called VLC. It too is trivially easy to install once you have your repositories set up:
# yum -y install videolan-client

Once the client and a zillion dependencies get installed you can play a huge variety of video formats easy with the command vlc  
--------------------------------------------------------------------------------

Install RealPlayer 10 Media Player
If you have a better way of installing a Real Medial player please let me know if in the comments section below. Thanks to Chandra Shekhar for this great tip for making RealPlayer actually use ALSA instead of OSS. I've incorporated the changes into the guide below but here is a link to the original document.
http://docs.google.com/View?docid=ddt5bn9t_4c9238p
Before you install the play you'll need to make sure the compat-libstdc++-33 module is installed. Download the RealPlayer10 package from the following location:

RealPlayer10GOLD.rpm

Then install the RPM from the command line:
# yum -y install compat-libstdc++-33 alsa-oss
# rpm -ihv RealPlayer10GOLD.rpm

The other thing you'll need to do is prevent the mplayerplug-in  you installed above from trying to handle Real Media. I don't know why it's included because it almost never works correctly. The easiest way to disable it is to remove the appropriate plugin files:
# cd /usr/lib/mozilla/plugins
# rm mplayerplug-in-rm.so

Then whenever you want to view something just use /usr/bin/realplay . Here is a link to a cute test video to make sure it's working for you.
If audio is working but you have a black screen then it's possible your video card doesn't support XVideo. You can turn it off by clicking on Tools  -> Preferences then choose the Hardware tab and disable Use XVideo .

If the video doesn't play properly the first thing to check is to make sure you're not running SElinux, it seems to prevent the RealPlayer from getting access to the drivers. I currently run with SElinux disabled but I recommend you run it in the Targeted mode rather than the most secure mode.

Now a bit of a tricky part. You'll need to edit the executable /usr/bin/realplay as root and locate the section below around line 56. Then add the code that's highlighted and save the file back.

        .
        .
    export HELIX_LIBS
fi

LD_PRELOAD="$LDPRELOAD:/usr/lib/libaoss.so.0.0.0"
export LD_PRELOAD
   
# See if LD_PRELOAD contains any of the sound server libs. If so, remove them.
LD_PRELOAD=`echo $LD_PRELOAD | sed -e 's/\([^:]*libesd[^:]*\|[^:]*libarts[^:]*\):\?//g'`
        .
        .

After you've run it the first time and gone through the configuration screens edit the ~/.realplayerrc  file and add the following line in the [helix]  section of the configuration:

[helix]
SoundDriver=2
        .
        .

For some reason on my system RealPlayer uses the the old and virtually obsolete OSS sound driver. The line above tells it to use the newer ALSA sound driver instead.
--------------------------------------------------------------------------------

Install Java J2RE and Mozilla Plug-in
It's also very handy to have the Java run-time environment available and most importantly a Mozilla plug-in so you can view dynamic content. It's unfortunate that Mozilla will actually crash if you go to a site containing Java and you don't have the plug-in installed.
For now there is no easy way to do this but I found the following instructions on FedoraForums.org. Basically, start by downloading the Java Runtime Environment (JRE) 5.0 Update 9 (at the time I wrote this) from Sun.com. You'll want to grab the Linux RPM in self-extracting file. Then you want to install it with:

# chmod +x jre-1_5_0_09-linux-i586-rpm.bin
# ./jre-1_5_0_09-linux-i586-rpm.bin

Then you'll probably want to enable Java Plug-ins and here once again there is no easy way:

# ln -s /usr/java/jre1.5.0_09/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins

And finally you'll need to tell Fedora that you wish to use this version of Java as the preferred interpreter rather than the Open Source version that's installed by default. You'll of course need to adjust the full pathname if you install a newer version of the jre than the one in this example:
# /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.5.0_09/bin/java 1509
# java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b05)
Java HotSpot(TM) Client VM (build 1.5.0_09-b05, mixed mode, sharing)

If you know of an easier way please post it to the Comments section below.
--------------------------------------------------------------------------------

Install NTFS driver
With repositories like Fedora Extras it's now very easy to add NTFS support to Fedora:
# yum -y install ntfs-3g

Then you can simply mount NTFS file systems using the option -t ntfs-3g. You can find more detailed information about this driver at http://www.ntfs-3g.org/
--------------------------------------------------------------------------------

Install Internet Explorer
I know what you're saying, why would I ever want Internet Explorer installed on my perfectly good Linux system? If you don't have your own answer to that question, feel free to just skip this section. For everyone else, it's actually quite easy thanks to some very handy scripts from IEs4Linux. Before you start you'll need to make sure you have >wine and cabextract installed:
# yum -y install wine cabextract

Then just download the latest script, extract and run it. The example below is based on version 2.0.5, just adjust the version number as necessary. Please note that you will want to install and run this as your own user, NOT as root. I used the defaults except that I installed all the versions of IE. I do some web development and I always find myself needing to resolve some goofy incompatibilites with older versions of IE.
$ gtar xzvf ies4linux-2.0.5.tar.gz
$ cd ies4linux-2.0.5
$ ./ies4linux
Welcome, greg! I'm IEs4Linux.
I can install IE 6, 5.5 and 5.0 for you easily and quickly.
You are just four 'enter's away from your IEs.

I'll ask you some questions now. Just answer y or n (default answer is the bold one)

IE 6 will be installed automatically.
Do you want to install IE 5.5 SP2 too? [ y / n ] y
        .
        .
        .
IEs 4 Linux installations finished!

To run your IEs, type:
ie6
ie55
ie5

You can read more about this feature on my Internet Explorer with ActiveX on Linux page. It goes into a little more detail about using IE on Linux.


--------------------------------------------------------------------------------

Install Other Odds and Ends
MS TrueType Fonts
Many people will find it handy to have MS TrueType fonts available to make sure many websites render correctly. You can download the latest RPM from http://www.mjmwired.net/resources/mjm-fedora-fc5.html#ttf and install it as follows:
#  wget --referer=http://www.mjmwired.net/resources/mjm-fedora-fc6.html \
    http://www.mjmwired.net/resource ... ts-2.0-1.noarch.rpm
# rpm -ihv msttcorefonts-2.0-1.noarch.rpm
# service xfs restart

Turn off the ANNOYING Spatial Nautilus Behavior
I don't know if it's the worst feature of Fedora but it's definitely in the top 5. You can get the old more sane behavior by bringing up nautilus then choose Edit -> Preferences then select the Behavior tab. Near the top find the option for Always open in browser windows and make sure it is checked.
Other Handy Utilities
Here are a few other tools that aren't installed by default but a lot of people find handy:
# yum -y install bittorrent-gui gnomebaker testdisk thunderbird audacity-nonfree screen

audacity-nonfree - A version of the excellent Audacity sound editor which includes MP3 support bittorrent-gui - Simple Gnome based BitTorrent client
gnomebaker - GTK based CD/DVD burning utility
screen - If you do a lot with the command line you'll find screen invaluable
testdisk - Two command line utilities to recover lost partitions and undelete files on FAT filesystems. VERY handy for undeleting files on flash memory cards.
thunderbird - Excellent E-mail client that complements Firefox

--------------------------------------------------------------------------------

Other Useful Resources
I've tried to not just copy other people's tips so I've included a list of other people's tips and tricks I've found to be useful. There should be little or no overlap.
FedoraForum - Linux Support Community - This is now the official way to get community support of the Fedora Linux system. There is no official Red Hat mailing list for any version of Fedora any more.
Mauriat Miranda's FC6 Installation Guide - Great guide that goes into more depth of selecting options during the installation process. This is also the source of the MS fonts RPM.

Fedora Core 5 Linux Installation Notes - Another great Fedora installation guide. This guide goes into some server related features rather than just desktop features.

Using Linux and Bluetooth DUN on the Treo 650 - A very nice guide to using a Treo 650 phone as a modem with your Linux based PC. It works great for me with one change. Do NOT uncomment the line encrypt enable;  as it just won't work for me with encryption enabled with a D-Link DBT-120 and a Treo 650 phone.

Fedora Multimedia Installation HOWTO - I discovered this great resource after I wrote this. This document goes into more detail than mine so it's a great resource.

The Unofficial Fedora FAQ - Another great guide that should answer most general questions about Fedora. Fedora Core 5 doesn't seem to be addressed there yet but most answers are the same for both FC4 and FC5.

This Fedora Core 6 Tips & Tricks translated into Italian - Thanks to Guido for translating this guide into Italian. Please contact me if you wish to translate this guide into other languages.

Fedora fc5 on EasyLinux.info - Yet another guide. The thing I love about Linux is that you can solve any problem a number of different ways. That includes these tips guides, everyone has a different way. Different strokes for different folks.


Donate via Paypal: All these guides are done on my personal time as a community service. Please consider a donation to allow me to allocate the time to put these together:

         $ (USD) € (EUR) £ (GBP) $ (CAD) $ (AUD) ¥ (JPY)   


The comments section below is only for comments, suggestions or corrections for this guide only. Please do not use this for general Fedora/Linux support. If you do require support for something other than what's described here I recommend using Fedora Forums.  

User Contributed Comments
Fedora Core 6 Tips and Tricks  add a comment
ukstar
20-Nov-2006 22:09
I can't believe that a site like this exists. I love running ie6 and flash9 up and running, no problems. Keep up the great work.  
Major L??szl??
19-Nov-2006 06:43
Thanks for  this page, really. I found it accidently and I've been an another before, but this is the best I think.  
Ferry
18-Nov-2006 06:55
There is no need to install mplayer: just install xine and the essential codecs from mplayer (copy them into /usr/lib/codecs). This will allow xine to play all the stuff that mplayer can :-)
if you have other win32 codecs, just add them to this directory and it'll work!  
Eric Mooneyham
16-Nov-2006 19:24
THANK GOD for this page.  It is a critical lifesaver for the less-linux-smart ones..  The steps on this page pretty much summed up all the necessities of a linux machine... music, movies, etc...  Keep up the good work.  
John Verderber
10-Nov-2006 14:56
As always a great help when configuring Fedors. I did run into one glitch with Xine. It woud run DVD and came up with an opening error. What I did was remove Xine through yum and went to Freshrpms.net and downloaded the xine-lib and xine-ui for Fedora 5 and installed it with the software installer. All works great now. So beware of the new RPM for xina in FC6.

Again thanks for a great site.

JOhn V  
Leo Canale
09-Nov-2006 17:00
"I currently run with SElinux disabled" try On the "SELinux" tab click on "Modify SELinux Policy", click on "Memory Protection" to open it and tick the check box next to "Allow all unconfined executables to use libraries requiring text relocation that are not labeled textrel_shlib_t". Click "ok". It seems to work for me  
Nordickiwi
07-Nov-2006 13:47
Brilliant, such a great page. After using FC1-5 and setting most of this stuff upp myself with mixed success I am very pleased to have found my way to you site. My FC6 setup is working out well and with much more sucess.

Thanks heaps.
I'll be back here for sure.

Nordickiwi
http://www.nordickiwi.com/  
dudi
03-Nov-2006 13:38
great tutorial. on the section MS TrueType Fonts, i follow this instructions and recompile freetype2. then i got a new fonts like on windows . but msttcorefonts packages is not build in with tahomabd.ttf (i copied this font from Windows XP) and everything looks good.  
Sebastian
01-Nov-2006 05:25
great work! it was indeed very very helpful.

My only problem with the new FC6 install (I upgraded with yum from FC5) is that mplayer gives horrible noise on mpg and avi files (wmv files work great).  
Tex
31-Oct-2006 13:23
Wonderful, great, fantastic page !!!

Congratulations !!!  
zod_is_god
29-Oct-2006 14:21
This site is so invaluable I don't leave home without it!!

My only problem is when setting up mplayer to use ALSA over OSS.  The ~/.mplayer/config file doesn't appear to reside on my system.

Do i need to create this? Or should it already be there?

ZiG
The file should be created the first time you run mplayer  
Chandra Shekhar
28-Oct-2006 00:13
Well, I have described a bit about configuring RealPlayer based on my experience on Fedora. The problem I have had was how to play other mediaplayer with RealPlayer running at same time. I think people will find it quite useful. Please refer to the page http://docs.google.com/View?docid=ddt5bn9t_4c9238p for details. I didnt have any problem with sound after it.  
PwrUsr
26-Oct-2006 15:20
I've been experiencing hangs when using yum. I've found that by removing yum-updatesd things seem to be better.  
Skavoovie
24-Oct-2006 17:29
Great tips site as always!  



--------------------------------------------------------------------------------
Please E-mail Me with any questions, comments or corrections.

--------------------------------------------------------------------------------

All pictures and text are the property of Gregory Gulik unless otherwise specified. Please contact site owner if you would like permission to use these pictures for your own purposes or to make comments about anything you see here.
发表于 2006-11-25 14:03:44 | 显示全部楼层
saw it somewhere else, really helpful.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-25 14:10:51 | 显示全部楼层
just try it !
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-25 14:11:31 | 显示全部楼层
so right!
回复 支持 反对

使用道具 举报

发表于 2006-11-25 14:38:23 | 显示全部楼层
Then you can go ahead and install mplayer and all it's dependencies:
# yum -y install mplayer mplayer-skins mplayer-fonts mplayerplug-in

This command line will download the whole kit and kaboodle. that if you want to play content from a command line that you use the gmplayer version which will include a skin-able control panel. This will install the plug-in to play a wide variety of media within your browser window. Restart your web browser after that whole mess is done installing and you'll also have a plug-in for Mozilla so you can play embedded content. While you're at it be sure to configure mplayer to use the ALSA sound system rather than the default. It just works better. Edit the file ~/.mplayer/config and add the following line:
ao=alsa

And finally you'll probably also want some additional codecs to play all that proprietary video that seems to have infected the Internet. Go to the MPlayer Download page and download the essential Binaries Codec Package. You'll need to install those files in /usr/local/lib/win32. Here are the steps. Remember the exact file names may change at some point.

# gtar xjvf essential-20061022.tar.bz2
# mkdir /usr/local/lib/win32
# mv essential-20061022/* /usr/local/lib/win32


?????/usr/local/lib/win32 is for fc6?
回复 支持 反对

使用道具 举报

发表于 2006-11-25 17:24:58 | 显示全部楼层
当然不对。。。。你自己不会判断下阿。。。
在/usr/lib/win32或者/usr/lib/codecs下,
这篇文章我当多好,被搂住骗了。。。。还不如官方文档。
回复 支持 反对

使用道具 举报

发表于 2006-11-25 17:36:38 | 显示全部楼层
你牛,看得懂英文。

http://www.gagme.com/greg/linux/fc6-tips.php

转载注明。
回复 支持 反对

使用道具 举报

发表于 2006-11-26 10:02:01 | 显示全部楼层
这个不懂E文也看得懂啊。
有不要注明不懂E文不要进吗?
回复 支持 反对

使用道具 举报

发表于 2006-11-26 10:03:02 | 显示全部楼层
这个不懂E文也看得懂啊。
有不要注明不懂E文不要进吗?
回复 支持 反对

使用道具 举报

发表于 2006-11-26 10:24:51 | 显示全部楼层
早就在原站点看过了,楼主应该注明转载自哪里.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表