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 [email protected]
[email protected]'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!
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
Try the -Y option for X11 forwarding instead it disables some X11 security checks and tends to work better from OSX.
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.
Xnest -geometry 1024x768 :1& DISPLAY=:1 ssh -Y ipoftheserver gnome-session work well !
Another important thing: if you install
xquartz
viahomebrew
, you should relogin your macos or reboot.As the rackpas's answer saying.