Gentoo Chinese Step by step

Source: Internet
Author: User
Tags locale

After installing the Gentoo Linux, display Chinese is the urgent matter, in fact Gentoo's document has done very well, here to remember, next time can be set quickly.

STEP1 Settings Locale

1> edit/etc/locale.gen, add two lines at the end of the ZH_CN. UTF-8 UTF-8 "and" ZH_CN. GBK GBK ", as follows

Zh_cn. UTF-8 UTF-8 ZH_CN. GBK GBK EN_GB. UTF-8 UTF-8

2> run the Locale-gen command to generate the locale:

#locale-gen

3> edit/etc/env.d/02locale, if not then create, add a line "lang=" ZH_CN. GBK "", as follows:

#nano/etc/env.d/02locale # #02locale内容简单如下就ok了 lang= "ZH_CN. GBK "

4> Run env-update Update environment

#env-update

Step2 Install fonts

After STEP1 set the encoding is already Chinese, you can run the locale command view, but because the default font can not display Chinese, but will garbled. So I'm going to change a font.

1> Choose your favorite font, TTC or TTF format, such as imitation SIMSUN.TTC

2> copy to any directory, such as/usr/share/fonts/ttf, and then execute the following font-related commands

#cp Simsun.ttc/usr/share/fonts/ttf/simsun.ttf #cd/usr/share/fonts/ttf #sudo chmod 644 Simsun.ttf #sudo mkfontdir #sudo m Kfontscale

3> Configure the font display for X Window

#编辑配置文件 #nano/etc/x11/xorg.conf #在Files section, no creation, the following "Files" ... Fontpath "/usr/share/fonts/ttf" ... Endsection

4> Update Font configuration

#sudo FC-CACHE-FV

STEP3 Installation Chinese Input Method

1> Update Portage Tree

#emerge--sync

2> Find Scim or FCITX

#emerge--serach SCIM

3> installation Scim-pinyin

#emerge Scim-pinyin

STEP4 display Chinese filename

1> This is actually mounted when no encoding is specified, note that the encoding for the current system is consistent, as follows:

#我locale设置的是gbk, so use gb2312 and, if it is Utf-8, specify UTF8 #mount/dev/sda1/mnt/system-o iocharset=gb2312

After completing these steps, restart KDE, the Chinese environment will be OK ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.