MacOS – ssh -X without/with using xquartz

macossshx11xquartz

I would like to know if OSX supports ssh -X right out of the box?

Using the command launches XQuartz and interestingly both are NOT working:
e.g. displaying pdf files returning :

evince foo.pdf 

** (evince:1341): WARNING **: Command line `dbus-launch --autolaunch=58045ffa2d1f3dc82398e1eb00000008 --binary-syntax --close-stderr' exited with non-zero exit status 1: EOF in dbus-launch reading address from bus daemon\n
Failed to get bus connection: Command line `dbus-launch --autolaunch=58045ffa2d1f3dc82398e1eb00000008 --binary-syntax --close-stderr' exited with non-zero exit status 1: EOF in dbus-launch reading address from bus daemon\n

Best Answer

The '-X' parameter to ssh instructs ssh to open an XWindow session, which is why xquartz is launched automatically.

You can ssh to a remote server without -X and interact with it on a command line, however, to forward the XWindow display needs XQuartz.

To debug the problem you are seeing you may want to:

  1. Ensure there are no errors when you connect to the server (i.e. 'X11 forwarding request failed on channel 0')
  2. Test other X window commands after you establish a valid connection (like xeyes or gvim)
  3. Check the value of $DISPLAY.
Related Question