使用vscode+x11插件图形化界面,按照https://blog.csdn.net/Stone_hello/article/details/120041495?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-120041495-blog-121672295.pc_relevant_3mothn_strategy_and_data_recovery&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-120041495-blog-121672295.pc_relevant_3mothn_strategy_and_data_recovery&utm_relevant_index=5配置后,报错:
MoTTY X11 proxy: Unsupported authorisation protocol
Error: Can't open display: localhost:10.0
命令行执行xclock测试:
xclock
1.在服务器端安装remote x11,未解决问题。
2.用xauth添加localhost/unix:10.0,无效
用vscode+x11图形化界面
Eorror Cat not open display : localhost:10.0【错误类别,未打开显示:localhost:10.0】
思路:文件/home/[username]/.bash_profile下设置的用户级环境变量不正确。
1.以普通用户身份登录。
2.注释掉文件/home/[username]/.bash_profile下所有用户特定的env变量。
3.启动VNC控制台。
4.执行xclock命令&check(注意:这不是唯一的原因&解决方案,而是可能的原因之一。)
ssh -Y 你的机器
,然后看看DISPLAY有没有设置,没有的话就可以选择升级你的ssh,或者可以使用其它ssh客户端