Most UNIX application are able to process command line options. Through a CGI you could script something for that. But to actually throw an X window back to the client the client must be running an X server.
see Re: telnet login script from W2K to unix box
Sorry, I don't know of a way to "reproduce" a Xwindow or GUI through the browser without possibly running some type of Java applet that can emulate an X server and tunnel that through the http connection.
If you really want to run an XServer in an applet, I suspect you still need to open your own connection to the server - HTTP itself can handle persistent connections, but any proxies in between will probably not like it. Oh - and use secure sockets.
anyway - it sounded interesting so I googled around a bit and found this X server in Java that apparantly can run as an applet.
WeirdX works well. I have used it with xlib apps and with Gtk2-perl apps. The latter sounds like what you want. Be sure to set the proper applet params, though.