Putty+VcXsrv+Terminator,在Win窗口里跑Zsh

Linux下有很多终端,大多是需要X支持,个人比较喜欢Terminator。如果linux server上没有开启X11,可以通过在SSH上开启X11 forwarding的方式在本地打开远程终端。

  1. 本地安装VcXsrv
    安装后默认开启配置,可以手工设置后保存config文件到AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup来让VcXsrc开机时自动运行,也可以给vcxsrv.exe创建桌面快捷方式,然后在目标加入下面的运行参数来手工启动。具体配置可以参考这里
    "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto
  2. 配置SSH
    修改完配置要重启SSH service
    sudo vim /etc/ssh/sshd_config
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
AllowStreamLocalForwarding yes
#PermitTTY yes
  1. 安装terminator和ohmyzsh
    sudo apt-get update
    sudo apt-get install terminator
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  2. 在putty里配置X11 forwarding

    根据VcXsrv的配置来设置X display location, 默认下就是127.0.0.1:0.0

    如果懒得每次putty登陆都输账户密码的话,可以顺便设置下authentication
  3. Enjoy it....


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。