![在 AIX 上与 PuTTY 一起使用的最佳 TERM 类型是什么,以及应该调整哪些 PuTTY 设置?](https://linux22.com/image/500388/%E5%9C%A8%20AIX%20%E4%B8%8A%E4%B8%8E%20PuTTY%20%E4%B8%80%E2%80%8B%E2%80%8B%E8%B5%B7%E4%BD%BF%E7%94%A8%E7%9A%84%E6%9C%80%E4%BD%B3%20TERM%20%E7%B1%BB%E5%9E%8B%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%8C%E4%BB%A5%E5%8F%8A%E5%BA%94%E8%AF%A5%E8%B0%83%E6%95%B4%E5%93%AA%E4%BA%9B%20PuTTY%20%E8%AE%BE%E7%BD%AE%EF%BC%9F.png)
我管理很多台AIX机器,一般都是5.3版本。
基本终端功能运行良好,但似乎有些功能不正常。例如,nmon
显示字符lqqx
而不是画线字符。
lqnmonqqqqqqqqr=ResourcesqqqqqqqqHost=sigloprodqqqqqqRefresh=2 secsqqq11:29.
1 Memory qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqx
x Physical PageSpace | pages/sec In Out | FileSystemCx
x% Used 97.4% 1.3% | to Paging Space 0.0 0.0 | (numperm) 5x
x% Free 2.6% 98.7% | to File System 0.5 1.5 | Process 2x
xMB Used 7980.3MB 26.2MB | Page Scans 0.0 | System 1x
xMB Free 211.7MB 2021.8MB | Page Cycles 0.0 | Free x
xTotal(MB) 8192.0MB 2048.0MB | Page Steals 0.0 | -x
x | Page Faults 3.0 | Total 10x
x------------------------------------------------------------ | numclient 5x
xMin/Maxperm 781MB( 10%) 3904MB( 48%) <--% of RAM | maxclient 4x
xMin/Maxfree 248 1088 Total Virtual 10.0GB | User 7x
xMin/Maxpgahead 2 128 Accessed Virtual 3.2GB 31.8% Pinned 1x
x x
xqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqx
x x
x x
x x
x x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
我目前在 AIX 上使用xterm
终端类型,在 putty 中指定 utf8 编码,在 putty 中使用 unicode 画线代码点,并使用 Deja Vu Sans Mono 字体,该字体应包含所有画线字符
nmon
当我从同一台机器上的 xterm 运行它时确实显示正确。
当前的 terminfo 条目TERM=xterm
如下:
sigloprod ~ $ echo $TERM
xterm
sigloprod ~ $ infocmp
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/x/xterm
xterm|vs100|xterm terminal emulator,
am, km, msgr, xenl,
cols#80, it#8, lines#25,
batt1=f1, batt2=f1md, bel=^G, bold=\E[1m,
box1=lqkxjmwuvtn, box2=lqkxjmwuvtn, civis=\E[?25l,
clear=\E[H\E[2J, cnorm=\E[?25h, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
dl1=\E[M, ed=\E[J, el=\E[K, font0=\E(B, font1=\E(0,
home=\E[H, ht=\t, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=\b, kcub1=\E[D,
kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=^?,
kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~,
kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
khome=\E[H, kich1=\E[2~, knl=\r, knp=\E[6~, kpp=\E[5~,
ktab=\t, mc4=\E[4i, mc5=\E[5i, nel=\n, rc=\E8,
rev=\E[7m, rf=/usr/share/lib/tabset/vt100, ri=\EM,
rmcup=\E[?7h, rmkx=\E>, rmso=\E[m, rmul=\E[m$<2>,
rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, sc=\E7,
sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;,
sgr0=\E[m\E(B, smcup=\E[?7h\E[?1l\E(B\E=, smkx=\E=,
smso=\E[7m, smul=\E[4m$<2>, tbc=\E[3g,
答案1
尝试 Putty 的配置菜单:窗口 -> 翻译 -> 接收数据假定采用哪种字符集 -> UTF-8
如果不是 UTF-8,请尝试其他一些值。
答案2
尝试一下$export TERM=dtterm
这种方法,它会给你提供官方常见问题解答中所述的一些颜色。
http://www.ibm.com/developerworks/wikis/display/wikiptype/nmon+faq/ 问题 41
答案3
远程控制 Debian 机器时也遇到过类似的问题。正如 @scott 所述,当使用 UTF-8 时,Putty 会忽略更改为画线模式的顺序。对我有用的方法是告诉 putty 将自身标识为“putty”终端而不是“xterm”,将“连接 > 数据 > 终端类型字符串”选项更改为 putty“putty”。
答案4
编辑:
Aix 使用两种功能框1和盒子2。尝试修改下面的命令来查找它们,而不是澳大利亚科学研究学会。
之前:
尝试这个命令:
for t in $(find /lib/terminfo -type f -print); do echo; echo -n "$t "; tput -T$(basename $t) acsc; done
或者:
for t in $(find /lib/terminfo -type f -print); do echo $t; infocmp $(basename $t)| grep acsc; done
将“/lib/terminfo”替换为您的 terminfo 文件的路径。查找以下行不要看起来像这样:
“aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
其中一个终端很有可能适合您。
TERM=termtype
您可以在 Bash 提示符下或在您的终端中设置该终端类型,~/.bashrc
方法是:
TERM=termtype nmon
仅针对该调用进行设置。如果您希望针对ssh
本地端的会话进行设置,您可以执行以下操作:
TERM=termtype ssh ...
AcceptEnv
远程系统是否/etc/ssh/sshd_config
设置为允许。SendEnv
本地系统/etc/ssh/ssh_config
或用户本地~/.ssh/config
是否设置为发送。