Here is what I came up with. This script runs in Xstartup before exec'ing sessreg. This is probably a more secure and efficient way to do it, but this works well enough for now.
#!/usr/bin/perl
use strict;
use warnings;
sub run {
my ($cmd) = @_;
system($cmd) == 0 or die "system $cmd: $?";
}
my $host = $ENV{DISPLAY};
$host =~ s/\:.*$//;
run "scp -q $ENV{XAUTHORITY} $host:/tmp/xauth";
run "ssh $host 'x11vnc -auth /tmp/xauth -display $ENV{DISPLAY} -forever -bg
-clear_mods -accept popup -o /var/log/x11vnc.$$'";
signature.asc
Description: Digital signature
