Skip to content

Commit

Permalink
Fix vncpasswd not found
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanpham-dev committed May 13, 2020
1 parent b33c048 commit 4d1c130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firstrun
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ create_oem_install() {
echo "$ROOTPASSWORD" >> $TMPDIR/rootpassword
msg "Setting root password..."
passwd root < $TMPDIR/rootpassword 1> /dev/null 2>&1
/usr/bin/vncpasswd -f <<<"$ROOTPASSWORD"$'\n'"$ROOTPASSWORD" > /root/.vnc/passwd
/usr/local/bin/vncpasswd -f <<<"$ROOTPASSWORD"$'\n'"$ROOTPASSWORD" > /root/.vnc/passwd
msg "Adding user $USER..."
echo "" > $TMPDIR/status
useradd -m -G sudo -s /bin/bash -U $(cat $TMPDIR/user) 1> /dev/null 2>&1 && echo "done" > $TMPDIR/status &
Expand All @@ -51,7 +51,7 @@ create_oem_install() {
chfn -f "$FULLNAME" $(cat $TMPDIR/user) 1> /dev/null 2>&1
msg "Setting password for $USER..."
passwd $(cat $TMPDIR/user) < $TMPDIR/password 1> /dev/null 2>&1
/usr/bin/vncpasswd -f <<<"$PASSWORD"$'\n'"$PASSWORD" > /home/$USER/.vnc/passwd
/usr/local/bin/vncpasswd -f <<<"$PASSWORD"$'\n'"$PASSWORD" > /home/$USER/.vnc/passwd
sed -i "/^root/a $USER ALL=(ALL) ALL" /etc/sudoers
msg "Applying system settings..."
systemctl disable systemd-resolved.service 1> /dev/null 2>&1
Expand Down

0 comments on commit 4d1c130

Please sign in to comment.