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.$$'";

Attachment: signature.asc
Description: Digital signature

Reply via email to