(If you don’t know which version you are using, you can figure it out by going to the Apple Menu and selecting “About this Mac”.) In this window, you will type one of two commands, depending on the version of Mac OS X that you are using.
If you have Mac OS X 10.8 (Mountain Lion), you will need to download X11 from the XQuartz project, and install it following the on-screen instructions after opening XQuartz-2. Mac OS X versions 10.5 through 10.7 include a pre-installed version of X11. Home » Support & Infrastructure » Desktop Support » Software Licensing & Distribution » X Window System » X11 for Mac OS X X11 for Mac OS X Locating or Installing X11