我在远程Linux机器上安装了一个程序wireshark,我试图用我的Mac电脑上的X11使用SSH来运行它。 这是我的terminal
macosx$ echo $DISPLAY /tmp/launch-f4w6k6/:0 macosx$ ssh -X [email protected] [email protected]'s password: remoteubuntu:~# echo $DISPLAY remoteubuntu:~# wireshark (wireshark:18927): Gtk-WARNING **: cannot open display:
这是/ etc / ssh / sshd_config中的几行
X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no
谢谢您的帮助!
尝试用于X11转发的-Y选项 ,而不是禁用一些X11安全检查,并且从OSX开始工作更好。
Mac OS X Lion中未安装X11。 MacOS X Lion用户必须安装XQuartz才能运行ssh -X或-Y。
供参考: 关于X11和OS X Mountain Lion
您的本地系统上没有运行X服务器。 不要使用Terminal.app(带有黑色图标的那个)来启动SSH会话; 而是使用X11.app(带有白色图标的那个)。 在我的系统上,它在/Applications/Utilities/X11.app。
Xnest -geometry 1024×768:1&DISPLAY =:1 ssh -Y ipoftheserver gnome-session work well!