Ubuntu 雜記
把最近在玩 Ubuntu 時碰到的一些問題及解決方式,以及一些心得記錄下來
所以算是 “雜記“ 一篇
當然,主要目的還是先記錄下來,免得以後忘了時,要找資料找不到
*安裝一些有的沒的軟體
(基本常用的我就不介紹,底下是一些我比較不常用到的,或許有人會有需要)
cowbell
gnomebaker
goobox
kino
streamtuner
streamripper
stellarium
firestarter
gnome-ppp
pcmanx-gtk
scribus
xchm
acroread
mozilla-acroread
acroread-plugins
planner
build-essential (要自己編譯程式時需要)
bum
sysv-rc-conf
sysvconfig
easyubuntu
rar
wine
pppconfig
pppoeconf
beagle
Opera:
sources.list 中加入:
deb http://deb.opera.com/opera etch non-free
Picasa:
sources.list 中加入:
deb http://dl.google.com/linux/deb/ stable non-free
Sun Java:
$ sudo apt-get install sun-java5-jre sun-java5-plugin
Flash Player:
$ sudo apt-get install flashplugin-nonfree $ sudo update-flashplugin
*安裝一些其他有的沒的字型
$ sudo apt-get install xfonts-intl-arabic $ sudo apt-get install xfonts-intl-asian $ sudo apt-get install xfonts-intl-chinese $ sudo apt-get install xfonts-intl-chinese-big $ sudo apt-get install xfonts-intl-european $ sudo apt-get install xfonts-intl-japanese $ sudo apt-get install xfonts-intl-japanese-big $ sudo apt-get install xfonts-intl-phonetic $ sudo apt-get install gsfonts-x11 $ sudo apt-get install msttcorefonts $ sudo apt-get install ttf-arphic-newsung $ sudo fc-cache -f -v
*安裝中文輸入法
$ sudo apt-get install gcin $ im-switch -z zh_TW -s gcin
*安裝 KDE 桌面環境
$ sudo apt-get install kubuntu-desktop
*安裝 XFCE 桌面環境
$ sudo apt-get install xubuntu-desktop
*dyndns
安裝時就會順便問你一些設定的參數了
$ sudo apt-get install ddclient
若不用 ddclient 也可以用底下的 script 然後再 crontab 去跑也行
#!/bin/sh USERNAME=myusername PASSWORD=mypassword HOSTNAME=myhostname.dyndns.org cd /root/ if [ -f /root/ipcheck.dat ]; then ipcheck -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME else ipcheck --makedat -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME fi
*smbfs and cifs
我家的 file server 有用 samba 分享
所以,在 Ubuntu 下我會用 smbfs 來 mount
但在 FC5 底下卻沒有 smbfs,查了一下才知道,原來是改用 cifs 取代 smbfs 了
*讀寫 NTFS 的問題
因為 NTFS 沒有公開規格,所以,並不建議去 “寫” 到 NTFS 中,有危險性
雖然有一些工具,如 ntfsprogs 等可以使用,不過我還是不太會去用(因為我幾乎沒在用 windows)
與其想在 Linux 去寫入 NTFS 不如找個可以在 Windows 下能去讀寫 ext2/ext3 還比較實在一點
而 Ext2 Installable File System For Windows 就是可以在 Windows 下讀寫 ext2/ext3 的免費軟體
*totem 的 backend
預設似乎是用 gstreamer 當 backend
若改裝 totem-xine (will remove totem-gstreamer)
以 xine 當 totem 的 backend,這樣就可以用到那些 w32codecs 了
$ cd ~/.gnome2/totem-addons/ $ ln -sf /usr/lib/win32/* .
用 totem-xine 感覺比用 tetem-gstreamer 好多了
*Rhythmbox 分享樂庫給 iTunes
先安裝並啟動 avahi-daemon (即 Mac 上的 bonjour)
然後再去分享樂庫即可
在我的 Mac OS X 上,iTunes 一開就找到了分享的樂庫…:)
*Ubuntu 上 hfsplus 不能寫的問題:
Ubuntu Dapper 出廠的 kernel 2.6.15 有 bugs,造成 hfsplus 無法寫(只好等新版的 kernel 出來)
所以,除非要把 hfsplus 的 journal disable 掉才能在目前的 Ubuntu Dapper 上可以寫入 (太麻煩了)
*update-alternatives
剛裝好的系統,還是先跑過一次
$ sudo update-alternatives --all
而 galternatives 則是其 GUI
*pmount
有些熱插拔的裝置,無法寫入的問題,就要使用 pmount or 修改 /etc/pmount.allow 來增加權限
把裝置名稱加入去即可,一行一個裝置
*如何新增 zh_TW.Big5 的 locale:
編輯 /var/lib/locales/supported.d/zh 然後加入:
zh_TW.Big5 Big5
接著再執行:
$ sudo locale-gen
*重新設定 X
$ sudo dpkg-reconfigure xserver-xorg
*使用 Alternative CD 安裝到一半黑幕的問題
記得一開始要先選好解析度(1024×768@32bit or 1024×768@16bit)
*在 Ubuntu 下 rebuild 及打包 deb 套件
$ sudo apt-get install build-essential checkinstall $ sudo apt-get build-dep [package] $ cd package $ ./configure ; make $ sudo checkinstall
*修正字型的問題:
我是沒遇到這個問題啦
$ sudo ln -sf /usr/share/language-selector/fontconfig/zh_TW /etc/fonts/language-selector.conf
*修正更新管理員無法啟動的問題:
$ cd /usr/share/locale-langpack/zh_TW/LC_MESSAGES/ ; sudo mv update-manager.mo update-manager.mo.orig
*一些不錯的 Repository
PLF repos:
deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free
deb-src http://packages.freecontrib.org/ubuntu/plf dapper free non-free
Automatix repos:
deb http://automatix.czessi.net/packages dapper stable
deb-src http://automatix.czessi.net/packages dapper stable
Xgl + Compiz repos:
deb http://www.beerorkid.com/compiz dapper main
deb-src http://www.beerorkid.com/compiz dapper main
deb http://xgl.compiz.info/ dapper main
deb-src http://xgl.compiz.info/ dapper main
*撥放 DVD
要裝 libdndcss2 (PLF repos 有提供)
*如何建設給 apt 使用的 Ubuntu Repository:
參考
http://www.debian.org/doc/manuals/repository-howto/repository-howto.en.html
弄那個 Automatic Repository 實在有夠麻煩的,所以,還是先搞 Trivial Repository 比較簡單
Trivial Repository: (我使用 ftp,ftp home 在 /var/ftp )
deb binary 都放到 binary-ppc 底下 (我在 ibook 上包的 deb)
source 放在 source 目錄底下
$ sudo mkdir -p /var/ftp/ubuntu/{binary-ppc,source}
$ cd /var/ftp/ubuntu
$ sudo apt-ftparchive packages binary-ppc | gzip -9c > binary-ppc/Packages.gz
$ sudo apt-ftparchive sources source | gzip -9c > source/Sources.gz
*在 iBook 上 yaboot 出問題時的 rescue
在 open firmware 底下執行:
0 > boot hd:4,yaboot
(我的 Ubuntu 是裝在 partition 4)
7月 19th, 2006 at 11:11 am
>*如何新增 zh_TW.Big5 的 locale:
>編輯 /var/lib/locales/supported.d/zh 然後加入:
>zh_TW.Big5 Big5 ……
請問增加zh_TW.Big5 的 locale是為了??
謝謝你
7月 19th, 2006 at 11:16 am
若沒有必要,是不需要增加 zh_TW.Big5 的 locale 的,使用 zh_TW.UTF-8 的 locale 即可
除非是在一些特殊情況下,如要使用只支援 zh_TW.Big5 locale 的程式或 Window Manager 時,由於系統預設沒有 zh_TW.Big5 的 locale,因此,只好自己產生了
7月 19th, 2006 at 2:48 pm
了解!你這裡真是好地方!保持下去:)