Welcome to LinuxQuestions
You can run X programs on a headless server, displaying the result on a desktop that's accessing it through ssh.
You will need to install the normal 'x' packages on your headless server, but you do not need to configure it there.
In 'X' terminology, the "X-Server" is the machine that displays the result, so in your case it's not the headless server, but your desktop.
Your desktop acts as a 'graphical server' for the programs hosted on your headless server
On your headless server, you need to configure ssh to "forward" X information:
- simply edit /etc/ssh/sshd_config and change the line reading "#X11Forwarding no" to "X11Forwarding yes" (don't forget to remove the '#')
- restart ssh (you can do this while logged on): "/etc/rc.d/rc.sshd restart"
- on your desktop, close the ssh connection and connect again with "ssh -Y <your-server-ip>"
- test it by running "xcalc" on your server - it should display on your desktop.
This works fine for simple X programs, but programs needing a lot of KDE things running might give different results.
Like the saying goes: YMMV ...
I forgot to mention using X forwarding over the internet...
My example works fine on a local network. Using this over the internet is possible, but the results might not be satisfactory... A simple xcalc will go fine, but do not try to run a CAD program this way over an ADSL line (I recently did...) It's impossible to work with.
If you need to do this over the internet, try solutions like VNC, but then you need to configure & run X on your server as well.