客製中文版ubuntu livecd 9.04(五)

第三階段

調整設定與最佳化

請注意:以下設定檔的根目錄
/
,都要從光碟系統目錄system/算起


  • firefox設定修改

修改/etc/firefox-3.0/profile/prefs.js加入(注意:版本數字是會變化的)

user_pref("browser.download.useDownloadDir",
false);//
自己決定存檔位置

user_pref("browser.startup.homepage",
"http://icare.moe.gov.tw/");//
首頁設定

user_pref("network.standard-url.encode-utf8",
false);//
可瀏覽big5檔名網頁

user_pref("network.dns.disableIPv6",
true);//
取消ipv6


  • firefox書籤修改

請善用firefox書籤中,匯入及備份(匯出)的指令,選擇備份(匯出)bookmarks.html

再將bookmarks.html複製到/etc/firefox-3.0/profile/(注意:版本數字是會變化的)


  • 時區修正(chroot)

  1. 變換根目錄

  2. 執行tzselect:選擇Asia
    ==> Taiwan


  • dash
    取代
    sh
    增進開機效能(chroot)

dpkg-reconfigure dash


  • 語系支援(chroot)

使用文字編輯器geditvi修改
/var/lib/locales/supported.d/zh

zh_CN.UTF-8 UTF-8

zh_SG.UTF-8 UTF-8

zh_HK.UTF-8 UTF-8

zh_TW.UTF-8 UTF-8

zh_TW.BIG5 BIG5


 

修改/var/lib/locales/supported.d/local

zh_TW.UTF-8 UTF-8


 

修改完畢,變換根目錄,執行locale-gen


  • 重建initrd

有三種狀況需要重建initrd

  1. 系統核心版本有更改:如核心升級、修補….等等

  2. 有修改過/usr/share/initramfs-tools/下面的任何一個檔案

  3. 安裝的套件需要重建initrd


 

作法如下:

  1. 變換根目錄(chroot)

  2. update-initramfs
    -u <
    核心版本編號>

    mkinitramfs -o
    /boot/initrd.gz <
    核心版本編號>

  3. 離開變換根目錄(exit
    chroot)

  4. cp
    ./boot/initrd.img-
    核心版本編號
    ../ISO_ubuntu9.04/casper/initrd.gz


  • 取消桌面Examples

修改/usr/share/initramfs-tools/scripts/casper-bottom/10adduser

尋找以下段落

if [ -L
/root/home/$USERNAME/Examples ]; then

chroot /root
install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/

mv
/root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/

fi


 

if [ -f
/root/home/$USERNAME/examples.desktop ]; then

chroot /root
install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/

mv
/root/home/$USERNAME/examples.desktop
/root/home/$USERNAME/Desktop/

fi

刪除或加上#


 

重建initrd


  • 若桌面不想出現安裝圖示

修改/usr/share/initramfs-tools/scripts/casper-bottom/10adduser

搜尋ubiquity-gtkui.desktop,出現以下段落

for file in
/usr/share/applications/ubiquity-gtkui.desktop
/usr/share/applications/kde/ubiquity-kdeui.desktop; do

if [ -f
"/root/$file" ]; then

chroot
/root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop

chroot
/root install -D -o $USERNAME -g $USERNAME $file
/home/$USERNAME/Desktop/$(basename "$file")

break

fi

done

刪除或加上#


 

重建initrd


  • gconf-editor組態編輯器(chroot),舉例如「桌面圖示」

所有使用gconf-editor的方式,都必須在
/etc/gconf/gconf.xml.defaults/%gconf-tree.xml文字檔中修改相應的值,使用gconftool-2指令,如:

gconftool-2
–direct –config-source
xml:readwrite:/etc/gconf/gconf.xml.defaults –type
值的類型(string
bool…..
)
–set
設定項目
""


  • 桌面圖示(chroot)

首先請參考http://briian.com/?p=5923


變換根目錄


設定電腦圖示顯示:

gconftool-2 –direct
–config-source xml:readwrite:/etc/gconf/gconf.xml.defaults –type
bool –set /apps/nautilus/desktop/computer_icon_visible
"true"


設定家目錄圖示顯示:

gconftool-2
–direct –config-source
xml:readwrite:/etc/gconf/gconf.xml.defaults –type bool –set
/apps/nautilus/desktop/home_icon_visible
"true"


設定網路伺服器圖示顯示:

gconftool-2
–direct –config-source
xml:readwrite:/etc/gconf/gconf.xml.defaults –type bool –set
/apps/nautilus/desktop/network_icon_visible
"true"


設定垃圾桶圖示顯示:

gconftool-2
–direct –config-source
xml:readwrite:/etc/gconf/gconf.xml.defaults –type bool –set
/apps/nautilus/desktop/trash_icon_visible
"true"


  • 時間修正

修改/etc/default/rcS

UTC=yes ==> no


  • 啟動laptop
    mode

修改/etc/default/acpi-support

ENABLE_LAPTOP_MODE=true


  • 讓多核心或
    hyper-threading
    CPU
    開機發揮同步處理功能

修改/etc/init.d/rc

CONCURRENCY=none
==> shell


  • 關閉IPv6

修改/etc/modprobe.d/blacklist.conf

加入

blacklist ipv6


  • 修改桌面預設背景

將背景圖,改成warty-final-ubuntu.png,複製到/usr/share/backgrounds/


  • 修改應用程式的程式名稱

有二種方式,各有優缺點

  1. 修改系統值
    /usr/share/applications/*.desktop
    。優點是:建立新使用者,應用程式的名稱都一樣;缺點是當更新管理員更新完畢,可能會把修改過的名稱改回來。

  2. 修改個人設定值,利用一台ubuntu桌面環境,直接在『應用程式』按右鍵,選『編輯選單』做修改,修改完後,將家目錄的.local目錄以及.config目錄想辦法複製到光碟開機後的家目錄中,或是複製到光碟系統的/etc/skel中。優點是:修改容易;缺點是:安裝一個新的套件時,可能看不到新的套件選單,以及吃容量,甚至更新管理員更新完畢,有些版本編號改變,會找不到程式。


分類: ubuntu Mint LMDE Manjaro。這篇內容的永久連結