2

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!

3

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

  • 4
    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
  • 1
    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
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

  • +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
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.

  • 1
    If you do ssh -X from the Terminal, it will automatically launch X11.app – tegbains Apr 29 '10 at 17:13
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy