From 13667daeabbe88d23146caed695b56da1158a849 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Wed, 15 Jun 2016 17:56:21 +0300 Subject: [PATCH] Hack to fix vnc password generation, Fixes #26 --- src/chroot_script | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/chroot_script b/src/chroot_script index be793d6..5e5f6d9 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -82,6 +82,14 @@ sed -i 's/#autologin-user=.*/autologin-user=pi/g' /etc/lightdm/lightdm.conf #set up x11vnc sudo -u pi /home/pi/scripts/setX11vncPass raspberry +if [ ! -f /home/pi/.vnc/passwd ]; then + echo "/home/pi/.vnc/passwd was not created" + sudo -u pi /home/pi/scripts/setX11vncPass raspberry + if [ ! -f /home/pi/.vnc/passwd ]; then + echo "failed again" + exit 1 + fi +fi #echo "sudo -u pi startx /home/pi/scripts/run_onepageos &" >> /etc/rc.local #echo "(sleep 15 ; sudo -u pi /home/pi/scripts/fullscreen) &" >> /etc/rc.local