Since the X Window System is built on a network model, it should be no surprise that you can launch X applications on your computer and have them actually display on an X11 system somewhere else on the network. What's cool is that you can also do the opposite and have remote computer systems run applications that actually display and work on your own computer.
If you use other Unix systems that run X11 (such as a Red Hat Linux system running XFree86), you can remotely log into your Mac, run X11 applications, and have them display on that Unix system (the applications are still executing on the Mac, but they appear on the Unix system). If you have an always-on broadband connection, you can even do this from afar (perhaps you use a Unix system at school or at work, but want to connect to your Mac at home).
To set up your Mac for remote X11 access:
Use the following command to make a backup of the configuration file you'll edit in the next step:
sudo cp /etc/sshd_config /etc/sshd_config.backup
If anything goes wrong during this process, you can use the following command to restore the original file and restart your Mac:
sudo cp /etc/sshd_config.backup /etc/sshd_config
Use the following command to edit your remote login configuration file:
sudo vi /etc/sshd_config
Find the line that reads
#X11Forwarding no. The leading
# tells sshdto ignore that line in the file and to use the default value instead. To be absolutely sure that remote X11 ...