解决linux下不同图形环境的输入法切换问题

相关说明:

gedit /usr/share/doc/scim/README.Qt





SCIM supports three different input modes — XIM mode, GTK IM mode, and Qt 3 IM mode.  The Qt 3 IM mode needs an unofficial patch for Qt 3, because Trolltech has said that such patch can’t go into Qt 3 as it’s considered too intrusive.  Debian’s Qt maintainers has included this patch into Qt 3 packages since version 3:3.3.5-4.


Qt 4 has plans to officially support input methods, but the current status in Qt 4.3.2 is still not clear (at least to the author of this README).  And there is currently no Qt 4 IM module support for SCIM in Debian.


Therefore, Qt/KDE 3 applications can use either XIM mode or Qt 3 IM mode for SCIM.  These can be easily set and changed with the im-switch package.  The XIM mode support is included in scim package.  To use Qt 3 IM mode, you also need to install scim-qtimm package.  Qt/KDE 4 applications only have the option of XIM mode, but it should work just fine.


When using XIM mode in Qt 3, You need to pay extra attention on two things:


1. Both Qt and SCIM has their own settings for XIM style, so you need to make sure they match.  There are two commonly used XIM styles, usually called “on the spot” and “over the spot”.  To change the style in SCIM, run scim-setup (or choose “SCIM Input Method Setup” from your menu), and go to the “FrontEnd -> Global Setup” page.  The option to change XIM style is “Embed Preedit String into client window”, when it is selected, you are using “on the spot” style; and when it is not selected, you are using “over the spot” style.  To change the style in Qt, run qtconfig (or choose “Qt3 Configuration” from your menu), go to “Interface” tab, and choose the style in the “XIM Input Style” dropdown menu at the bottom.  You usually don’t need the “off the spot” or “root” style.


2. It is reported that some of the KDE applications don’t work very well when using “on the spot” style.  So if your application behaves strangely, you may want to try switching to “over the spot” style first.


(Last updated by Ming Hua, on Sat, 13 Oct 2007)

vim:textwidth=78:





其实可以在所有qt程序中点击鼠标右键后,有一个“select input method”,在里面选择scim或者scim-bridge后就好了,但这样子的问题是我每次都得选择。


所以可以设置环境变量:


export XMODIFIERS=”@im=SCIM”
export GTK_IM_MODULE=”scim”
export QT_IM_MODULE=”scim”

我的ubuntu用的是scim输入法,另外在KDE的程序中输入中文还要设置QT3 CONFIG或者QT4 CONFIG在interface(好象是这个选项)将on the spot 改为over the spot。

设置ubuntu登录窗口的分辨率

sudo gedit /etc/X11/xorg.conf


Section “Screen”
 Identifier “Default Screen”
 Monitor  “Configured Monitor”
 Device  “Configured Video Device”
 Defaultdepth 24
 SubSection “Display”
  Depth 24
  Virtual 1024 768
  Modes  “1024×768@85”
 EndSubSection
EndSection

记得修改前要备份。

给Ubuntu的KDevelop安装中文包

Ubuntu 安装了KDevelop后发现是英文界面,许多专业术语,四处查找,将安装中文包的方法叙述如下。


1、下载中文包,在该网页上显示了目前的本地化进度


2. 执行:msgfmt kdevelop.po -o kdevelop.mo


3. sudo cp kdevelop.mo /usr/share/locale-langpack/zh_CN/LC_MESSAGES/


4. 启动kdevelop


注意:
msgfmt在有的Ubuntu上可能没有安装,要是搜索安装msgfmt这个软件是找不到的,其实应该安装的是下列软件


sudo aptitude install gettext


就ok了

让ubuntu播放rm/rmvb

Linux下支持real产品视频(rm/rmvb)播放的播放器并不多,印象中有两款不错,第一款叫什么忘瓜了,不过还是官方的realplayer播放器是最好的。


现在realplayer 11 for linux已经发布,较以往的版本有较大进步,包括windows media(wmv)支持、改进的alsa驱动支持等,推荐使用mplayer出现影音不同步现象大的朋友使用。据说播放rmvb、rm效果较好!
Ubuntu 8.04安装Realplayer 11的注意事项:


1、下载地址:http://www.real.com/linux,默认是一个bin二进制包,redhat /centos/fedora等可以选择那个rpm包,用rpm -ivh安装。


2、赋予文件可执行权限:sudo chmod +x RealPlayer11GOLD.bin。


