You need to redirect X via ssh to the machine you are connecting from, there are several steps to make this work:
Restart sshd if you had to change the file above:
service sshd restart
Make sure the xauth package is installed:
rpm -q xauth || yum -y install xauth
The next part depends on what OS you are connecting from, if it's Windows:
- Download Xming from sourceforge, install it and run it
- Download PuTTY and unzip it
- Open PuTTY, in the settings on the left hand side go to Connection >> SSH >> X11 and check "Enable X11 forwarding", type localhost:0 in the "X display location" box.
- click on Session at the top left, then click on Default settings on the right hand side, then click the save button.
- connect to the server and run your application again.
If you're in linux (or Mac?), then just run: