歡迎您光臨本站 註冊首頁

ubuntu 快速設置指南

←手機掃碼閱讀     火星人 @ 2014-03-26 , reply:0

前言

* 本文適用於採用i386安裝光碟安裝的系統,部分內容適合AMD64和PPC安裝(如有問題請到論壇諮詢)。
* "sudo"的意思是「以超級用戶執行[Superuser Do]」。當以"sudo"方式執行命令時,系統會提示您輸入當前登錄用戶的密碼。只有輸入正確的密碼(您輸入的密碼不會被顯示)並按下回車後,命令才會繼續執行。
* 注意:apt,aptitude,dpkg,Adept,新立得軟體包管理器 等軟體管理工具在同一時間只能有一個運行。
* 文中所提到的下載地址http://ftp.ubuntu.org.cn/ 帳號: ubuntu,密碼:ubuntuftp。
* 文章使用命令行進行操作是為了方便描述,文中的大部分操作都可以由圖形界面的新立得軟體包管理器和相關係統工具完成。

[編輯] 修改源並更新你的(k/x/ed)ubuntu

* 不同的網路狀況連接以下源的速度不同。建議在添加前手動驗證以下源的連接速度(ping下就行)。比如說北京網通用戶連接cn99就非常慢,而ftp.sjtu.edu.cn是相對較快的源。選擇最快的源可大大節省下載時間,請根據自己網路環境設置更新伺服器,以達到最快的速度。
* 注意,你可以同時加入幾個源。盡量選擇一組官方的源(也就是下面的Archive.ubuntu.com的條目)直接加在文件的最後,以避免非官方源軟體包不全時出現 404 Not Found 文件未發現的錯誤。建議電信用戶使用cn99和台灣大學的源,網通用戶使用台灣大學的源,教育網用戶使用教育網的源。


打開終端方法:

按下ALT+F2 -> gnome-terminal -> 運行 #(ed)ubuntu
按下ALT+F2 -> konsole -> 運行 #Kubuntu
按下ALT+F2 -> xfce4-terminal -> 運行 #xubuntu

在終端執行命令

備份當前的源列表,以便日後需要時恢復:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

編輯源列表

gksu gedit /etc/apt/sources.list #(ed)ubuntu
kdesu kate /etc/apt/sources.list #kubuntu
gksu mousepad /etc/apt/sources.list #xubuntu
sudo vim /etc/apt/sources.list #通用


從以下各伺服器列表內容中選擇一段替換文件中的所有內容,為防止非官方源中軟體包不全的問題,請在sources.list文件中尾部添加一組官方源。


Archive.ubuntu.com更新伺服器(歐洲,此為官方源,電信網通用戶使用):

deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse


Ubuntu.cn99.com更新伺服器(江蘇省常州市電信,推薦電信用戶使用):

deb http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ gutsy main restricted universe multiverse


Mirrors.shlug.org更新伺服器(電信伺服器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group):

deb http://cn.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse


Mirror.lupaworld.com更新伺服器(浙江省杭州市雙線伺服器):

deb http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu gutsy-proposed main restricted universe multiverse


廈門大學更新伺服器(教育網伺服器):

deb ftp://ubuntu.realss.cn/ubuntu/ gutsy main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-backports restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ gutsy-updates main restricted universe multiverse


成都市 電子科技大學更新伺服器(教育網,推薦校園網和網通用戶使用):

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

== 如果無法解析uestc.edu.cn域名,請使用以下地址 ==

deb http://ubuntu.dormforce.net/ubuntu/ gutsy main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-security main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ gutsy-updates main multiverse restricted universe


上海市上海交通大學更新伺服器(教育網,推薦校園網和網通用戶使用):

deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe

中國科學技術大學更新伺服器(教育網,推薦校園網和網通用戶使用):

deb http://debian.ustc.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main multiverse restricted universe

北京市清華大學更新伺服器(教育網,推薦校園網和網通用戶使用):

deb http://mirror9.net9.org/ubuntu/ gutsy main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-backports main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-security main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-security main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ gutsy-updates main multiverse restricted universe


瀋陽市東北大學更新伺服器(教育網,推薦校園網和網通用戶使用):

deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-backports main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-proposed main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-security main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-updates main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-backports main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-security main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ gutsy-updates main multiverse restricted universe


