Originally posted by m2bored:
wow...lol I didn't know it was that easy...
So it will just be inside the terminal window?
So what's the point of VNC?...this seems much easier.
No. When you are sitting at, say, the Mac X-windows must be running on the Mac... then you open an X-terminal (I think one opens by default when you start X on the Mac)... then in the terminal you type:
ssh -X
userid@IP.of.linuxbox
the -X is for X11 forwarding and you don't need the -C switch on a local 10Mbit/s or better LAN. The -C switch is useful over a dial-up modem connection and makes it compress everything at both ends. On a LAN -C can actually slow things down.
OK... so now you have a terminal ssh session open to the Linux box... your X-terminal app on the Mac OS X box will look exactly the same as it did before except the prompt will probably be different. You will NOT see the Linux desktop within that terminal... all you will see is the prompt. Then at the prompt you can type the command to start some sort of Linux-X-Windows GUI app... like this:
xcalc
and a separate application window will open as the simple calculator xcalc... only as big as it needs to be... you can stretch it and click in it and use the numeric keypad. It will behave exactly as if you were running it locally.
There is no need to stuff the entire X-windows desktop over the network to be displayed all scrunched up within a window on your Mac OS X desktop. To do so would be very inefficient. You only need to stuff the window the application is actually running in.
If you want to run more than one X-windows app at a time via the ssh session you do something like this:
xcalc &
xeyes &
mozilla &
and so on. When you run something like mozilla and click on the mozilla-mail button in mozilla it will automatically open the mozilla-mail client in a separate window.
X-windows was designed with these capabilities from the ground up about 19 years ago. Its roots are from Project Athena at MIT. The X in the X-windows logo is the same as the Xerox X logo to show where the idea came from.
The advantage to VNC over X is that VNC is truly cross platform... while X requires that both machines be capable of running X or X applications.
Note: On the server side (in this case your Linux box) X does NOT have to be running... it doesn't even need a full installation of X... on the client side (your Mac OS X box) something capable of displaying X applications must be running.
VNC only requires a small VNC server and a very small VNC client (often less than 200K). I can use VNC to display and use Mac OS 9 apps on my Linux box or vice versa. I can use VNC to display and use Wintel apps on my Linux or Mac boxes (or vice versa).
The advantage of X over VNC is that it is much more efficient over the network than VNC (requires less bandwidth). Because of this one can have devices called X-terminals (a piece of hardware) that have NO disk and just enough processing power and RAM to run the display and networking (AKA "thin client")... all the number crunching is done on the server side. The actual applications run/exist on the server. The advantages of this kind of setup are tremendous in a corporate or classroom environment for cost (VERY cheap clients) and maintenance (no moving parts in the clients and software updates only have to be done in one place) and administration.
For more info see:
http://www.uk.research.att.com/vnc/