Once you establish the SSH connection with -Y
flag, there are a few ways to test if your X11 forwarding works.
First check if the DISPLAY
environment variable is set by running following command in Terminal: echo $DISPLAY
. The output should be localhost:##.#
If DISPLAY
variable is set proceed with a test described here. Try forwarding a minimal X11 application: xmessage hello
. Your window manager should display a primitive dialog.
If any of the above tests fail then something is wrong with the X11 setup or X11 forwarding on the remote machine.