Debian newbie is coming to me ---- actual exercise

xiaoxiao2021-03-06  41

[Copyright Information]

Source: Linuxfire

Contact: Master@linuxfire.com

Version: 0.2

Copyright: GPL

Reprint, please indicate from Linuxfire and LinuxSir

Finally, modified: January 20, 2004 (not updated, please pay attention :)

test environment:

Debian Sid XFree86 4.3 FVWM

This article is the sister of "Debian novice and I come to me ---- theoretical counseling", because my theory has not passed, so I write practical experience, it is inevitable, I hope to have more opinions.

Before Chinese, I assume that you have installed basic systems and X windows, if you haven't done it yet, please refer to the link below:

Http://www.linuxsir.com/bbs/showthr.&threadid=14937

1, install the language environment locale

Apt-get install locales # Note Yes

If you have already installed, you need to change, please use the following command:

DPKG-RECONFIGURE LOCALES # DPKG-Reconfigure is a very common tool in DPKG

In the configuration form, we just choose two local:

[*] EN_US ISO-8859-1 # American English, with ISO-8859-1 Western European character set, En_GB is English English

[*] zh_cn.gbk GBK # 简体 中文 车 基 based on GBK

Reference article:

Http://www.cs.u.nl/wais/html/na-di...-1-charset.html

If you have no concepts for Locale, please refer to the article "Linux International Localization and Chinese Chemical"

http://www.opencjk.org/~yumj/i18n.html

2, I am used to starting X with the startX script, writing the passing to it parameters and environment variables to a file

.xsession, this file is stored in the current user's home directory,. Head, so hide, use ls -a to see, if you don't have yourself.

edit

~ / .xsession file, add similar statement

Language = zh_cn.gbklang = zh_cn.gbklc_all = zh_cn.gbkexport language lang lc_allexport xmodifiers = @ im = fcitxfcitx & exec fvwm2killall fcitx

If you are handmade, for Bash available commands:

$ set lang = zh_cn.gbk $ export lang $ set lc_all = zh_cn.gbk $ export lc_all $ echo $ LANG $ Echo $ lc_all $ ...

After configuring, use

Locale command check, the example is as follows:

$ LocaleLANG = zh_CN.GBKLC_CTYPE = "zh_CN.GBK" LC_NUMERIC = "zh_CN.GBK" LC_TIME = "zh_CN.GBK" LC_COLLATE = "zh_CN.GBK" LC_MONETARY = "zh_CN.GBK" LC_MESSAGES = "zh_CN.GBK" LC_PAPER = " zh_CN.GBK "LC_NAME =" zh_CN.GBK "LC_ADDRESS =" zh_CN.GBK "LC_TELEPHONE =" zh_CN.GBK "LC_MEASUREMENT =" zh_CN.GBK "LC_IDENTIFICATION =" zh_CN.GBK "LC_ALL = zh_CN.GBK3,

/ etc / environment

Join

LANG = zh_cn.gbk

