diff --git a/bin/xenial-desktop.tgz b/bin/xenial-desktop.tgz new file mode 100644 index 000000000..87d8ed004 Binary files /dev/null and b/bin/xenial-desktop.tgz differ diff --git a/desktop.sh b/desktop.sh index c375898e0..229a1edb5 100644 --- a/desktop.sh +++ b/desktop.sh @@ -48,12 +48,20 @@ if [[ $RELEASE == "trusty" ]]; then chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/trusty-desktop.tgz -C /root/" fi +# Ubuntu Xenial +if [[ $RELEASE == xenial ]]; then + # copy wallpapers and default desktop settings + d=$DEST/cache/sdcard/usr/share/backgrounds/xfce/ + test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/armbian*.jpg "$d" + chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/xenial-desktop.tgz -C /etc/skel/" + chroot $DEST/cache/sdcard /bin/bash -c "tar xfz /tmp/xenial-desktop.tgz -C /root/" + mkdir -p $DEST/cache/sdcard/etc/polkit-1/localauthority/50-local.d + cp $SRC/lib/config/polkit-jessie/*.pkla $DEST/cache/sdcard/etc/polkit-1/localauthority/50-local.d/ +fi + # Install custom icons and theme chroot $DEST/cache/sdcard /bin/bash -c "dpkg -i /tmp/vibrancy-colors_2.4-trusty-Noobslab.com_all.deb >/dev/null 2>&1" chroot $DEST/cache/sdcard /bin/bash -c "unzip -qq /tmp/NumixHolo.zip -d /usr/share/themes" -# cleanup -chroot $DEST/cache/sdcard /bin/bash -c "apt-get -y autoremove >/dev/null 2>&1" -chroot $DEST/cache/sdcard /bin/bash -c "apt-get clean >/dev/null 2>&1" # unmount bind mount umount $DEST/cache/sdcard/tmp >/dev/null 2>&1 diff --git a/scripts/check_first_login.sh b/scripts/check_first_login.sh index 65b69dc8f..b366e9f4d 100644 --- a/scripts/check_first_login.sh +++ b/scripts/check_first_login.sh @@ -31,10 +31,12 @@ if [ "$-" != "${-#*i}" ]; then if [ -f /etc/init.d/nodm ] ; then sed -i "s/NODM_USER=\(.*\)/NODM_USER=${RealUserName}/" /etc/default/nodm sed -i "s/NODM_ENABLED=\(.*\)/NODM_ENABLED=true/g" /etc/default/nodm - if [ "X${ConfigureDisplay}" = "Xn" -o "X${ConfigureDisplay}" = "XN" ]; then + if [[ -z $ConfigureDisplay || $ConfigureDisplay == n || $ConfigureDisplay == N ]]; then echo -e "\n\e[1m\e[39mNow starting desktop environment...\x1B[0m\n" sleep 3 - service nodm restart + service nodm stop + sleep 1 + service nodm start fi fi fi