I believe I found an interesting way to work around this problem.
It appears that the display manager (i.e. GDM) cannot kill an initial client if the client doesn't have a window (either mapped or unmapped.) GDM evidently does an XQueryTree() to find all windows and kills their owners via XKillClient().
x11vnc creates a hidden 1x1 window for use with exchanging the clipboard selection, etc. This window leads to GDM killing x11vnc. So all x11vnc has to do is avoid creating that hidden window until it thinks the display manager login is finished.
I've uploaded an x11vnc 0.9.9 tarball that implements heuristics to delay the creation of that window:
I've tested it out on ubuntu 9.04 and it works pretty well. I'd appreciate it if you could try it out on 9.10 and let me know how it goes.
It should work by default. If it doesn't you can jack up the number of seconds it waits until after the first VNC client connects to when it tries to create the window, e.g.
will wait 2 minutes, so you have that long to log in via the GDM greeter.
x11vnc -env X11VNC_AVOID_WINDOWS=120 ...
I posted an update to the ubuntu 9.10 GDM killing x11vnc in post #5 here:
it seems to work fine now.