(Someone wants to ask, why written above, here is still written,: (I don't know, anyway, useful :)

/ etc / environment Here you can write some environment variables, the same

~ / .bashrc, but the system is read.

For example, I can set up ftp_proxy and http_proxy two environment variables.

......

FTP_Proxy = http: // local-proxy: port /

http_proxy = http: // local-proxy: port /

Export ftp_proxy http_proxy

......

Reference article:

http://www.unet.univie.ac.at/aix/fi...environment.htm

4, Locale settings in the fcitx input method

The installation options are two, one is the official version 1.8.5 of Debian, and the other is an unofficial version 2.0.1.

(1) Install the FCITX 1.8.5 from Debian

Apt-Get Install Fcitx

Run Fcitx, there is a .Gwubi directory at ~ /.

vi ~ / .gwubi / profile

Check if it is

EN_CN.GBK

(2) Install an unofficial FCITX 2.0.1

Add in /etc/apt/sources.list

Code:

Deb http://211.92.88.40/APT/debian/ SID / I386 /

Then execute

Code:

Apt-get update; Apt-Get Install FcitX

This non-official package display font default uses Wen Ding, the user setting of FcitX 2.x is in% home / .fcitx.

5, configure XFree86, use the XTT module to remove the Freetype module

$ dpkg-reconfigure xserver-xfree86 ...... [] freetype ...... [*] xtt ......

6, install font rendering engine and management tool, and related Chinese fonts

Software Description:

Her generation:

XTT (Traditional X Font Server, XFree86 with Module)

Defoma

Defoma - Debian Font Manager - Automatic Font Configuration Framework

Never write a font, let DEFOMA help you manage it.

DFONTMGR - GUI FRONTEND for DEFOMA, Debian Font Manager

A very convenient graphical Defoma font management tool PSFONTMGR - Postscript Font Manager - Part of Defoma, Debian Font Manager

X-TTCIDFONT-CONF - Configure TrueType and Cid Fonts for X.

New generation:

XFT2

Fontconfig

Fontconfig - Generic Font Configuration Library

Libxft2 - Advanced Font Drawing Library for x

LIBXFT2-Dev - Advanced Font Drawing Library for X (Development Files)

LIBPANGO 1.0-0 - Layout and Rendering of Internationalized Text

Automatic Chinese Coding Conversion Tool:

ZH-AutoConvert - Chinese Hz / GB / BIG5 / UNI / UTF7 / UTF8 EncoDings Auto-Converter

GPL font:

TTF-ARPHIC-BSMI00LP: Wen Ding PL fine Shanghai Song (BIG5 code)

TTF-ARPHIC-BKAI00MP: Wen Ding PL Chinese (BIG5 code)

TTF-ARPHIC-GBSN00LP: Wen Ding PL Briefing Song (GB Code)

TTF-ARPHIC-GKAI00MP: Wen Ding PL Ji (GB Code)

Other fonts, please see:

http://www.debian.org/intl/en/software

XFONTS-INTL-Chinese - International Fonts for x - Chinese.

XFONTS-INTL-Chinese-Big - International Fonts for X - Chinese Big.

Chinese help:

Doc-linux-zh-s - linux howtos and mini-howtos in Simplified Chinese in HTML

ManPages-EN - Chinese Manual Pages

$ Apt-get install defoma dfontmgr psfontmgr x-ttcidfont-conf fontconfig libxft2 libxft2-dev libpango1.0-0 zh-autoconvert ttf-arphic-bsmi00lp ttf-arphic-bkai00mp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp xfonts-intl- Chinese Xfonts-Intl-Chinese-Big Doc-Linux-EN-S MANPAGES-EN

7. Brief introduction:

GTK1 program

XTT DEFOMA to process fonts, backward compatible

GTK2 program

FontConfig / XFT2 to process fonts, future trends

Currently, there are two subsystems with different characteristics:

- Original (more than 15 years of history) subsystems are called "core X-letter subsystems". The font drawn by this subsystem is not a smoothing font, which is processed by the X server, name is similar:

-MISC-FIXED-Medium-R-NORMAL - 10-100-75-75-C-60-ISO8859-1

- The new font subsystem is called "fontconfig". It allows applications to use font files directly. FontConfig is often used with the "XFT" library, which allows applications to draw smoothed fonts on the screen. Fontconfig displayed fonts more "people love". Over time, FontConfig / XFT will replace the core X-letter subsystem. Currently, uses of QT 3 or GTK 2 toolkit (including KDE and GNOME applications) using Fontconfig and XFT font subsystems; other parts of the program (such as XMMS, GIMP) are still using core X fonts.

Debian (including redhat) may only support FontConfig / XFT in the future to replace traditional font servers in the future.

Note: There are two exceptions to the font subsystem usage listed above. They are openoffice.org (using its own font drawing techniques) and mozilla (using fontconfig, but not gtk 2).

(The above text is taken from the online forum)

8, use M $ font

First prepare the following fonts (Win users to C: / Windows / Fonts / Copy):

Simsun.ttc mingliu.ttc simhei.ttf tahoma.ttf

Other fonts see you need, if you are trouble, just copy SIMSUN.TTC

CD / USR / Share / FONTS / TRUETYPE /

Mkdir DIY

To save custom fonts here, you can add, copy fonts to this directory.

1) Let's let's let

Defoma to manage these fonts:

Each font requires a Hints file, in order to facilitate everyone, I have two common hints:

http://211.92.88.40/public/xft/ttf-dynalab-simsun.hints

Http://211.92.88.40/public/xft/ttf --...b-mingliu.hints

Download them to a directory, now we register each font hints file to Defoma

DEFOMA-FONT REGISTER-All TTF-DYNALAB-SIMSUN.HINTS

DEFOMA-FONT REGISTER-All TTF-DYNALAB-MINGLU.HINTS

How to know if registration is successful, you can use DFONTMGR to look at it, absolutely simple.

modify

/ etc / x11 / xf86config-4 file, mainly in this two files to increase font path, of course, in this file in XF86Config-4, use XTT instead of FreeType to render fonts.

Add path:

FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/trueType"

Fontpath "/VAR/LIB/defoma/x-ttcidfont-conf.d/dirs/cid"

For information on Hints, please see the article:

Losska wrote:

Http://www.linuxsir.com/bbs/showthr...ighlight=defoma

Classic tutorial: painless start

Http://linux.nctu.edu.tw/web/moto/t...tall-guide.html

2) let

