SSH, server has feature called X11Forwarding. It specifies whether X11 forwarding is permitted or not. You need to set this parameter to yes. Once this is enabled, you will be able to run a graphical application on server and get applications display (window) on your desktop.
For example, login on Linux/BSD system called server1.mydomain.com. Open /etc/ssh/sshd_config file using text editor:
# vi /etc/ssh/sshd_config
Find out parameter X11Forwarding and set it to yes:
Save file and exit to shell prompt. Restart sshd service under Debian Linux:
# /etc/init.d/ssh restart
Alternatively, if you are using Fedora / Red Hat Linux restart sshd:
# /etc/init.d/sshd restart
Since X11 forwarding is enabled, just login from desktop system to server1.mydomain.com using ssh command:
desktop $ ssh -X email@example.com
When you login using ssh command, you need to use -X flag to enable X11 forwarding. If you do not use -X flag forwarding it will not work and you will get an error that read as follows:
couldn’t open display (null)
Once you are logged in to server1, if you type the X application command over ssh session, the application will run on server1 and display will appear on your desktop system. For example, run xeyes or open office program:
server1 $ xeyes &
server1 $ ooffice &
Within few seconds, you should get a graphical display on your desktop system.