User Tools

Site Tools


playground:playground

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
playground:playground [2022/02/09 00:29]
jquah [Headline]
playground:playground [2022/05/08 11:32] (current)
peterguo add testing contents of terminal display finetunes
Line 20: Line 20:
 |  old Compaq dialup Internet appliances  | |  old Compaq dialup Internet appliances  |
 </code> </code>
 +
 +
 +====== Terminal Display finetunes ======
 +
 +===== Display your local languages in console terminal =====
 +
 +To display your own languages, e.g. Chinese, Janpanes in console, you would need to enable UTF-8 encoding, and this could be done by changing the environment variable value of $LANG.
 +
 +You could firstly test this in your shell:
 +
 +<code type this to your shell command line>
 +LANG=en_US.UTF-8
 +export LANG
 +</code>
 +
 +Or,
 +
 +<code type this to your shell command line>
 +export LANG="en_US.UTF-8"
 +</code>
 +
 +Once this is done, you should be able to view your own languages with less or vim, and your email program alpine should also properly showing your langues in the inbox as well as in the email contents.
 +
 +{{:playground:alpine_inbox_shows_chinese.png?600|}}
 +
 +Then, to make lifer easier, add the below two lines to your ~/.profile, so every login the ksh shell will automatically do this for you.  
 +
 +<file add the following two lines to your ~/.profile file>
 +LANG=en_US.UTF-8
 +export LANG
 +</file>
 +
 +===== Enable color scheme in Vim =====
 +
 +In SDF.org Unix console, by default, the Vim is only showing black and whtie, even you enable it in Vim by using ":syntax enable"
 +The reason could be Vim could not detech the correct type of your terminal, and by default in SDF.org Unix this is DEC vt100, which is not supporting colors, so solution will be set the environment variable $TERM to terminal types of supporting colors, e.g. "xterm-color" terminal type.
 +
 +<code type this to your shell command line>
 +export TERM="xterm-color"
 +</code>
 +
 +Now reopen Vim, you should see the color is switched on.
 +
 +Then, to make lifer easier, add the below two lines to your ~/.profile, so every login the ksh shell will automatically do this for you.  
 +
 +<file add the following two lines to your ~/.profile file>
 +TERM=xterm-color
 +export TERM
 +</file>
  
playground/playground.txt ยท Last modified: 2022/05/08 11:32 by peterguo