首页 > 解决方案 > 在远程 ssh 连接时,文件不会从 vscode 集成终端打开

问题描述

在远程 ssh 连接上,我无法从 vscode 集成终端打开文件本地机器:Windows 10 远程机器:Ubuntu 20.04

这是尝试启动 abc.txt 的代码的日志

$ code abc.txt --verbose
No protocol specified
[9045:1002/183652.672418:ERROR:browser_main_loop.cc(1402)] Unable to open X display.
The futex facility returned an unexpected error code.
/dev/fd/3: No such file or directory
Server response:

这很令人沮丧,请帮助注意:我已经尝试过export DISPLAY=:0

标签: visual-studio-codeubuntu-20.04vscode-remotexserver

解决方案


我假设您正在使用 vscode 的远程开发功能。然后您可以使用集成资源管理器打开文件。


推荐阅读