FontConfig to manage fonts

Adding new fonts to the Fontconfig font subsystem is relatively simple, fontconfig uses configuration files

Font.conf.

Here, I will pay attention, because Debian provides a few packages in Mozilla, it is slightly unstoppable, there will be garbled, and several high people have made a few patches, please download here: in /etc/apt/sources.list Add to

Code:

Deb http://211.92.88.40/APT/debian/ SID / I386 /

If you have added this line when you install FCITX 2.0.1, you don't have to repeat it.

Then execute

Code:

APT-GET Update; Apt-Get Install Libxft2

Execute again

Code:

Wget http://211.92.88.40/~carlos/setting_files/dot_fonts.conf -o $ homen / .fonts.conf

The above $ home / .fonts.conf is a minimal setting of the user's personal, if you want other users to use the same settings, copy this file to its $ home directory.

Separate users can copy new fonts into the ~ / .fonts / directory.

After copying the new font, use fc-cache to update the font information cache:

As root: $ fc-cache -f -vas user $ fc-cache -v

or

$ FC-Cache

( here should be / usr / share / fonts / or ~ / .fonts / directory.)

other:

(Stay further verified)

If the font file name ends with ".gz", it indicates that it is compressed using Gzip, so it must be used.

After gunzip decompression, the Fontconfig font subsystem can use this font.

Example: Bitmap Fonts in xxxxx.pcf.gz

* Copy the corresponding xxxxx.pcf.gz to a new directory

* Unzip file gzip -d xxxxx.pcf.gz into xxxxx.pcf.gz

* Built

path in /etc/fonts/fonts.conf, so that XFT can find Fonts

* Run FC-Cache -f -V

9, exit X, StartX

Adjust the font of each software to you.

Note that the GTK1 program has to be modified a place:

If you change the system's font to a Simsun font, you need to modify

The font settings in the /etc/gtk/gtkrc.zh_cn file:

STYLE "gtk-default-zh-cn" {fontset = "-adobe-helveliica-medium-r-normal - 14- * - * - * - * - * - ISO8859-1, / - DYNALAB-SIMSUN-Medium- R-NORMAL - 14 - * - * - * - * - * - GBK-0, FIXED "} Class" gtkwidget "style" gtk-default-zh-cn "

Note: "- DYNALAB-SIMSUN-Medium-R-Normal - 14 - * - * - * - * - * - GBK-0" is already in your system, if you use the Hints provided above, then fill This will not be wrong. If you are Hints you have, then you first use DFONTMGT.

Quit X, StartX Again.

10, what do I think about? It seems that it is gone :) Yes, thank Carlos and Losska, they are teaching, I am just a pen, I hope that I will not be too bad, I can understand it!

Screen capture:

Http://211.92.88.40/Home/carlos/200...9x523_scrot.pngettp://211.92.88.40/photos/screensh...4x768_scrot.png