中國台灣省台灣大學更新伺服器(推薦網通用戶使用,電信PING平均響應速度41MS。強烈推薦此源,比較完整,較少出現同步問題):

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ gutsy-proposed main restricted universe multiverse


Mirror.vmmatrix.net更新伺服器(上海市電信,推薦電信網通用戶使用):

deb http://mirror.vmmatrix.net/ubuntu/ gutsy main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-security main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://mirror.vmmatrix.net/ubuntu/ gutsy-proposed main restricted universe multiverse


ubuntu.cnsite.org更新伺服器(福建省福州市 電信):

deb http://ubuntu.cnsite.org/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://ubuntu.cnsite.org/ubuntu/ gutsy-proposed main restricted universe multiverse


mirror.rootguide.org更新伺服器(上海市 電信):

deb http://mirror.rootguide.org/ubuntu/ gutsy main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ gutsy-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu-cn/ gutsy main restricted universe multiverse


台灣的官方源速度也相當不錯,有時甚至快於內地的:

deb http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse

也可以到以下網址自定義產生若干源:

http://www.ubuntulinux.nl/source-o-matic

以下網址有極其全面的源,以供補充:

http://italy.copybase.ch/blog/li ... untu-kubuntu-linux/

官方採集的源列表:

https://launchpad.net/ubuntu/+archivemirrors

保存編輯好的文件,執行以下命令更新

sudo apt-get update #這一步是更新你的源列表,換源後必須執行
sudo apt-get dist-upgrade #這一步是更新軟體,如果你對新版本軟體的需求不是那麼迫切,可以不執行

[編輯] 設置系統中文環境支持
[編輯] 安裝語言包

Kubuntu

主菜單 -> 系統設置 -> 區域與語言 -> 安裝新語言 -> Chinese -> 安裝
主菜單 -> 系統設置 -> 區域與語言 -> 選擇系統語言 -> 簡體中文 -> 確定。

相對的命令是:
sudo apt-get install language-pack-kde-zh-base language-pack-kde-zh

Ubuntu:

系統 -> 系統管理 -> 語言支持,在列表中的Chinese條目打勾。
同時將默認語言修改為Chinese(中國)並確定。

配置字體,使中文看起來更漂亮(可選)

sudo fontconfig-voodoo -f -s zh_CN

[編輯] scim輸入法安裝及設置

如果您要在非CJK(中日韓)的locales下使用scim,只需在System->Administration-> Language Support 選中 Chinese 的 checkbox,點擊 Apply 即可(可能被提示需要重新啟動計算機)。不需再如從前需要在Terminal進行各種設置,安裝相關軟體包亦由系統自動執行。

以上適用Gnome環境。

如果在KDE下面使用scim,建議使用如下設置:

sudo apt-get install im-switch libapt-pkg-perl
sudo im-switch -s scim-xim -z default

[編輯] fcitx輸入法安裝及設置(可選)

sudo apt-get install im-switch fcitx
sudo im-switch -s fcitx -z default
im-switch -s fcitx -z default #注意:不加sudo

完成設置最好重啟一下X,輸入法就生效了


更多fcitx設置,請訪問中文輸入法fcitx
[編輯] 安裝文泉驛字體(可選)

安裝:執行下面的命令前請確保你已經將上面源中ubuntu-cn的源加進去了。

sudo apt-get install xfonts-wqy

安裝後應該可以在字體管理器中找到WenQuanYi Bitmap Song字體了,如果你的系統中找不到,請執行下面的命令:

sudo dpkg-reconfigure fontconfig-config

系統總共會問你三個問題,其中第三個為:

Enable bitmapped fonts by default? # 即是否啟用Bitmap字體

移動tab鍵至Yes,回車,字體管理器中就應該有WenQuanYi Bitmap Song字體了。
[編輯] 解決PDF電子文檔的中文亂碼

* KPDF/Evince:前者為Kubuntu自帶,後者為ubuntu自帶。

sudo apt-get install xpdf-chinese-simplified xpdf-chinese-traditional

如果上面的方法仍然不起作用,你需要安裝poppler-data

點擊此處到官網下載,點擊本地下載deb安裝包。然後

sudo dpkg -i poppler-data_0.1.1-1_i386.deb


* Adobe acrobat英文版:到下面的地址下載簡體語言包(中文版的就不需要了)。

