3

I installed a program wireshark on my remote linux box and I'm trying to run it with X11 from my mac computer using SSH. Here's my terminal...

macosx$ echo $DISPLAY
/tmp/launch-f4w6k6/:0

macosx$ ssh -X root@myserver.com
root@myserver.com's password: 

remoteubuntu:~# echo $DISPLAY

remoteubuntu:~# wireshark

(wireshark:18927): Gtk-WARNING **: cannot open display: 

Here's a few lines from /etc/ssh/sshd_config

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

Thanks for the help!

5 Answers5

5

X11 is not installed in MacOS X Lion. MacOS X Lion users have to install XQuartz for ssh -X or -Y to work.

For reference: About X11 and OS X Mountain Lion

3

Try the -Y option for X11 forwarding instead it disables some X11 security checks and tends to work better from OSX.

Zoredache
  • 133,737
0

You don't have an X server running on your local system. Don't use Terminal.app(the one with a black icon) to start your SSH session; instead, use X11.app(the one with a white icon). On my system, it's in /Applications/Utilities/X11.app.

Kevin M
  • 2,322
0

Xnest -geometry 1024x768 :1& DISPLAY=:1 ssh -Y ipoftheserver gnome-session work well !

0

Another important thing: if you install xquartz via homebrew, you should relogin your macos or reboot.

As the rackpas's answer saying.

Nico
  • 101