作者:
virushuo发表于 2005-10-14 13:10 最后更新于 2005-10-21 14:10
:按照by-nc-sa的cc协议可转载,拒绝采用“独家” 授权媒介(含网站和平面媒体)转载、引用、链接,除非获得本人许可。转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
笔记本的硬盘坏了之后,心有不甘,后来想想,干脆利用这个机会,换一次操作系统吧。
(以前怪癖中说过,我最不喜欢升级软件,当然也不喜欢重装系统。)
说作就作。以往曾经有一次,被BSD的中文问题搞的晕头转向,这次有点怕,虽然我不在乎系统是否中文,但是处理中文的能力还是必不可少的,否则我怎么写blog,怎么跟别人聊天?
linux在这方面处理的好点,毕竟用的人多,发行版也多。逐个比较了一番,初步选定了Debian,但是我周围没人用过这个版本。怎么办?我想起来我订阅的blog中,有一个叫做“海豚微笑的背后”
的blogger用的是debian,于是,我决定写一封邮件,问问他的感受。邮件发出,以前从来没有过交往,这次我就很冒昧的问了一堆问题。这哥们是个
好人,当天晚上我就收到了他的回信,不仅回答了我的问题,而且还给我推荐了几个不错的站点。嗯,有了这个保证,我顿时信心满满。下载了net-
install cd img,刻了光盘,就等转天新硬盘到手了。
次日中午,dell的工程师来换了新的硬盘。我的linux之旅开始了。
安装非常顺利,debian的安装程序非常好,甚至我认为比win 2000的安装程序还要强大,该配置的东西都配置好了,我觉得对于普通的家庭用户,应该也足可以操作自如了───事实上,所有配置都可以自动完成,顺畅得很。
如果愿意使用经典的gnome的话,应该就可以很顺利的装上,正常使用了。偏偏我不喜欢gnome,太大了。我不需要一套什么都有的工
具,我只是需要一个能运行图形程序的平台而已──否则,我需要用的firefox什么的怎么办?因此,我决定自己安装一个非常简单的icewm。
这时候就出问题了。我先试图从网络上安装一个字体包,不幸出错,报告找不到这个包,但从此以后,无论用apt_get安装什么东西,都
无法进行,不找到这个包,誓死不继续。我用了很多办法想解决这个问题,可惜都不管用。google搜索,只有新闻组里面找到有2个相关的文章,可也都没提
出解决的办法。(转天海豚告诉了我,是因为我没有在source.list里面加入那个站点)
这时候已经是晚上21:00了。
转天我怎么也要用这台机器。这么没头没脑的折腾下去,恐怕不妙。要不干脆换BSD?那个我还熟悉点。最终决定,就这么作了。debian的中文问题解决的不错,于是我找到了相关的配置文件,都看了一遍,大概明白了应该怎么作。想来应该差不多吧。不怕,装了看看。
家里有FreeBSD 5.3 release的光盘,拿出来,开始装。一路顺利。其实FreeBSD的安装程序也很好,但充满了太多的隐喻和吓人的名词,这个无论如何也比不上debian的。
装好之后,按照刚才学到的配置方法配置了一下,果然中文问题顺利解决了。
后面就都很顺利了,安装各种应用程序,重新编译内核。最终终于搭出来了一套我需要的工作环境。
安装的时候,有一些比较特殊的地方,应该注意,记录在此,希望能给其他朋友一些帮助。
1 gtk的中文问题是最烦人的。解决方法很简单,make -DWITH_GTK2 install
这样可以把gtk的程序用gtk2来编译,虽然会多安装很多gtk2的东西,但是gtk2以后肯定也是少不了要装的。
安装好之后,就可以在home目录或~中用.gtkrc-2.0来配置gtk的字体问题了。
2 vim的中文问题,可以在~/.vimrc中配置,加上set encoding=cp936即可
3 其实,台湾的statue有一份chinese how-to 文档,如果真正用心看懂了,基本就不会被中文问题困扰了。我过去虽然读过,但是因为急功近利,没有好好读,结果搞出来那么多问题。
地址在此:http://freebsd.sinica.edu.tw/~statue/zh-tut/index.html
4 发现一个叫做ion的桌面管理器,http://iki.fi/tuomov/ion/,有兴趣的话不妨试试,我现在没那么多时间,恐怕难以深入,不过还是装了,准备闲暇时候抽时间玩一玩。
附:我的一些配置文件
~/.gtkrc-2.0
------------------
style "gtk-default-zh-cn" {
font_name = "Sans 12"
}
class "GtkWidget" style "gtk-default-zh-cn"
~/.vimrc
------------------
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2002 Sep 19
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
"colorscheme desert
set encoding=cp936
set guifont=SimSun\ 12
set shiftwidth=4
set tabstop=4
set expandtab
if has("multi_byte")
set encoding=utf-8
setglobal fileencoding=utf-8
set fileencoding=gb2312
set bomb
set termencoding=gb2312
set fileencodings=ucs-bom,gb2312,utf-8,latin1
" set guifont=-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1
" set guifontwide=-misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1
else
echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
endif
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible" allow backspacing over everything in insert mode
set backspace=indent,eol,startif has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
set backupdir=/usr/local/vibackup
endif
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")" Don't use Ex mode, use Q for formatting
map Q gq" This is an alternative that also works in block mode, but the deleted
" text is lost and it only works for putting the current register.
"vnoremap p "_dp" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif" Only do this part when compiled with support for autocommands.
if has("autocmd")" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endifaugroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
::...
免责声明:
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:
或是邮件反馈可也:
askdama[AT]googlegroups.com
点击注册~> 获得 100$ 体验券:![]()
订阅 substack 体验古早写作:
关注公众号, 持续获得相关各种嗯哼:
![]()
自怼圈/年度番新
![]()
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号: 44049002000656 ...::