3、安装:sudo ./RealPlayer11GOLD.bin,按照提示进行就可以了。


注意一定要以根用户(sudo)安装,否则realplayer不能正常运行。

Ubuntu和Windows屏幕偏移问题"完美"解决方案

Windows下借助软件修正屏幕位置


FX5200显卡、PHLIPS 107T显示器,装好8.04后分辨率1024×768@85很正常,但就是屏幕左移半厘米左右,装好驱动倒是可以解决屏幕偏移问题,3D效果也可以用,但无奈受限驱动在1024×768的分辨率下刷新率只有56-60,显卡是自动检测的,手动选定时候却没有PHLIP 107T的型号,可以用107S和109S的设置,但刷新率最高也只有75,实际情况却跟60的刷新率没多大差别,还不如不要驱动呢,毕竟3D效果对于大多人来说只是个花瓶而已。
如此google了不知多少次,也请教了不少人,可就是解决不了这个问题,无奈之下只有用显示器OSD来调节,这样Ubuntu虽然可以了Windows系统下当然就向右钻了进去,也许是咱的显卡和显示器太烂吧,呵呵,想必同病相怜者也不会少 ^_^


既然Ubuntu下不行,也只有退而来鼓捣Windows了,还好老天不负有心人,终于给我找到一款调节屏幕的软件→→→PowerStrip,其最新版本是PowerStrip v3.78 Build 616

软件虽小功能却很强,可以用来显卡软超频,调节屏幕偏移只是其一个附带功能而已,如此却有牛刀杀鸡之嫌,不过只要解决问题就行了,其多国语言版的装好也不过2M左右,其实此软件只需PStrip.exe和PSdesk.dll就能运行,不过最好是用安装版,毕竟要读驱动的东西,也别太追求绿色喽


安装运行后点右键→显示器设定→设定→进阶时序选项→位置和尺寸→效果看附件,哈哈,不用教了吧
按自己需求调节好以后点右键→选项→偏好设定
在选项里边把Windows启动时自动运行和启动时恢复预定值打上勾
在模块里边把出显示器控制除外的取消勾选可以稍微提高一点启动速度
如此以后只要启动Windows软件就会自动运行并恢复你设定的值,运行软件调节显示器偏移以后也可以点退出,当然设置仍然保存的,还有个小问题就是这个软件启动速度较慢,因为其功能强大要读好多东西,不过这已经很不错了。




呵呵,如此解决屏幕偏移问题虽然不算完美的方法,但最起码简便易行,为Ubuntu屏幕偏移问题花费了好多时间累的不行可还是竹篮打水一场空,还好Windows下有这好的软件,这样也不失为一个可行的方法。

Ubuntu8.04初体验

由于学习QT的需要,最近忙着装LINUX,刚开始从硬盘装了Red hat enterprise server5,恩,发觉这个系统不行,缺点是由于是服务器版本的,在硬件的需求上会比较高,所以会比其他的个人用户桌面或者工作站版本的要卡一点。最重要的是不能更新。还有上面自带的QT和KDEVELOP版本比较低,QT是3.3的,也就是说我还要去给它安装新的软件,很费力费时。并且,默认的内核不支持NTFS文件系统的访问,要访问NTFS还要麻烦一些时间,所以我最后放弃了。


然后装了Fedora9,这款今年5月出来的个人用户操作系统是比较不错的,速度很快,界面也很友好,自带的QT和KDEVELOP版本都是很新的,我不用自己去安装新的,而且官方支持软件更新,并且可以很容易地访问NTFS文件系统(已安装了NTFS-3G)。唯一的问题是:1.对中文的支持不太好,即使安装了中文的编码和输入法,在显示器上也会比较难看,哎,很麻烦,我最讨厌麻烦!2.会出现字体模糊的情况。不知道是系统的问题还是字体的问题还是系统对硬件兼容的问题,打开KDEVELOP和QT都会出现字体模糊的显示,比较严重,花了两天的时候海搜解决办法无果,只得放弃。


然后装了Ubuntu的desk-top版本,看起来真的不错,暂时没发现什么大的、严重的缺点。


恩,然后花了点时间去刻了张盘,3.7G的DVD Ubuntu8.04的。


它自持免费更新,而且很重要的电子科技大学有免费的更新远源,西华这边下载是不算校园网上网流量的


界面也比较不错,我刚安装好后就更新了一大堆软件,而且管它三七二十一把内核全部都更新了,我晕…最后只用了最新的21。


