字型篇

打算開始寫這一系列的文章,原因是因為白底黑字的預設值,讓我看久了眼睛好酸...
還有那密密麻麻的字型.......會讓人家發瘋呀!!!!
參考文章: Emacs字体设置

第一篇先來說怎麼改字型吧....

1. #emacs /etc/X11/xorg.conf
Section "Module"
         ......
         Load "freetype"
         ......
EndSection
Section "Files"
         ......
         FontPath "/usr/share/fonts/truetype/"
         ......
EndSection
2.restart Xwindow
3.xlsfonts |grep (想用的字型)
例如:
Landau:/home/zcli# xlsfonts |grep inconsolata
-unknown-inconsolata-medium-r-normal--0-0-0-0-c-0-iso10646-1
-unknown-inconsolata-medium-r-normal--0-0-0-0-c-0-iso8859-1
-unknown-inconsolata-medium-r-normal--0-0-0-0-c-0-iso8859-15
-unknown-inconsolata-medium-r-normal--0-0-0-0-m-0-iso10646-1
-unknown-inconsolata-medium-r-normal--0-0-0-0-m-0-iso8859-1
-unknown-inconsolata-medium-r-normal--0-0-0-0-m-0-iso8859-15
4.改成如下
-unknown-inconsolata-medium-r-normal--*-*-*-*-m-*-fontset-inconsolata
注意,用 xlsfonts 列出来的字体名称中,有些字段为 0,这些是可缩放的向量
字体,这些 0 不能保留,必须用数字或 `*' 号取代 
不過建議是用fixed字體來編寫程式會比較合適
 
方法1:啟動時加入
 
1.#emacs ~/.emacs
(create-fontset-from-fontset-spec
 (concat
  "-unknown-inconsolata-medium-r-normal--*-*-*-*-m-*-fontset-inconsolata,"
  "chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gb2312*-*,"
  "mule-unicode-0100-24ff:-*-simsun-medium-r-*-*-14-*-*-*-c-*-iso10646*-*,"
  "korean-ksc5601:-*-*-medium-r-*-*-14-*-*-*-*-*-ksc5601*-*,"
  "chinese-cns11643-5:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
  "chinese-cns11643-6:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
  "chinese-cns11643-7:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
  "sjis:-*-medium-r-normal--14-*-jisx0208*-*"))
後面各段格式都是『字符集:字體』
第一段是指定ASCII英文字型
第二段則是中文也就是gb2312的字型
 
2.(set-default-font "fontset-inconsolata")
 
3.(setq default-frame-alist
      (append
       '((font . "fontset-inconsolata")) default-frame-alist))
 
方法2:寫入defaults
1.#emacs ~/.Xdefaults
 Emacs.Fontset-0:-unknown-inconsolata-medium-r-normal--*-*-*-*-m-*-fontset-inconsolata,\
 chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-*-*,\
 mule-unicode-0100-24ff:-*-simsun-medium-r-*-*-14-*-*-*-c-*-iso10646*-*,\
 korean-ksc5601:-*-*-medium-r-*-*-14-*-*-*-*-*-ksc5601*-*,\
 chinese-cns11643-5:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,\
 chinese-cns11643-6:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,\
 chinese-cns11643-7:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,\
 sjis:-*-medium-r-normal--14-*-jisx0208*-*
 
 Emacs.font: fontset-inconsolata
 
2.# xrdb -merge ~/.Xdefaults
PS.要解除defaults的話就
# xrdb -remove ~/.Xdefaults 
 
Emacs 23 ( 我直接貼上來的...因為Debain目前只到22...留著參考)
Emacs23的字体设置与上述方法类似,但也有所不同。或许是因为emacs23的实现 比较独特,或许是emacs23的bug,按上述方法指定的中文字体无法起作用。因此, emacs23的字体设置采用下述方法:
仍然采用 create-fontset-from-fontset-spec 创建 fontset:
(create-fontset-from-fontset-spec "-*-courier-medium-r-normal-*-14-*-*-*-*-*-fontset-courier") (set-default-font "fontset-courier") (setq default-frame-alist (append '((font . "fontset-courier")) default-frame-alist))
也可以在 ~/.Xdefaults 中这样设置:
Emacs.Fontset-0:-*-courier-medium-r-normal-*-14-*-*-*-*-*-fontset-courier Emacs.font:fontset-courier
两种方法取其一即可。 

但是设置中文字体时,采用 set-fontset-font 分别指定各种 script 的字体:
(set-fontset-font "fontset-default" nil "-*-simsun-*-*-*-*-14-*-*-*-*-*-gb2312.1980-*" nil 'prepend) (set-fontset-font "fontset-courier" 'kana "-*-simsun-*-*-*-*-14-*-*-*-*-*-gbk-0" nil 'prepend) (set-fontset-font "fontset-courier" 'han "-*-simsun-*-*-*-*-14-*-*-*-*-*-gbk-0" nil 'prepend) (set-fontset-font "fontset-courier" 'cjk-misc "-*-simsun-*-*-*-*-14-*-*-*-*-*-gbk-0" nil 'prepend)
 

Debian 字型

首先還是要把參考文章列出來:
Tsung's Blog
其實一開始是想把Debain的字型換成unbuntu的那種,也就是『Monaco Font』
首先就是下載字型吧 : Return of Monaco.ttf 

# cp monaco.ttf /usr/share/fonts/truetype/
# fc-cache -f -v  

然後就可以切換字型了
另外Tsung的文中還有提到其他好用的字型:
1.Debian 也新推出一個 Terminal 專用字型(apt-get install ttf-inconsolata)
2.Consolas
3.另外也記一下種Debain用的terminal字型(apt-get install xfonts-terminus)
Tsung言:
PS: 想挑字型太累, 可以: apt-get install gnome-specimen , 用 gnome-specimen 來挑喜歡的字型來用比較快唷

另外,一些中文字型的設定可以參考下面這篇文章!真的是寫的超好的
http://wiki.ubuntu-tw.org/index.php?title=UbuntuL10n
Debainfonts
fontconfig

有要看的文章:
如何裝ms字型

掛載隨身硬碟的好工作!

就是你了!還看!

ntfs-3g

當debain不會自動掛載隨身碟的時候…
就要靠它啦!

#apt-get install ntfs-3g

commond:
mount
ntfs-3g /dev/sda1 /mnt/windows
unmonut
umount /mnt/windows

剩下其他指令可以查看
http://linux.die.net/man/8/mount.ntfs-3g
最後給自已一個tip
-o locale=zh_TW.utf8 (繁中)
-o locale=zh_CH.utf8 (簡中)
如此一來,沒辦法顯示中文的問題就解決了

ntfs-3g /dev/hda1 /windows/C/ -o silent,umask=0,locale=zh_TW.utf8

搞不懂的ubutnu

拿ubuntu的source.list安裝一些東西,結果debian不能上網了.......
好像root端被殺了.............. 
先不談拿ubuntu的apt來玩debian這件事 
我了解到一件事
原來main之前的單字表示版本>"< 所以說要找不同版本的東西,就改source.list就可以了
10.4
deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-backports main multiverse restricted universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-backports universe main multiverse restricted
9.10

# 國家高速網路與計算中心
deb ftp://os.nchc.org.tw/ubuntu karmic-updates main restricted universe multiverse
deb ftp://os.nchc.org.tw/ubuntu karmic main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-backports main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-proposed main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-security main restricted universe multiverse
deb ftp://os.nchc.org.tw/ubuntu karmic-proposed main universe multiverse restricted
deb ftp://os.nchc.org.tw/ubuntu karmic-security mai
 
9.04 
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty universe
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates universe
 

讓我的"大"A6耳機有聲音

看來許多華碩A系列產品都有這個問題,耳機沒有聲音。
目前測試 debain505 i386
#atp-get install alsa-utils
把以下文字
options snd-hda-intel model=z71v position_fix=1
貼到:
/etc/modprobe.d/alsa-base
看論壇ubuntu要貼到
/etc/modprobe.d/sound

重新開機,搞定!

debian 6
貼到
/etc/modprobe.d/alsa-base
/etc/modprobe.d/alsa-base.conf
/etc/modprobe.d/sound

reboot

linux 常用的播放器

兩個好用的linux音樂播放器

Amarok

Exaile

兩個都非常不錯,而且apt就有了,方便又好用的東西

另外下面留給.......影音播放器>"< 目前還找不到比較好又方便的播放器 不過目前用的Mplayer,debain原有的播放器 想看rmvb可以參考以下網頁

以下內容取自 How to play rmvb in mplayer

This tutorial will take you step by step through installing all of the software necessary to play rmvb (RealMedia Variable Bitrate) files in Ubuntu Linux.
Though the steps and screenshots are specific to Ubuntu, they will likely be similar for other versions of Linux. With that said, be sure to read the MPlayer README file if you’re not using Ubuntu. Similar to some of the other tutorials on Simplehelp, this is almost certainly not the only way to play .rmvb files in Ubuntu, but it’s the easiest way I could find. If you know of a easier method, by all means please feel free to leave a comment.
  1. The first step in playing .rmvb files in Ubuntu is to use the Synaptic Package Manager to install MPlayer. When you mark MPlayer for installation, you’ll be prompted to install additional software packages (if they’re not already installed).
  2. play rmvb files in ubuntu linux click to enlarge
  3. After MPlayer has been installed, exit out of the Synaptic Package Manager and visit the MPlayer binary codec download page. Download the codec package for your platform (for example, if you’re using a 32bit Intel or AMD processor, download the Linux x86 package). Save the file to your desktop (or home folder). Once the download has completed, double-click that file. Select the folder to uncompress, and click the Extract button.
    play rmvb files in ubuntu linux
    click to enlarge

  4. Choose a location to extract the files (your desktop is ideal) and again click Extract.
  5. play rmvb files in ubuntu linux click to enlarge
  6. Make sure the files extracted correctly. They’ll be in a folder titled essential-date.
  7. play rmvb files in ubuntu linux
  8. Open up a Terminal by selecting Applications -> Accessories -> Terminal.
  9. play rmvb files in ubuntu linux
  10. Enter the following commands (and your password when prompted):
    cd Desktop
    cd essential-date
    sudo mkdir /usr/lib/codecs
    sudo cp * /usr/lib/codecs
  11. play rmvb files in ubuntu linux click to enlarge
  12. NOTE: you may need to install libstdc++5 to get .rmvb files to play. Even though it might not be necessary for you, it can’t hurt to install (the package isn’t very big). Run the command: sudo apt-get install libstdc++5 in a Terminal, or use Synaptic and search for libstdc++5. Thanks to everyone who commented (see comments below) for the tip.
  13. Launch MPLayer by selecting Applications -> Sound & Video -> MPlayer Movie Player. Right-click in the Mplayer – Video window and select Preferences from the menu.
  14. play rmvb files in ubuntu linux
  15. Select the Video tab and change the Available drivers: to x11 X11 (XImage/Shm).
  16. play rmvb files in ubuntu linux click to enlarge
  17. Select the Codecs & demuxer tab and change the Video codec family: to RealVideo decoder and the Audio codec family: to FFmpeg/libavcodec audio decoders. When you’re done, click OK and close down MPlayer.
  18. play rmvb files in ubuntu linux click to enlarge
  19. Locate one of your .rmvb files, right-click it and select Properties.
  20. play rmvb files in ubuntu linux
  21. Select the Open With tab and change whatever the default is to MPlayer Movie Player. Click Close.
  22. play rmvb files in ubuntu linux click to enlarge
  23. Double-click any of your .rmvb files and they should open up in MPlayer and start playing.
  24. play rmvb files in ubuntu linux

linux 掛載光碟

#apt-get install fuseiso

#mkdir DVDISO //創造任意一個資料夾

#fuseiso DVD.iso DVDISO //掛載到DVDISO

#cd DVDISO

#fusermount -u DVDISO //卸載