byobu在SecureCRT 使用时 command line 有乱码

在SecureCRT 中通过SSH 连接到ubuntu14.04主机, 这个情况下启用byobu,如下图:
这里写图片描述
问题: 1. 虽然在byobu-config中关闭了所有动态刷新的配置, 但是状态栏最右边仍然显示系统时间(这个问题倒还好)
2. command line 最后有几个乱码,而且在输入命令的时候,乱码还会变化,甚至影响到输入
3. 在~/.bashrc中配置了缩略 路径, 但是在byobu 之后又恢复了原样,好长一段路径名

针对问题点1:

sudo vi /usr/share/byobu/profiles/tmux

set -g status-left '#(byobu-status tmux_left)'
#kevin, removed for testing, 0907 , remove the " $BYOBU_DATE$BYOBU_TIME"
#set -g status-right '#(byobu-status tmux_right)'$BYOBU_DATE$BYOBU_TIME
set -g status-right '#(byobu-status tmux_right)'   
set -g message-bg $BYOBU_ACCENT

针对问题点2和3:
其实是byobu启动时,启动了自己的bashrc,其中定义了一些让人烦心的特征:

sudo vi /usr/share/byobu/profiles/bashrc

            case "$BYOBU_DISTRO" in
                        "Ubuntu")
                                # Use Ubuntu colors (grey / aubergine / orange)
                                #kevin , modified for testing, 0907
                                #PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;202m\]\$(byobu_prompt_status)\[\e[38;5;245m\]\u\[\e[00m\]@\[\e[38;5;172m\]\h\[\e[00m\]:\[\e[38;5;5m\]\w\[\e[00m\]\$(byobu_prompt_symbol) " 

  就是这个地方,采用了byobu自己定义的  提示符, 导致在 secureCRT时显示成了乱码(且不管他原来到底是个啥符号,要深究的话,研究这个bashrc也是找得到的)
 改成如下这样, 1. 不采用 byobu自己的提示符 (去掉乱码)  2. 将小写w改成大写W(设置缩略 路径)

    PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;202m\]\$(byobu_prompt_status)\[\e[38;5;245m\]\u\[\e[00m\]@\[\e[38;5;172m\]\h\[\e[00m\]:\[\e[38;5;5m\]\W\[\e[00m\]\$ "
                                export GREP_COLORS="ms=01;38;5;202:mc=01;31:sl=:cx=:fn=01;38;5;132:ln=32:bn=32:se=00;38;5;242"
                                export LESS_TERMCAP_mb=$(printf '\e[01;31m')       # enter blinking mode – red
                                export LESS_TERMCAP_md=$(printf '\e[01;38;5;180m') # enter double-bright mode – bold light orange
                                export LESS_TERMCAP_me=$(printf '\e[0m')           # turn off all appearance modes (mb, md, so, us)
                                export LESS_TERMCAP_se=$(printf '\e[0m')           # leave standout mode
                                export LESS_TERMCAP_so=$(printf '\e[03;38;5;202m') # enter standout mode – orange background highlht (or italics)
                                export LESS_TERMCAP_ue=$(printf '\e[0m')           # leave underline mode
                                export LESS_TERMCAP_us=$(printf '\e[04;38;5;139m') # enter underline mode – underline aubergine
                        ;;
                        *)
                                # Use nice colors (green / red / blue)
       #kevin , modified for testing, 0907 ,改成如下这样, 1. 不采用 byobu自己的提示符 (去掉乱码)  2. 将小写w改成大写W(设置缩略 路径)
      #PS1="${debian_chroot:+($debian_chroot)}\[\e[31m\]\$(byobu_prompt_status)\[\e[00;32m\]\u\[\e[00m\]@\[\e[00;31m\]\h\[\e[00m\]:\[\e[00;36m\]\w\[\e[00m\]\$(byobu_prompt_symbol) "
      PS1="${debian_chroot:+($debian_chroot)}\[\e[31m\]\$(byobu_prompt_status)\[\e[00;32m\]\u\[\e[00m\]@\[\e[00;31m\]\h\[\e[00m\]:\[\e[00;36m\]\W\[\e[00m\]\$ "
                        ;;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值