电子科大UBUNTU更新源: http://ubuntu.uestc.edu.cn/

Ubuntu 8.04 Hardy Heron

deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse


ubuntu更新源地址在系统上的存储文件位置是: /etc/apt/sources.list

可以使用以下命令来完成:


打开终端,
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup         “备份原文件”
sudo gedit /etc/apt/sources.list
打开gedit后,将源地址粘贴过去,保存.
然后打开新立得,点更新(reload),就ok了



另外在我把KDE环境的更新内容全部更新之后(总共有700多MB,下了几分钟),进入KDE环境后再转入GNOME就会发现屏幕的分辨率变成600X420(好象是这个数字,没太注意)不能调了。我极puzzlled,在绝望准备把KDE环境软件全部删除之际,在网上找到了解决办法。或许这是ubuntu的一个小BUG。


1. /etc/usplash.conf
设置成你想要的就是了,也可以卸掉它,有时给它当住了,都不知道系统在做什么。

2. /etc/X11/xorg.conf
修改上面的配置文件里面屏幕的分辨率,我是重新启动系统之后就OK了。




另外一个重要的问题忘了说了,就是在刚开始用的时候总是出现了死机情况(屏幕定形,键盘鼠标不能用,只能直接按reset),后来升级了一下内核,问题没有再出现了,也不知道是什么原因,可能是显卡的驱动不兼容,我的是ATI X550,官方有相应的在LINUX下的驱动程序,并且在硬件驱动里面应该启用ATI图形加速选项。
驱动的安装方法是:
sudo ./ati-driver-installer-8-4-x86.x86_64.run

sudo命令详解

Ubuntu默认不能直接用root帐户登录,必须从第一个创建的用户(既安装时创建的那个用户)通过su或sudo来获得root权限。在Ubuntu中对系统进行操作很多时候都要使用这个命令,由此可见对于新来说很有必要来认识这个命令。这或许不太方便,但这样增加了安全性,避免用户由于误操作而损坏系统。


sudo


格式:sudo [其它命令]

 

sudo既为Super user do的意思。sudo在这个过程中只起一个调用root用户的作用,本次操作完成后,其作用就消失,如果要使用调用root权限操作的命令就必须再次使用sudo。些过程中系统会要求用户输入密码,此密码就是安装系统时你输入你那个密码,注意:这个密码在输入你时候不会像在Windows里输密码那样输入一位密码就有一个*号,这样的目的就是为了使密码更安全,因为不知道你密码有几位这样无疑给密码破译者增加了难度。

 


例:

 

我们要更改当前目录下upload.tar.gz的权限就要用到sudo。如果还要对当前目录下的另外一个文件eva.tar.gz更改权限就要再次用到sudo。

 

ownlinux@server:/var/www$ sudo chmod 777 upload.tar.gz
[sudo] password for ownlinux: (此时输入你的密码)
ownlinux@server:/var/www$ sudo chmod 777 eva.tar.gz
[sudo] password for ownlinux:

Fedora9中文输入法安装

