How do I keep an X session alive when my VPN/ssh disconnects so I can reconnect later?

Hi,

Sorry if this question has been asked before, however, I have tried looking in the forum (and google in general) and I haven't found an answer, so I thought I'd ask here.

I am trying to use a GUI application in Solaris 10. Normally I connect with a VPN then SSH and use Xming to launch my application.
The problem is that whenever my VPN disconnects, the software closes and interrupts the things it was doing.
For command line applications I use "screen" to keep a session opened when the VPN connection fails, so there is no problem, but I haven't found anything equivalent for an X session.
I even tried forwarding the X session to "screen" (export DISPLAY=localhost:N.0 ) but either I'm doing something wrong or this doesn't work...

I know using Citrix will solve this with proper configuration, unfortunately for the time being I can't use it on this server.

is there any software equivalent to "screen" for X sessions that I can use in Solaris 10? if not, Is there any alternative way of doing this?

Thanks!

VNC can reconnect like this but isn't freestanding, you'll need an X11 environment on the server instead. So the server hosts the program and the graphics alike(physical display not strictly required IIRC), and VNC is your screen-alike.

Run your program (on the remote) as a detached process, i.e. a script that uses a here document already created by screen (you programmatically modify details for each run)?