MacOS – Using XQuartz for communicating to the Centos server using local graphical user interface

macosxquartz

I wonder how to use XQuartz to communicate with the Centos server through a local graphical user interface on my Mac? I did the following steps so far, and the result so far is just connect to the server through terminal.

  • Server side:

    1. Installed gdm on the server.

    2. Switched run level to 5.

  • Client side:

    1. Installed XQuartz on my Mac OS 10.8.

    2. On Terminal: ssh X root.website.com.

Update

After doing what @onik suggested (using the xterm instead of terminal, created a new user other than root, and entered the command gnome-session), I get the following warnings before xterm halts:

enter image description here

Best Answer

You don't need to switch to runlevel 5, this only means that the server boots into the GUI, not that it's useable. You can use runlevel 3 and launch remote X sessions.

Furthermore, you'll have to use xterm to start the SSH session, not Terminal.app. If you run XQuartz it should open it by default. Then run ssh -X root.website.com to open the session and from this session you can launch the needed applications. If you need the entire desktop, run gnome-session & or your desired VM.

Note that you need to have X11Forwarding yes in your /etc/ssh/sshd.conf.