• CentOS6 安装ibusfbterm0.9.1


    CentOS6 安装ibus-fbterm-0.9.1
    有没有朋友想在真正的终端(console)下显示并输入中文,我想肯定是有的,比如我自己就研究过好一阵,结果还初见成效,这里分享一点自己的小经验。
    目前可行的方案有:
    fbterm+ucimf            (简略粗糙)
    fbterm+ibus-fbterm (通用)
    fbterm+fcitx-fbterm   (最优方案)
    fbterm+yong

    这里就介绍最通用的一种,屡试不爽噢!

    ----------------------------
    console终端中文支持:fbterm   ibus-fbterm
    ----------------------------
    一.安装编译依赖库
    yum  -y install   ibus-pinyin ibus-table-wubi 
    yum  -y install   freetype-devel   fontconfig-devel  ibus-devel dejavu-sans-mono-fonts #编译fbterm和ibus-fbterm依赖库
    #开启fbterm只需在,/boot/grub/grub.cfg文件 kernel行加上vga=791即可



    二.安装fbterm
    wget    http://fbterm.googlecode.com/files/fbterm-1.7.0.tar.gz
    tar   -zxvf   fbterm-1.7.0.tar.gz   -C   /usr/local/src
    cd   /usr/local/src/fbterm-1.7
    ./configure
    make  && make install



    三.安装ibus-fbterm
    wget    http://ibus-fbterm.googlecode.com/files/ibus-fbterm-0.9.1.tar.gz
    tar   -zxvf   ibus-fbterm-0.9.1.tar.gz   -C   /usr/local/src
    ./configure 
    make  &&  make install


    好的,在console下要开启fbterm和ibus-fbterm
    Ctl+Alt+fx(x=1,2,3,4,5,6,7),如:Ctl+Alt+f2

    输入用户名,密码后,键入以下命令
    fbterm  -i   ibus-fbterm

    输入法起不来或出现很多不想看到的调试信息时,可以,
    sudo  setcap     'cap_sys_tty_config+ep' /usr/bin/fbterm
    或 sudo   chmod u+s  /dev/fb0

    更换字体
    由于fbterm使用的默认字体mono表现比较差,所以我为Linux安装了微软雅黑用于中文显示,Consolas用于英文显示(也可以使用Moncao,二者表现都不错,但是个人认为Consolas表现柔和,很适合作为编程字体).
    (1). 安装微软雅黑:
    a. 从Windows 7或XP中复制msyh.ttf和msyhbd.ttf到Linux字体目录
    "/usr/share/fonts/truetype/msttcorefonts"中,并将两个文件权限修改为777,也可以修改为644,再创建两个软连接,如:
    ln -s msyh.ttf Msyh.ttf
    ln -s msyhbd.ttf Msyhbd.ttf
    b. 接着使用如下命令注册字体:
    mkfontscale
    mkfontdir
    fc-cache  -fv

    (2). Consolas也是Windows下的字体,其安装过程与微软雅黑一样,只是
    该字体需到网上下载,下载地址如下(这是雅黑和Consolas的结合体,字体名称为"YaHei Consolas Hybrid"):
    http://files.xiaogui.org/eclipse-indigo/YaHei.Consolas.1.12.rar


    (3). Monaco本来为Mac系统上的字体,不过现在已经有Linux下的版本了,
    故只需下载并将其放到字体目录即可,也没了上面的麻烦了.
    下载地址:http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf


    5. 修改fbterm的默认字体,编辑其配置文件"~/.fbtermrc",修改font-names的
    值为"Consolas,Monaco,微软雅黑",并将字体font-size调大至15,这就看个人爱好了.

    fbterm的更多自定义设置可以在~/.fbtemrc中指定,配置文件的意思一看便懂,这里就不絮叨了。
    以下是我个人的一个样例:
    # Configuration for FbTerm

    # Lines starting with '#' are ignored.
    # Note that end-of-line comments are NOT supported, comments must be on a line of their own.


    # font family names/pixelsize used by fbterm, multiple font family names must be seperated by ','
    # and using a fixed width font as the first is strongly recommended
    font-names=mono
    font-size=15

    # force font width (and/or height), usually for non-fixed width fonts
    # legal value format: n (fw_new = n), +n (fw_new = fw_old + n), -n (fw_new = fw_old - n)
    #font-width=
    #font-height=

    # default color of foreground/background text
    # available colors: 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white
    color-foreground=7
    color-background=0

    # max scroll-back history lines of every window, value must be [0 - 65535], 0 means disable it
    history-lines=100

    # up to 5 additional text encodings, multiple encodings must be seperated by ','
    # run 'iconv --list' to get available encodings.
    text-encodings=zh_CN.UTF-8,en_US.UTF-8,GB2312,GB18030,GBK

    # cursor shape: 0 = underline, 1 = block
    # cursor flash interval in milliseconds, 0 means disable flashing
    cursor-shape=0
    cursor-interval=500

    # additional ascii chars considered as part of a word while auto-selecting text, except ' ', 0-9, a-z, A-Z
    word-chars=._-

    # change the clockwise orientation angle of screen display
    # available values: 0 = 0 degree, 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees
    screen-rotate=0

    # specify the favorite input method program to run
    input-method=/usr/local/bin/-fbterm

    # treat ambiguous width characters as wide
    ambiguous-wide=yes
  • 相关阅读:
    springcloud-spring cloud config统一配置中心
    springcloud-hystrix断路器对微服务的容错处理
    springcloud-feign组件实现声明式的调用
    springcloud-Ribbon-负载均衡组件
    springcloud-Eureka-服务注册与发现核心组件
    springcloud入门-什么是springcloud
    Redis缓存设计及常见问题
    Lucene全文检索入门使用
    redis安装、使用
    nodejs环境 + 入门 + 博客搭建
  • 原文地址:https://www.cnblogs.com/lixuebin/p/10814693.html
Copyright © 2020-2023  润新知