How to install the shell program from the Chinese character "Mandrake9" in Linux

Source: Internet
Author: User
Article title: install the shell program on the Chinese character "Mandrake9" in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The shell program of Transfer RH8 was modified to run it on the Mandrake9 and the simsun18030 was canceled, because I think the effect of this item is not good, this saves the trouble of downloading from Microsoft, and adds TrueSimSun (my own name). The English font is completely simsun. the English text of SimSun is tahoma.
Unable to test because there is no newly installed machine. Which of the following experts can help you test it?
The Transfer for Redhat8 version is found here.
Http://www.linuxeden.com/edu/doctext.php? Docid = 2629
Copy the source file to this directory. You can put #! /Bin/bash: copy content between reboot to a file, such as sm. sh.
Put it in/usr/local/temp, chmod 755 sm. sh, and make it executable.
Modify the simsun. ttc (. ttf of win98 to ttc), tahoma. ttf, and tahomabd. ttf files.
Copy to the preceding directory and run the script program:./sm. sh.
Then restart and simsun can be used. Note: you must finish the installation without any Chinese characters;
Note that you must use su or root.
The sh. sh script is as follows:
#! /Bin/bash
#
# Simsun font installer for Mandrake9.0
# This is a GPL srept. The content comes form Xiang Yu. Thanks him. And also thanks Transfer.
# Usage:
#1, install MDK9 and select simplified chinese.
#2, make a temple directory in anywhere you prefer.
# For example/usr/local/temp
# Copy 'Where/it/has/the/windows_fonts/simsun. ttc 'and
# All of these fonts, simsun. ttc Tahoma. ttf and tahomabd. ttf
# To this temp place/usr/local/temp
#3. copy this shell script into this directory.
#4. make sure you are root or su and then run it
#5. set the fonts to your most prefered ones in gnome, kde and xmms and others.
# First, put the fonts to the correct dir.
Export CDIR =/usr/X11R6/lib/X11/fonts/TrueType
# Export CDIR =/usr/local/btest
Export XFConfig =/etc/X11/XF86Config-4
# Export XFConfig =/usr/local/atest/XF86Config-4
Export GTKRC =/etc/gtk/gtkrc. zh_CN
# Export GTKRC =/usr/local/atest/gtkrc. zh_CN
Export GNOMERC =/etc/gnome/gtkrc. zh_CN
# Export GNOMERC =/usr/local/atest/gnome/gtkrc. zh_CN
Export FONTSCONF =/etc/fonts. conf
# Export FONTSCONF =/usr/local/atest/fonts. conf
Export CHINPUTAD =/usr/lib/Chinput. ad
# Export CHINPUTAD =/usr/local/atest/Chinput. ad
Export XMMSMO =/usr/share/locale
# Export XMMSMO =/usr/local/atest
Mkdir $ CDIR
# Copy the fonts to it
Cp simsun. ttc $ CDIR/simsun. ttf
Cp t * $ CDIR/
# Copy encodings
Cp/usr/X11R6/lib/X11/fonts/encodings. dir $ CDIR/
# Make the fonts. dir
Echo '52
Simsun. ttf-misc-fixed-medium-r-normal -- 0-0-0-0-c-0-gb18030.2000-0
Simsun. ttf-misc-fixed-medium-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
Simsun. ttf-misc-SimSun-medium-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ai = 0.3: simsun. ttf-misc-SimSun-medium-I-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ds = y: simsun. ttf-misc-SimSun-bold-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ds = y: ai = 0.3: simsun. ttf-misc-SimSun-bold-I-normal -- 0-0-0-0-c-0-gb2312.1980-0
Tahoma. ttf-misc-SimSun-medium-r-normal -- 0-0-0-0-p-0-iso8859-1
Ai = 0.3: tahoma. ttf-misc-SimSun-medium-I-normal -- 0-0-0-0-p-0-iso8859-1
Tahomabd. ttf-misc-SimSun-bold-r-normal -- 0-0-0-0-p-0-iso8859-1
Ai = 0.3: tahomabd. ttf-misc-SimSun-bold-I-normal -- 0-0-0-0-p-0-iso8859-1
Simsun. ttf-misc-SimSun-medium-r-normal -- 0-0-0-0-p-0-gbk-0
Ai = 0.3: simsun. ttf-misc-SimSun-medium-I-normal -- 0-0-0-0-p-0-gbk-0
Ds = y: simsun. ttf-misc-SimSun-bold-r-normal -- 0-0-0-0-p-0-gbk-0
Ds = y: ai = 0.3: simsun. ttf-misc-SimSun-bold-I-normal -- 0-0-0-0-p-0-gbk-0
Simsun. ttf-misc-SimSun-medium-r-normal -- 0-0-0-0-p-0-fcd8859-15
Ai = 0.3: simsun. ttf-misc-SimSun-medium-I-normal -- 0-0-0-0-p-0-fcd8859-15
Ds = y: simsun. ttf-misc-SimSun-bold-r-normal -- 0-0-0-0-p-0-fcd8859-15
Ds = y: ai = 0.3: simsun. ttf-misc-SimSun-bold-I-normal -- 0-0-0-0-p-0-fcd8859-15
Simsun. ttf-misc-SimSun-medium-r-normal -- 0-0-0-0-p-0-iso8859-15
Ai = 0.3: simsun. ttf-misc-SimSun-medium-I-normal -- 0-0-0-0-p-0-iso8859-15
Ds = y: simsun. ttf-misc-SimSun-bold-r-normal -- 0-0-0-0-p-0-iso8859-15
Ds = y: ai = 0.3: simsun. ttf-misc-SimSun-bold-I-normal -- 0-0-0-0-p-0-iso8859-15
Simsun. ttf-misc-SimSun-medium-r-normal -- 0-0-0-0-c-0-iso10646-1
Ai = 0.3: simsun. ttf-misc-SimSun-medium-I-normal -- 0-0-0-0-c-0-iso10646-1
Ds = y: simsun. ttf-misc-SimSun-bold-r-normal -- 0-0-0-0-c-0-iso10646-1
Ds = y: ai = 0.3: simsun. ttf-misc-SimSun-bold-I-normal -- 0-0-0-0-c-0-iso10646-1
Simsun. ttf-misc-kai-medium-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
Simsun. ttf-misc-kai-medium-r-normal -- 0-0-0-0-c-0-gb18030.2000-0
Simsun. ttf-misc-TrueSimSun-medium-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ai = 0.3: simsun. ttf-misc-TrueSimSun-medium-I-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ds = y: simsun. ttf-misc-TrueSimSun-bold-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ds = y: ai = 0.3: simsun. ttf-misc-TrueSimSun-bold-I-normal -- 0-0-0-0-c-0-gb2312.1980-0
Simsun. ttf-misc-TrueSimSun-medium-r-normal -- 0-0-0-0-p-0-iso8859-1
Ai = 0.3: simsun. ttf-misc-TrueSimSun-medium-I-normal -- 0-0-0-0-p-0-iso8859-1
Ds = y: simsun. ttf-misc-TrueSimSun-bold-r-normal -- 0-0-0-0-p-0-iso8859-1
Ds = y: ai = 0.3: simsun. ttf-misc-TrueSimSun-bold-I-normal -- 0-0-0-0-0-p-0-iso8859-1
Simsun. ttf-misc-TrueSimSun-medium-r-normal -- 0-0-0-0-p-0-koi8-r
Ai = 0.3: simsun. ttf-misc-TrueSimSun-medium-I-normal -- 0-0-0-0-p-0-koi8-r
Ds = y: simsun. ttf-misc-TrueSimSun-bold-r-normal -- 0-0-0-0-p-0-koi8-r
Ds = y: ai = 0.3: simsun. ttf-misc-TrueSimSun-bold-I-normal -- 0-0-0-0-p-0-koi8-r
Simsun. ttf-misc-TrueSimSun-medium-r-normal -- 0-0-0-0-p-0-fcd8859-15
Ai = 0.3: simsun. ttf-misc-TrueSimSun-medium-I-normal -- 0-0-0-0-p-0-fcd8859-15
Ds = y: simsun. ttf-misc-TrueSimSun-bold-r-normal -- 0-0-0-0-p-0-fcd8859-15
Ds = y: ai = 0.3: simsun. ttf-misc-TrueSimSun-bold-I-normal -- 0-0-0-0-0-p-0-fcd8859-15
Simsun. ttf-misc-TrueSimSun-medium-r-normal -- 0-0-0-0-p-0-iso8859-15
Ai = 0.3: simsun. ttf-misc-TrueSimSun-medium-I-normal -- 0-0-0-0-p-0-iso8859-15
Ds = y: simsun. ttf-misc-TrueSimSun-bold-r-normal -- 0-0-0-0-p-0-iso8859-15
Ds = y: ai = 0.3: simsun. ttf-misc-TrueSimSun-bold-I-normal -- 0-0-0-0-0-p-0-iso8859-15
Simsun. ttf-misc-TrueSimSun-medium-r-normal -- 0-0-0-0-c-0-iso10646-1
Ai = 0.3: simsun. ttf-misc-TrueSimSun-medium-I-normal -- 0-0-0-0-c-0-iso10646-1
Ds = y: simsun. ttf-misc-TrueSimSun-bold-r-normal -- 0-0-0-0-c-0-iso10646-1
Ds = y: ai = 0.3: simsun. ttf-misc-TrueSimSun-bold-I-normal -- 0-0-0-0-c-0-iso10646-1 '> $ CDIR/fonts. dir
# Make the fonts. scale
Cat $ CDIR/fonts. dir> $ CDIR/fonts. scale
# Modify $ XFConfig
Sed-e '/^ Section [[: space:] * "Files"/,/^ EndSection /{
/^ [[: Space:] * FontPath [[: space:] * "\/usr \/X11R6 \/lib \/X11 \/fonts \/TrueType"/d
/RgbPath/\
FontPath "\/usr \/X11R6 \/lib \/X11 \/fonts \/TrueType"
} '-E'/Section [[: space:] * "Module"/,/^ EndSection /{
/^ [[: Space:] * Load [[: space:] * "freetype"/d
/^ [[: Space:] * Load [[: space:] * "record"/d
/^ [[: Space:] * Load [[: space:] * "type1"/d
/^ [[: Space:] * Load [[: space:] * "xtt"/d
S/EndSection/Load "xtt "\
EndSection/
} '$ XFConfig> ~ /Tmpfile
Cat ~ /Tmpfile> $ XFConfig
# Modify gtkrc. zh_CN
Sed-e '{
/^ [[: Space:] * fontset/,/-r-\ * "/d
/{/\
Fontset = "-*-medium-r-normal -- 12-*-iso10646-1, *-r -*"
} '$ GTKRC> ~ /Tmpfile
Cat ~ /Tmpfile> $ GTKRC
# Modify gnome/gtkrc
Sed-e's/^ [[: space:] * fontset [[: space:] * =. * "/fontset ="-misc-SimSun-medium-r-normal -- 12-*-iso10646-1 "/'$ GNOMERC> ~ /Tmpfile
Cat ~ /Tmpfile> $ GNOMERC
# Modify $ FONTSCONF
Sed-e '{
/ \/Usr \/X11R6 \/lib \/X11 \/fonts \/TrueType <\/dir>/d
S/ \/Usr \/X11R6 \/lib \/X11 \/fonts \/Type1 <\/dir>/ \/Usr \/X11R6 \

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.