![gedit“无法打开显示”,在远程 OSX 上使用 ssh - Ubuntu 14.04 LTS 配置文件](https://linux22.com/image/1051003/gedit%E2%80%9C%E6%97%A0%E6%B3%95%E6%89%93%E5%BC%80%E6%98%BE%E7%A4%BA%E2%80%9D%EF%BC%8C%E5%9C%A8%E8%BF%9C%E7%A8%8B%20OSX%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20ssh%20-%20Ubuntu%2014.04%20LTS%20%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6.png)
使用 ssh 登录远程计算机时出现以下错误消息:
gedit: cannot open display
和
ssh -X -l root your-machine-name
不起作用
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]
答案1
似乎您已设置一个程序,在启动 shell(或者您尝试打开它)时自动运行 GEDIT。这无法通过 ssh 工作,因为您当前会话中没有运行 X-Server。
至于运行ssh -X -l root your-machine-name
ssh 的问题,你的副本没有编译以支持该-X
选项
基本上你:
需要在您的会话中运行 X-Server
需要重新编译
ssh
以支持-X
optionoon