From d36f0dbabef8b3c9bebcc6fb3369ba3cdec6b75b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 29 Dec 2015 14:30:32 +0100 Subject: [PATCH] Set up Xauthority using a single invokation --- unix/vncserver | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index 725cbd54..bb95506d 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -242,8 +242,10 @@ unlink($desktopLog); $cookie = `mcookie`; -system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie"); -system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie"); +open(XAUTH, "|xauth -f $xauthorityFile source -"); +print XAUTH "add $host:$displayNumber . $cookie\n"; +print XAUTH "add $host/unix:$displayNumber . $cookie\n"; +close(XAUTH); if ($opt{'-name'}) { $desktopName = $opt{'-name'}; -- 2.39.5