X11 Forwarding with my Entire Screen

I am able to ssh to my Linux computer which is on the same network as my Mac. From the Linux machine, I can ssh to my Macbook.

I am currently at work and I want to forward my Mac's display to the Windows machine that I am currently on (using Putty and Xming). I am able to run "Xeyes &" so I know that the X11 forwarding is working correctly.

How can I forward my entire screen, preferably without having to setup VNC? And remember, I only have access to the command line.


Solution 1:

This isn't how X11 works on the Mac currently (or at any time in the past).

The native Mac window manager uses Quartz 2D and Core Graphics to accomplish the rendering and composting of windows and icons on the Mac screen.

X11 writes into that space as a consumer - not as the end-all provider of drawing services so it can't forward things it doesn't get to see.

You will want to set up VNC sharing (which is the native Mac screen sharing technology) if you can't get by with just forwarding the X11 graphics.

Solution 2:

You can run a VNC session through ssh.

Connect to the remote system from Terminal:

ssh -Y -g -l username -C -L 5901:localhost:5901 remote_hostname

Start VNC server on the remote system. The above assumes your server starts on display port 1.

Launch a VNC viewer on your local system and enter the connection information. In this example you would use 'localhost' for 'Host', and '5901' for your port.