[root@localhost ~]# uname -r
2.6.25-14.fc9.i686
[root@localhost ~]# yum install scim-lang-chinese
Loaded plugins: refresh-packagekit
YumRepo Warning: not using ftp, http[s], or file for repos, skipping – <html>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping – <head>
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 241, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 116, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 307, in doCommands
    self._getTs()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 98, in _getTs
    self._getTsInfo()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 104, in _getTsInfo
    self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 576, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 419, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 245, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 149, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 203, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 928, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1086, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1078, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1068, in _loadRepoXML
    return self._groupLoadRepoXML(text, ["primary"])
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1052, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 904, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 772, in _getFileRepoXML
    cache=self.http_caching == ‘all’)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 643, in _getFile
    result = self.grab.urlgrab(relative, local,
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 463, in <lambda>
    grab = property(lambda self: self._getgrab())
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 458, in _getgrab
    self._setupGrab()
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 447, in _setupGrab
    self._grab = mgclass(self._grabfunc, self.urls,
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 548, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 545, in _geturls
    self._baseurlSetup()
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 514, in _baseurlSetup
    self.mirrorurls = self._replace_and_check_url(mirrorurls)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 536, in _replace_and_check_url
    print ‘YumRepo Warning: not using ftp, http[s], or file for repos, skipping – %s’ % (url)
  File "/usr/lib/python2.5/codecs.py", line 303, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xd0 in position 78: ordinal not in range(128)
[root@localhost ~]# yum clean all
Loaded plugins: refresh-packagekit
Cleaning up Everything
[root@localhost ~]# yum install scim-lang-chinese
Loaded plugins: refresh-packagekit
fedora                                                   | 2.4 kB     00:00   
primary.sqlite.bz2                                       | 6.1 MB     02:38    
updates                                                  | 2.3 kB     00:00    
primary.sqlite.bz2                                       | 2.3 MB     04:54    
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package scim-lang-chinese.i386 0:1.4.7-23.fc9 set to be updated
–> Processing Dependency: scim-chewing for package: scim-lang-chinese
–> Processing Dependency: scim-bridge-gtk for package: scim-lang-chinese
–> Processing Dependency: scim-tables-chinese for package: scim-lang-chinese
–> Processing Dependency: scim-python-pinyin for package: scim-lang-chinese
–> Running transaction check
—> Package scim-chewing.i386 0:0.3.1-13.fc9 set to be updated
–> Processing Dependency: libscim-1.0.so.8 for package: scim-chewing
–> Processing Dependency: libchewing.so.3 for package: scim-chewing
–> Processing Dependency: libscim-1.0.so.8(LIBSCIM_1.0) for package: scim-chewing
–> Processing Dependency: libscim-gtkutils-1.0.so.8 for package: scim-chewing
–> Processing Dependency: scim for package: scim-chewing
—> Package scim-tables-chinese.i386 0:0.5.8-3.fc9 set to be updated
–> Processing Dependency: scim-tables = 0.5.8 for package: scim-tables-chinese
—> Package scim-bridge-gtk.i386 0:0.4.15-5.fc9 set to be updated
–> Processing Dependency: scim-bridge = 0.4.15-5.fc9 for package: scim-bridge-gtk
—> Package scim-python-pinyin.i386 0:0.1.13rc1-1.fc9 set to be updated
–> Processing Dependency: scim-python = 0.1.13rc1-1.fc9 for package: scim-python-pinyin
–> Running transaction check
—> Package scim.i386 0:1.4.7-23.fc9 set to be updated
–> Processing Dependency: im-chooser for package: scim
—> Package scim-bridge.i386 0:0.4.15-5.fc9 set to be updated
—> Package scim-tables.i386 0:0.5.8-3.fc9 set to be updated
—> Package libchewing.i386 0:0.3.0-10.fc9 set to be updated
—> Package scim-libs.i386 0:1.4.7-23.fc9 set to be updated
—> Package scim-python.i386 0:0.1.13rc1-1.fc9 set to be updated
–> Running transaction check
—> Package im-chooser.i386 0:1.2.0-1.fc9 set to be updated
–> Processing Dependency: libimsettings.so.2 for package: im-chooser
–> Processing Dependency: imsettings >= 0.101.0 for package: im-chooser
–> Running transaction check
—> Package imsettings.i386 0:0.101.3-2.fc9 set to be updated
—> Package imsettings-libs.i386 0:0.101.3-2.fc9 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 scim-lang-chinese       i386       1.4.7-23.fc9     fedora             25 k
Installing for dependencies:
 im-chooser              i386       1.2.0-1.fc9      updates            72 k
 imsettings              i386       0.101.3-2.fc9    updates           140 k
 imsettings-libs         i386       0.101.3-2.fc9    updates            52 k
 libchewing              i386       0.3.0-10.fc9     fedora            2.7 M
 scim                    i386       1.4.7-23.fc9     fedora            563 k
 scim-bridge             i386       0.4.15-5.fc9     fedora            100 k
 scim-bridge-gtk         i386       0.4.15-5.fc9     fedora             40 k
 scim-chewing            i386       0.3.1-13.fc9     fedora             63 k
 scim-libs               i386       1.4.7-23.fc9     fedora            411 k
 scim-python             i386       0.1.13rc1-1.fc9  updates           178 k
 scim-python-pinyin      i386       0.1.13rc1-1.fc9  updates            14 M
 scim-tables             i386       0.5.8-3.fc9      updates           326 k
 scim-tables-chinese     i386       0.5.8-3.fc9      updates           5.9 M
Transaction Summary
=============================================================================
Install     14 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        
Total download size: 25 M
Is this ok [y/N]: y
Downloading Packages:
(1/14): scim-tables-0.5.8-3.fc9.i386.rpm                 | 326 kB     01:03    
(2/14): scim-python-0.1.13rc1-1.fc9.i386.rpm             | 178 kB     00:19    
(3/14): im-chooser-1.2.0-1.fc9.i386.rpm                  |  72 kB     00:11    
(4/14): scim-libs-1.4.7-23.fc9.i386.rpm                  | 411 kB     00:07    
(5/14): imsettings-libs-0.101.3-2.fc9.i386.rpm           |  52 kB     00:05    
(6/14): imsettings-0.101.3-2.fc9.i386.rpm                |    0 B     01:15   
http://ftp.riken.jp/Linux/fedora/updates/9/i386/imsettings-0.101.3-2.fc9.i386.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
(6/14): imsettings-0.101.3-2.fc9.i386.rpm                |  24 kB     01:37    
http://mirror.yandex.ru/fedora/linux/updates/9/i386/imsettings-0.101.3-2.fc9.i386.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
(6/14): imsettings-0.101.3-2.fc9.i386.rpm                | 140 kB     00:13    
(7/14): scim-chewing-0.3.1-13.fc9.i386.rpm               |  63 kB     00:03    
(8/14): scim-bridge-0.4.15-5.fc9.i386.rpm                | 100 kB     00:05    
(9/14): scim-lang-chinese-1.4.7-23.fc9.i386.rpm          |  25 kB     00:01    
(10/14): scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm     | 6.7 MB     08:41    
ftp://seeder.yandex.net/fedora/linux/updates/9/i386/scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
(10/14): scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm     | 9.5 MB     05:56    
ftp://dispenser.yandex.net/fedora/linux/updates/9/i386/scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
(10/14): scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm     | 9.9 MB     01:12    
http://ftp.jaist.ac.jp/pub/Linux/Fedora/updates/9/i386/scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
(10/14): scim-python-pinyin-0.1.13rc1-1.fc9.i386.rpm     |  14 MB     06:17    
(11/14): libchewing-0.3.0-10.fc9.i386.rpm                | 2.7 MB     02:12    
(12/14): scim-1.4.7-23.fc9.i386.rpm                      | 563 kB     00:14    
(13/14): scim-bridge-gtk-0.4.15-5.fc9.i386.rpm           |  40 kB     00:01    
(14/14): scim-tables-chinese-0.5.8-3.fc9.i386.rpm        | 5.9 MB     07:40    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: scim-libs                    ####################### [ 1/14]
  Installing: imsettings-libs              ####################### [ 2/14]
  Installing: imsettings                   ####################### [ 3/14]
  Installing: im-chooser                   ####################### [ 4/14]
  Installing: scim                         ####################### [ 5/14]
  Installing: scim-bridge                  ####################### [ 6/14]
  Installing: scim-bridge-gtk              ####################### [ 7/14]
  Installing: scim-python                  ####################### [ 8/14]
  Installing: scim-tables                  ####################### [ 9/14]
  Installing: libchewing                   ####################### [10/14]
  Installing: scim-tables-chinese          ####################### [11/14]
  Installing: scim-python-pinyin           ####################### [12/14]
  Installing: scim-chewing                 ####################### [13/14]
  Installing: scim-lang-chinese            ####################### [14/14]
Installed: scim-lang-chinese.i386 0:1.4.7-23.fc9
Dependency Installed: im-chooser.i386 0:1.2.0-1.fc9 imsettings.i386 0:0.101.3-2.fc9 imsettings-libs.i386 0:0.101.3-2.fc9 libchewing.i386 0:0.3.0-10.fc9 scim.i386 0:1.4.7-23.fc9 scim-bridge.i386 0:0.4.15-5.fc9 scim-bridge-gtk.i386 0:0.4.15-5.fc9 scim-chewing.i386 0:0.3.1-13.fc9 scim-libs.i386 0:1.4.7-23.fc9 scim-python.i386 0:0.1.13rc1-1.fc9 scim-python-pinyin.i386 0:0.1.13rc1-1.fc9 scim-tables.i386 0:0.5.8-3.fc9 scim-tables-chinese.i386 0:0.5.8-3.fc9
Complete!
[root@localhost ~]# reboot

Linux Yum命令

一. yum是什么
yum = Yellow dog Updater, Modified
主要功能是更方便的添加/删除/更新RPM包.
它能自动解决包的倚赖性问题.
它能便于管理大量系统的更新问题
注:为什么要使用yum而不用apt,最简单的原因,Fedora自带

二. yum特点
*可以同时配置多个资源库(Repository)
*简洁的配置文件(/etc/yum.conf)
*自动解决增加或删除rpm包时遇到的倚赖性问题
*使用方便
*保持与RPM数据库的一致性

三. yum安装
Fedora自带
#rpm -ivh yum-2.0.4-2.noarch.rpm

四. yum配置
注:修改和增加配置文件中的资源库,加快下载速度和拥有更多可更新的rpm包
将/etc/yum.conf的内容全部替换为
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=fedora-release
tolerant=1
exactarch=1

[fedora-us-1]
name=Fedora Core 1 — Fedora US mirror
baseurl=ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/os

[fedora-us-1-updates]
name=Fedora Core 1 updates — Fedora US mirror
baseurl=ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/updates

[fedora-us-1-stable]
name=Fedora Linux (stable) for Fedora Core 1 — Fedora US mirror
baseurl=ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/stable

[freshrpms]
name=Fedora Linux $releasever – $basearch – freshrpms
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms

五. yum应用
注:当第一次使用yum或yum资源库有更新时,yum会自动下载所有所需的headers放置于/var/cache/yum目录下,所需时间可能较长.

检查有哪些可更新的rpm包
#yum check-update

安装rpm包,使xmms可以播放mp3
#yum install xmms-mp3

安装mplayer,同时自动安装相关的软件
#yum install mplayer

删除licq包,同时删除与该包有倚赖性的包
#yum remove licq
注:同时会提示删除licq-gnome,licq-qt,licq-text,非常方便

系统更新(更新所有可以升级的rpm包,包括kernel)
#yum -y update

每天定期执行系统更新
#chkconfig yum on
#service yum start

六. yum指令详解
*rpm包的更新

检查可更新的rpm包
#yum check-update

更新所有的rpm包
#yum update

更新指定的rpm包,如更新kernel和kernel source
#yum update kernel kernel-source

大规模的版本升级,与yum update不同的是,连旧的淘汰的包也升级
#yum upgrade

*rpm包的安装和删除

安装rpm包,如xmms-mp3
#yum install xmms-mp3

删除rpm包,包括与该包有倚赖性的包
#yum remove licq
注:同时会提示删除licq-gnome,licq-qt,licq-text

*yum暂存(/var/cache/yum/)的相关参数
清除暂存中rpm包文件
#yum clean packages

清除暂存中rpm头文件
#yum clean headers

清除暂存中旧的rpm头文件
#yum clean oldheaders

清除暂存中旧的rpm头文件和包文件
#yum clean 或#yum clean all
注:相当于yum clean packages + yum clean oldheaders

*rpm包列表

列出资源库中所有可以安装或更新的rpm包
#yum list

列出资源库中特定的可以安装或更新以及已经安装的rpm包
#yum list mozilla
#yum list mozilla*
注:可以在rpm包名中使用匹配符,如列出所有以mozilla开头的rpm包

列出资源库中所有可以更新的rpm包
#yum list updates

列出已经安装的所有的rpm包
#yum list installed

列出已经安装的但是不包含在资源库中的rpm包
#yum list extras
注:通过其它网站下载安装的rpm包

*rpm包信息显示(info参数同list)

列出资源库中所有可以安装或更新的rpm包的信息
#yum info

列出资源库中特定的可以安装或更新以及已经安装的rpm包的信息
#yum info mozilla
#yum info mozilla*
注:可以在rpm包名中使用匹配符,如列出所有以mozilla开头的rpm包的信息

列出资源库中所有可以更新的rpm包的信息
#yum info updates

列出已经安装的所有的rpm包的信息
#yum info installed

列出已经安装的但是不包含在资源库中的rpm包的信息
#yum info extras
注:通过其它网站下载安装的rpm包的信息

*搜索rpm包
搜索匹配特定字符的rpm包
#yum search mozilla
注:在rpm包名,包描述等中搜索

搜索有包含特定文件名的rpm包
#yum provides realplay

七. 安全的更新freshrpms.net的rpm包
安装freshrpms.net的GPG key
#rpm –import http://freshrpms.net/packages/RPM-GPG-KEY.txt

编辑/etc/yum.conf,增加以下信息到尾部
[freshrpms]
name=Fedora Linux $releasever – $basearch – freshrpms
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
gpgcheck=1

注:
检查GPG Key
# rpm -qa gpg-pubkey*

显示Key信息
#rpm -qi gpg-pubkey-e42d547b-3960bdf1

删除Key
#rpm -e gpg-pubkey-e42d547b-3960bdf1