http://211.92.88.40/photos/screensh...4x768_scrot.png

http://211.92.88.40/photos/screensh...4x768_scrot.png

http://211.92.88.40/photos/screensh...4x768_scrot.png

http://211.92.88.40/photos/screensh...4x768_scrot.png

The above screenshot FVWM forms have been grabbed, so the title bar is garbled.

11, supplement

1) Use the BitStream font to beautify the menu bar

Everyone may notice that my Mozilla-Firebird menu bar is shining, not beautiful enough.

Swarf SEV3N brothers in IRC, I proposed this question and recommended the BitStream fonts with Debian, simply installed, and found that there is a significant effect, and there are many.

Thank you here for SEV3N!

basic introduction:

The BitStream Vera Family font is a free high-quality TrueType font, which is enhanced by BitStream, which is released in DFSG-Free. The aim is to fill the free desktop environment without free high quality font.

Completely covers Western Europe (ISO-8859-1, ISO-8859-15) and Turkish (ISO-8859-9). Also contain some mathematics and other symbols, improved support for Eastern European language (Part ISO-8859-2) ).

installation:

Apt-Get Install TTF-BitStream-Vera

Installation is Fontsconfig to help you manage it.

Check if you are properly installed

$ FC-LIST

NSIMSUN: Style = regular

BitStream Vera Sans Mono: Style = Boldbitstream Vera Sans: Style = Oblique

SIMSUN: Style = Regular

BitStream Vera Sans: Style = Roman

Ar Pl Kaitim GB: Style = Regular

BitStream Vera Sans Mono: Style = Oblique

Tahoma: style = regular

BitStream Vera Sans: Style = Bold

Ar Pl Kaitim Big5: Style = Regular

PMINGLIU: style = regular

BitStream Vera Serif: Style = Roman

BitStream Vera Sans Mono: Style = Bold Oblique

BitStream Vera Sans: Style = Bold Oblique

Tahoma: style = bold

BitStream Vera Sans Mono: Style = Roman

SIMHEI: style = regular

Ar Pl Mingti2l Big5: Style = Reguler

BitStream Vera Serif: Style = Bold

MINGLIU: style = regular

[/ color]

If you have not found, please run

$ fc-cache -v -f

FC-Cache: "/ usr / share / fonts": Caching, 0 Fonts, 1 DIRS

FC-Cache: "/ usr / share / fonts / trueType": Caching, 0 Fonts, 3 DIRSFC-CACHE: "/ usr / share / fonts / trueType / DIY": Caching, 4 Fonts, 0 DIRS

FC-Cache: "/ usr / share / fonts / trueType / Arphic": Caching, 3 Fonts, 0 DIRS

FC-Cache: "/ usr / share / fonts / trueType / TTF-BitStream-Vera": Caching, 10 Fonts, 0 DIRS

FC-Cache: "/ USR / X11R6 / LIB / X11 / FONTS / TYPE1": Skipping, No Such Directory

FC-Cache: "/Root/.fonts": Caching, 7 FONTS, 0 DIRS

FC-Cache: succeeded

In the case of the effect map before and after installation, you carefully look at Mozilla-Fire

Menu bar font and English fonts in the page:

Before installed:

http://211.92.88.40/photos/screensh...4x768_scrot.png

After installation:

http://211.92.88.40/photos/screensh...4x768_scrot.png

Post-writing:

The Chinese under Debian is now perfect, and the process is relatively simple. Now everyone should transfer the center of gravity of learning to the time.

If you are passionate about Chinese, you may wish to study Fontsconfig configuration files such as Fonts.conf.

January 20th version 0.2 (update: carlos):

1. No longer need to modify the font path in /etc/fonts/fonts.conf, because Fontconfig can use the DEFOMA to automatically find fonts installed with Defoma

2. Use $ home / .fonts.conf to complete the font fine adjustment

3. Add to install the FcitX 2.x option

4. Use ~ / .xsession instead of ~ / .xinitrc

转载请注明原文地址:https://www.9cbs.com/read-70988.html

New Post(0)