點擊此處訪問官方地址,點擊本地下載Adobe reader8.1簡體中文字體包
[編輯] 安裝JAVA環境支持

打開終端,執行以下命令,或使用Adept/新立得軟體管理器,在其中分別搜索"sun-java6-jre"和"sun-java6-jdk"並標記安裝。

sudo apt-get install sun-java6-jre

如果空間富裕,建議安裝一個JDK。

sudo apt-get install sun-java6-jdk

提示:安裝過程中需要你回答是否同意使用協議(終端中紅藍色的提示界面),此時按tab鍵至OK,再按回車即可正常安裝。

設置當前默認的java解釋器:

sudo update-alternatives --config java

執行後會出現類似如下的畫面:

There are 2 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/gij-wrapper-4.1
*+ 2 /usr/lib/jvm/java-6-sun/jre/bin/java

Press enter to keep the default
  • , or type selection number:

    輸入 有包含 "sun" 的行的前面的數字。如上面顯示,則輸入2,然後回車確定。


    配置JAVA環境變數:

    sudo gedit /etc/environment

    在其中添加如下兩行:

    CLASSPATH=/usr/lib/jvm/java-6-sun/lib
    JAVA_HOME=/usr/lib/jvm/java-6-sun

    sudo gedit /etc/jvm

    將文件中的

    /usr/lib/jvm/java-6-sun

    這一行填入到配置塊的頂部

    安裝瀏覽器的JAVA Plugin(可選):

    sudo apt-get install sun-java6-plugin


    [編輯] 安裝QQ軟體(可選)

    系統自帶的Pidgin支持非常多的聊天軟體,你可以同時登錄QQ,MSN,GoogleTalk,雅虎通等,進行聊天。不過對於QQ來說,由於騰訊公司的封殺,並不是每個人都能夠登錄成功的。至於不能登錄的原因,多數都是「你的QQ版本過低......"。下面介紹的幾種方法是除了Pidgin之外的QQ解決方案,他們在使用上各有優勢,除了wine方案外,其它的方案仍不能保證您的QQ百分之百登錄。
    [編輯] 安裝EVA,Kubuntu推薦使用

    sudo apt-get install eva

    安裝完成之後,按Alt+F2,輸入eva回車即可,也可以在主菜單 -> 網路 -> eva 啟動。


    [編輯] 安裝LumaQQ,需JAVA支持

    1. 下載並安裝安裝QQ需要先安裝上一步的JAVA環境,也可以到lumaqq官方網站下載最新版本進行安裝(依次執行以下命令)

    wget -c http://lumaqq.linuxsir.org/downl ... 2_x86_no_jre.tar.gz
    sudo tar zxvf lumaqq_2005-linux_gtk2_x86_no_jre.tar.gz -C /opt/
    wget -c http://lumaqq.linuxsir.org/downl ... 006.02.02.15.00.zip
    sudo unzip -o lumaqq_2005_patch_2006.02.02.15.00.zip -d /opt/LumaQQ/lib
    sudo chown -R root:root /opt/LumaQQ/
    sudo chmod -R 755 /opt/LumaQQ/
    sudo gedit /usr/share/applications/LumaQQ.desktop

    2. 在新增的文件內加入下面這幾行

    [Desktop Entry]
    Name=LumaQQ
    Comment=QQ Client
    Exec=/opt/LumaQQ/lumaqq
    Icon=/opt/LumaQQ/QQ.png
    Terminal=false
    Type=Application
    Categories=Application;Network;

    3. 保存編輯過的文件 安裝完成後的快捷方式在(應用程序 -> Internat -> LumaQQ)。


    [編輯] 多媒體應用環境設置

    系統自帶的以Gstreamer為後台引擎的totem電影播放器,目前已支持很多多媒體格式,效果很好。美中不足的是Real公司的rmvb, rm等格式無法支持,DVD格式的光碟支持效果並不理想。可是這些文件格式都是我們常用的。所以我們先卸掉原來的電影播放器,換裝以xine為後台引擎的 totem電影播放器,或者直接安裝mplayer或kaffine作為電影播放器。

    sudo apt-get remove totem-gstreamer

    安裝totem-xine電影播放器的命令如下:

    sudo apt-get install totem-xine totem-mozilla totem

    執行這條命令將會自動安裝 libmodplug0c2 libmpcdec3 libpulse0 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxcb1 libxine1 libxvmc1 等軟體包。
    [編輯] 安裝多媒體解碼器(待改進)

    安裝下面這些解碼器,常見的多媒體格式基本都可以播放了僅適合x86,ppc的請參見另外文件。

    加入Medibuntu repository源

    sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

    加入GPG key並刷新軟體庫

    wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

    因為法律的原因,Ubuntu的軟體倉庫默認不加入私有軟體,但是在這些軟體當中有很多是我們所必需的。Medibuntu repository源里就有很多非自由軟體,加上這個源我們可以解決很多多問題。這個源里包括的軟體包有Acrobat Reader、GoogleEarth、Opera 瀏覽器、w32codecs、Real Player、Skype等。你可以在這裡查看或下載到全部軟體包。下面幾個軟體包是我們設置Ubuntu多媒體應用環境安裝解碼器所必須的,現在給大家簡單介紹一下:

    * libdvdcss2軟體包就可以獲得額外的在DVD支持,關於libdvdcss2的信息你可以在這裡查看。
    * libxine1-ffmpeg和libxine1-plugins軟體包Totem-xine電影播放器重要後台支持。
    * w32codecs、gcc-3.3-base和libstdc++5軟體包:w32codecs是xine引擎里重要的解碼器包。w32codecs依賴gcc-3.3-base和libstdc++5軟體包工作。

    解碼器的安裝步驟很簡單,第一步安裝libdvdcss2,命令如下:

    sudo apt-get install libdvdcss2

    第二步,為以xine為後台引擎的totem電影播放器添加多媒體格式支持安裝 libxine1-ffmpeg和libxine1-plugins :

    sudo apt-get install libxine1-ffmpeg libxine1-doc libxine-doc libxine1-plugins

    命令執行後將會自動安裝 libmodplug0c2 libmpcdec3 libpulse0 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxcb1 libxine1 libxvmc1 libxine1-console libxine1-gnome等軟體包。

    第三步,安裝w32codecs軟體包為以xine為後台引擎的totem電影播放器添加更多的多媒體格式支持其中包括Real Media、MPEG等:

    sudo apt-get install w32codecs gcc-3.3-base libstdc++5

    完成,以xine為後台引擎的totem電影播放器可以播放mpeg,avi,mp3,wma,wmv,rmvb等格式的電影及音頻。安裝時如果出現需要輸入[Y/n]或[y/N],一律輸入y並回車。
    [編輯] Xine前端播放器設置問題

    如果使用xine引擎的播放器,如kaffeine,gxine,totem-xine等在播放有些rmvb文件的時候可能會出現沒有聲音的現象(如果你沒遇到,就不要進行這一步了),解決辦法如下:

    首先關閉播放器,然後使用你喜歡的文本編輯器,比如 kate,gedit,vim等打開文件 ~/.xine/catalog.cache,(比如 gedit ~/.xine/catalog.cache)打開該文件。找到其中的

    /usr/lib/xine/plugins/1.1.7/xineplug_decode_real_audio.so

    代碼段,將其下的 decoder_priority 的數值修改成 10

    修改完畢後這一段應該看起來是這樣子的

    /usr/lib/xine/plugins/1.1.7/xineplug_decode_real_audio.so
    ....
    ....
    decoder_priority=10

    [編輯] 安裝mplayer播放器(可選)

    sudo apt-get install mplayer-fonts mplayer mplayer-skins mozilla-mplayer

    在開始用它進行視頻播放前還需要進行以下設置(先啟動它),然後右鍵彈出主菜單 -> Preferences/屬性 -> Video/視頻,在"Available drivers/可用驅動"中選擇"x11"或"xv",在同一窗口下半部份鉤上"允許掉幀/Enable frame dropping"。
    [編輯] 安裝英漢辭典

    如果出現需要輸入[Y/n]或[y/N],一律輸入y並回車。

    Ubuntu

    sudo apt-get install stardict stardict-cdict-gb stardict-cedict-gb stardict-hanzim stardict-langdao-ce-gb stardict-langdao-ec-gb stardict-oxford-gb stardict-xdict-ce-gb stardict-xdict-ec-gb

    安裝完成後的快捷方式在(應用程序 -> 附件 -> 星際譯王)

    Kubuntu

    sudo apt-get install sox stardict-gtk stardict-common stardict-cdict-gb stardict-cedict-gb stardict-hanzim stardict-langdao-ce-gb stardict-langdao-ec-gb stardict-oxford-gb stardict-xdict-ce-gb stardict-xdict-ec-gb

    安裝完成後的快捷方式在(主菜單 -> 附件 -> 星際譯王)


    如果需要給stardict添加更多的詞庫或真人發音,請訪問星際譯王


    [編輯] 安裝設置Firefox瀏覽器
    [編輯] 安裝flash播放插件

    * 如果你能連接國外網站並支持https,請執行:

    sudo apt-get install flashplugin-nonfree

    如果不滿足條件而你不幸誤執行了以上命令,並看到類似下面的消息:

    正在設置 flashplugin-nonfree (9.0.48.0.0ubuntu1~7.04.1) ...
    Downloading...
    --20:47:05--
    http://fpdownload.macromedia.com ... all_flash_player_9_
    linux.tar.gz
    => `./install_flash_player_9_linux.tar.gz'
    Resolving fpdownload.macromedia.com... 122.252.42.70
    Connecting to fpdownload.macromedia.com|122.252.42.70|:80...

    那麼請Ctrl+c結束,然後

    sudo apt-get remove --purge flashplugin-nonfree

    * 如果不能連接國外網站或不支持https,請到http://ftp.ubuntu.org.cn 下載

    下載後安裝:

    tar -zxvf install_flash_player_9_linux.tar.gz
    cd install_flash_player_9_linux/
    sudo ./flashplayer-installer

    [編輯] 安裝插件/擴展

    查看firefox當前所安裝的插件,在地址欄中輸入:

    about:plugins

    從這個地址安裝多線程下載擴展downthemall :

    http://addons.mozine.cn/firefox/89/

    從這個地址安裝在線觀看視頻擴展mediawarp :

    http://addons.mozine.cn/firefox/116/

    從這個地址安裝廣告過濾擴展Adblock_Plus:

    http://addons.mozine.cn/firefox/125/


    如果你對第三方Firefox發行版Swiftfox感興趣,請訪問Swiftfox瀏覽器
    [編輯] 安裝支持BT/電驢/Gnutella1/Gnutella2等下載軟體
    [編輯] 安裝BT下載軟體

    1. 在Ubuntu中,打開終端,執行以下命令,或使用新立得,在其中搜索deluge-torrent並標記安裝。

    sudo apt-get install deluge-torrent

    安裝完成後的快捷方式在應用程序 -> Interne t-> Deluge BitTorrent Client,該軟體支持Bit Torrent協議。

    2. 在Kubuntu中,打開終端,執行以下命令,或使用Adept manager,在其中搜索ktorrent,並標記安裝。

    sudo apt-get install ktorrent

    安裝完成後的快捷方式在應用程序 -> Internet -> Ktorrent,該軟體支持Bit Torrent協議。
    [編輯] 安裝電驢下載軟體(可選)

    安裝支持p2p/ftp/http的下載軟體mldoneky。

    在Ubuntu中,打開終端,執行以下命令,或使用Adept/新立得,在其中搜索並標記安裝。

    sudo apt-get install kmldonkey mldonkey-server

    安裝過程中,需要用戶配置是否在開機時自動啟動:

    mldonkey-server(Launch MLDonkey at startup?

    這時建議選擇"是",以方便進行配置。若選擇是以後,在接下來的配置過程中對大部份選項都用默認設置,不過在設置的帳號密碼時,最好重新設置下。安裝完mldonkey以後,若想開機不自行啟動mldonkey-server,可以運行sudo dpkg-reconfigure mldonkey-server進行設置。

    當完成kmldonkey mldonkey-server的安裝以後,可以在firefox或者konqueror等瀏覽器的地址欄里輸入http://127.0.0.1:4080/ 來直接訪問mldonkey,也可以使用快捷方式(應用程序 -> Internet -> KMLDonkey)。

    mldonkey預設只支持電驢(edonkey2000)協議,若要支持BT/ftp/http/Gnutella等協議,需自行在配置菜單里開啟。詳細步驟請參考文檔或自行摸索

  • [火星人 ] ubuntu 快速設置指南已經有717次圍觀

    http://coctec.com/docs/linux/show-post-181940.html