📄 config-howto.txt
字号:
}lesspipe $1 _____________________________________________________________ and remember to make it executable with chmod 755 lesspipe.sh. 切记 将其作为chmod 755 lesspipe.sh下的可执行档。 * 在 /etc/profile中添加: LESS="-M-Q" # long prompt, silent --长提示符、无声LESSEDIT="%E ?lt+%lt. %f" # edit top line --编辑首行LESSOPEN="| lesspipe.sh %s" # filter --过滤器VISUAL=jed # default editor---insert your favourite # 默认编辑器---放入最喜欢的编辑器LESSCHARSET=latin1 # display accented letters if needed # 在需要时,显示重音字符export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET 此处设定变数LESSCHARSET是因为作者居住在义大利,想要使用ISO 8859/1字 符集的缘故,因此美国人、日本人、俄罗斯人等其他各国人士最好不要作此 设定。 3.4 emacs(1) 有些emacs 版本没有预先设置颜色和语法标示。可在.emacs中增添: (global-font-lock-mode t)(setq font-lock-maximum-decoration t) 这只对X11有用。各位不妨从emacs文献中探索符合各种需要的设定 -- 有时可能 要耗费几个月的时间测试.... 3.5 joe(1) 检查/usr/bin/中的jmacs、 jstar、和jpico 是否symlink到joe,或是独立的二 进制程式;如果仍为後者,则不妨将其作出symlink,以节省硬盘空间。 ~# cd /usr/bin/usr/bin# ln -sf joe jmacs ; ln -sf joe jstar ; ln -sf joe jpico 然後只要把/usr/lib/joe/joerc作为.joerc抄到home目录,再作出符合需要的修 改。 3.6 jed 这是个颇为好用的编辑器:比emacs短小精悍,宜於设置,并且IMHO模拟其他编辑 器也相当不错。在作者工作的大学中有许多使用者都用jed模拟VMS系统的编辑 器EDT。 设置文档为.jedrc 和 /usr/lib/jed/lib/*;前者可从後者目录中的jed.rc修改 而得。 * 要使 jed 正确使用一些键位,则编写一个/usr/lib/jed/lib/defaults.sl 档,内容只有一行: () = evalfile("linux"); * 编辑 /usr/lib/jed/lib/linux.sl; 去除Info_Directory = "/usr/info";行 前的注释符号并在UCB_Mailer =; 後添加/bin/mail * 设置jed 的参数使其模拟EDT (或其他编辑器)的工作不难:只须编 辑.jedrc中的几行内容。 如果要用小键盘中的‘+’键删字,而不只删一个 字母,则在.jedrc中() = evalfile("edt");行之後增添下列内容: unsetkey("\eOl");unsetkey("\eOP\eOl");setkey("edt_wdel", "\eOl");setkey("edt_uwdel", "\eOP\eOl"); * 在EDT模拟中,要使xjed使用数字小键盘,则须在.Xmodmap中添加下列内容: keycode 77 = KP_F1keycode 112 = KP_F2keycode 63 = KP_F3keycode 82 = KP_F4keycode 86 = KP_Separator 同时确定/etc/X11/XF86Config中有下列内容: # ServerNumLock # must be commented out --必须取消前面的注释符号 XkbDisable 这项设置适用于XFree3.2。除非使用标准的美国键位键盘,“XkbDisable“ 可能会有一些小问题。不妨自己找找有什麽问题。 * 在.Xdefaults中增加以下内容可以更改xjed的颜色: xjed*Geometry: 80x32+150+50xjed*font: 10x20xjed*background: midnight blue 在xjed.doc文档中有更多这方面的资料。 3.7 TeX and Friends 如果电脑中装有TeTeX,可作下列几项设定: * 如须使用连字符(hyphenation),则可修 改/usr/lib/texmf/texmf/tex/generic/config/language.dat,然後运行: ~# texconfig init ; texconfig hyphen * 如果在/usr/lib/texmf/texmf/tex/latex/下输入文档後才安装LaTeX软件, 则应运行 texhash使TeTeX 认识新软件。 * 如要设定dvips, 则须编辑/usr/lib/texmf/texmf/dvips/config/config.ps 。注意:有关默认分辨率的参数也影响 xdvi的运行;如果每次运行时发现都 要创造字体,则可改动 .Xdefault的内容如下: XDvi*mfmode: 这应有所帮助。 3.8 PPP 目前Linux的内核几乎都已编入了PPP + TCP/IP功能,设定了回送地址 (loopback)和正确安装了pppd软件。那麽有两种方式可使PPP正常运作:(a) 手动设定;和(b)利用一个程式自动设定。首先,试试手动设定。 假定ISP的资料如下: * Phone number: 1234567 --电话号码 * Name server: 123.231.112.111 --域名伺服器地址 * Mail server: mbox.supernet.edu --邮件伺服器地址 * Domain: supernet.edu --域名 * Remote hostname: www.supernet.edu --远程主机名称 * Your username: John --用户姓名 * Your password: _Loo%ny --用户密码 手动设置PPP联网的方式为: * 编制 /usr/local/bin/ppp-on档,将用于与ISP连接: #!/bin/sh# ppp-on: script to connect to an ISP --连接ISP的程式INIT=ATX3 # or whatever your modem wants --或符合特定数据机启动的设置PHONE=1234567/usr/sbin/pppd connect "/usr/sbin/chat '' $INIT OK ATDP$PHONE \CONNECT '' " user John 然後运行chmod 755 /usr/local/bin/ppp-on使其成为可执行档。如果ISP不 使用PAP协议,则可用下列程式: #!/bin/sh# ppp-on: script to connect to an ISP ----连接ISP的程式INIT=atx3 # or whatever your modem wants ----或符合特定数据机启动的设置PHONE=1234567/usr/sbin/pppd connect "/usr/sbin/chat '' $INIT OK ATDT$PHONE \CONNECT '' 'ogin' John 'word' _Loo%ny ''" /dev/modem 38400 \modem defaultroute * 编制/usr/local/bin/ppp-off用于结束PPP连接: #!/bin/sh# ppp-off --文档名称DEVICE=ppp0if [ -r /var/run/$DEVICE.pid ]; then kill -INT `cat /var/run/$DEVICE.pid` if [ ! "$?" = "0" ]; then echo "removing stale $DEVICE pid file." rm -f /var/run/$DEVICE.pid ; exit 1 fi echo "$DEVICE link terminated" ; exit 0fi# link not activeecho "$DEVICE link is not active" ; exit 1 运行chmod 755 /usr/local/bin/ppp-off,使其成为可执行档。 * 编写/etc/ppp/options: # /etc/ppp/options --文档名称/dev/modem38400lockcrtsctsmodemasyncmap 0remotename www.supernet.edudefaultroute * 如果ISP使用PAP协议(多数ISP都使用),则编制/etc/ppp/pap-secrets: # /etc/ppp/pap-secrets --文档名称# username remotehost secret# 用户姓名 远程主机名称 用户密码John www.supernet.edu _Loo%ny * 编辑 /etc/resolv.conf: # /etc/resolv.conf --文档名称search supernet.edunameserver 123.231.112.111 * 编辑 /etc/sendmail.cf。寻找以DS开始的一行,并更改如下: DSmbox.supernet.edu 花了这麽大的力气,如果运气好,有这样的设定就够了。否则,那就准备开始翻 看PPP-HOWTO吧。 以上就是手动设置。不过,现在有一套不错的软件,可免除这项苦差事:这套软 件称为ezppp,可在下列网址找到: [4]http://www.serv.net/~cameron/ezppp/index.html 。 3.9 POP用户端程序 要从POP伺服器收取邮件,可使用POP用户端程序,如fetchpop或 fetchmail等。 如果ISP的PPP伺服器不支持LAST指令,则後者可能是唯一可用的方法。 设置这些用户端程序的方法如下: * fetchpop:首次运行这个软件时会要求提供一些资料。回答所有问题後,就 设定了这个软件。 * fetchmail:参照以下□例 .fetchmailrc: # $HOME/.fetchmailrc --文档名称poll mbox.supernet.edu with protocol pop3; user john there with password _Loo%ny is john here mda "/usr/bin/procmail -f fetchmail" 最後一行并非必需。必须运行chmod 600 .fetchmailrc 设定此档的使用权限 ,否则fetchmail会完全拒绝运行。 3.10 X 视窗系统 一旦X 视窗可以运行後(正确地设定了显示卡等细致工作),就可作出其他各色 各样的设置,完全取决于使用何种视窗管理程序。不过,归根结底,只是编 辑home目录内的一个或几个ASCII文档。至於视窗管理程序: * fvwm:将/etc/X11/fvwm/system.fvwmrc作为.fvwmrc拷贝到home目录,看看 内容并开始试验。这个system.fvwmrc 实在简单,对fvwm至不公平。 * fvwm95-2:将/etc/X11/fvwm95-2/fvwm2rc95作为.fvwm2rc95拷贝到home目录 ,然後进行编辑。这个实例相当好用。 * TheNextLevel:很难设置。将/etc/X11/TheNextLevel/.*拷贝到home目录, 仔细阅读并试改内容。首先试试 .fvwm2rc.defines。 此外,一定要有适当的.xinitrc,例如: #!/bin/sh# $HOME/.xinitrc --文档名称# set a few keys correctly --将几个键位设定正确usermodmap=$HOME/.Xmodmapxmodmap $usermodmapxset s noblank # turn off the screen saver --停止屏幕保护程序xset s 300 2 # screen saver start after 5 min --5分钟後开始屏幕保护程序xsetroot -solid "medium blue" &# rxvt 节省内存,但有几个错误程序:# - 不认home和end两键;# - backspace和delete两键和在主控台时的作用不同;# - 颜色不依照环境参数设定;# - 与环境参数时有冲突;# 因此,多数情况下,xterm比较好用。但rxvt在麦金塔机的一些颜色应用上显示较好。xterm -ls -bg black -fg white -sb -sl 500 -j -ls -fn 10x20 -fb 10x20bold \-title "Color xterm" -geometry 80x25+150+0 &fvwm95-23.11 Fortran 依据经验,代用g77的最好Fortran-to-C翻译器是f2c和前端软件yaf77。 yaf77可从 [5]ftp://sunsite.unc.edu/pub/Linux/devel/languages/fortran/yaf77-1.4.t gz及其镜象网址取得。 3.12 用户设置 新用户在首次登录时,最好已有几个设置文档可用。可将下列设置档放 在/etc/skel中:bashrc、bash_profile、bash_logout、inputrc、less、 xinitrc、fvwmrc、fvwm2rc95、Xmodmap、Xdefaults、jedrc、joerc、emacs。 (注意:由于排版的缘故,上面每个文档前均未放置‘.’符号) 对.pinerc 无法进行充分设定;但至少要设定user-domain、smtp-server 和nntp-server 的参数。 4. 结束4.1 版权声明 (译者注:版权声明不译) Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributedin whole or in part, in any medium physical or electronic, as long as thiscopyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. If you have questions, please contact Greg Hankins, the Linux HOWTO coordinator, at gregh@sunsite.unc.edu via email. 4.2 读者回应 与其他HOWTO相比,这份HOWTO更需要您的建议、批评和支持。不仅是欢迎您提出 意见,而且还请您一定要提出意见。如果您发现有任何遗漏之处,请务必通知我 。如果您用Red Hat之外的其他Linux版本,而各个设置档不同,或置于其他目录 内,也请通知我,以便将其补入。我只希望使Linux愈容易用愈好。 Linux内的软件包罗万象,不可能全部加以说明。请把您的要求或建议限定在“最 合理“的软件□围内。至於什麽是“最合理“的软件,那就只有请您自作判断了 。 4.3 责任声明 ”系统设置-HOWTO“的作者为Guido Gonzato, [6]guido@ibogfs.cineca.it. 对 所有其他HOWTO的作者和编写及保存man使用说明的热心人士我都深致谢意,因为 我时常引用他们的作品,获益良多。 本文“照现在的内容“印发。我已尽力使内容正确无误,但当您使用文内的资料 时,风险自负。我不对使用本文内的资料造成的任何损害承担责任。 (译者声明:译文内容概由译者负责,与原作者无关。译者亦不对使用本文资料 产生的後果负责,特此声明。) 我希望本文对您有用。事实上,每次我在安装Linux时,都发现它很有用。 Guido =8-)References 1. mailto:guido@ibogfs.cineca.it 2. http://www.linuxhq.com/patch/20-p0591.html 3. ftp://sunsite.unc.edu/pub/Linux/kernel/patches/console/noblink-1.7.tar.gz 4. http://www.serv.net/~cameron/ezppp/index.html 5. ftp://sunsite.unc.edu/pub/Linux/devel/languages/fortran/yaf77-1.4.tgz 6. mailto:guido@ibogfs.cineca.it
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -