Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

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!

share|improve this question

4 Answers 4

up vote 2 down vote accepted

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

share|improve this answer
In addition to trying -Y, also make sure that your remote system has the xauth binary available: ssh requires that binary in order to successfully set up forwarding. –  voretaq7 Apr 29 '10 at 19:36
Actually... the only thing I had to do was install xauth. It works with or without the -Y option now. Thanks! –  Cal Apr 30 '10 at 2:40

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.

share|improve this answer
If you do ssh -X from the Terminal, it will automatically launch X11.app –  tegbains Apr 29 '10 at 17:13

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

share|improve this answer

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

share|improve this answer
+1 This was the only resource that I could find anywhere that mentioned this, and it was exactly what I needed to solve my problem. When I tried ssh -X -v on my system, xauth did not appear ANYWHERE in the output.... Then I installed XQuartz. One logout/login later, and it all Just Works. –  user70463 May 21 '13 at 22:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.