diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index fe9b65ad..ab2c299a 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -584,7 +584,7 @@ function mesh_client_startup_applications { fi START_DESKTOP=$rootdir/home/$MY_USERNAME/mesh-desktop.sh - FIRST_BOOT=/home/$MY_USERNAME/.first_boot + FIRST_BOOT=/home/$MY_USERNAME/.first_boot echo '#!/bin/bash' > $START_DESKTOP echo "setxkbmap ${KEYBOARD_MAP}" > $START_DESKTOP echo 'dconf write /org/mate/caja/desktop/volumes-visible false' >> $START_DESKTOP @@ -600,35 +600,35 @@ function mesh_client_startup_applications { echo "env | grep DBUS_SESSION_BUS_ADDRESS > /home/$MY_USERNAME/.dbus/Xdbus" >> $START_DESKTOP echo "echo 'export DBUS_SESSION_BUS_ADDRESS' >> /home/$MY_USERNAME/.dbus/Xdbus" >> $START_DESKTOP - echo '' >> $START_DESKTOP - echo "if [ ! -f $FIRST_BOOT ]; then" >> $START_DESKTOP - echo ' exit 0' >> $START_DESKTOP - echo 'fi' >> $START_DESKTOP - echo '' >> $START_DESKTOP - echo 'INITIAL_TOX_USERNAME=' >> $START_DESKTOP - echo 'while [ ! $INITIAL_TOX_USERNAME ]; do' >> $START_DESKTOP - echo ' data=$(tempfile 2>/dev/null)' >> $START_DESKTOP - echo ' trap "rm -f $data" 0 1 2 5 15' >> $START_DESKTOP - echo " dialog --title \"${MESH_TITLE}\" " >> $START_DESKTOP - echo " --backtitle \"${MESH_TITLE}\" " >> $START_DESKTOP - echo -n " --inputbox \"${MESH_SET_USERNAME}\" 12 60 Anon " >> $START_DESKTOP - echo '2>$data' >> $START_DESKTOP - echo ' sel=$?' >> $START_DESKTOP - echo ' case $sel in' >> $START_DESKTOP - echo ' 0)' >> $START_DESKTOP - echo ' INITIAL_TOX_USERNAME=$(<$data)' >> $START_DESKTOP - echo ' if [ ${#INITIAL_TOX_USERNAME} -lt 1 ]; then' >> $START_DESKTOP - echo ' INITIAL_TOX_USERNAME=' >> $START_DESKTOP - echo ' fi' >> $START_DESKTOP - echo ' ;;' >> $START_DESKTOP - echo ' esac' >> $START_DESKTOP - echo 'done' >> $START_DESKTOP - echo '' >> $START_DESKTOP - echo 'toxid --setuser "$INITIAL_TOX_USERNAME"' >> $START_DESKTOP - echo '' >> $START_DESKTOP - echo "rm -f $FIRST_BOOT" >> $START_DESKTOP - echo '' >> $START_DESKTOP - echo 'exit 0' >> $START_DESKTOP + echo '' >> $START_DESKTOP + echo "if [ ! -f $FIRST_BOOT ]; then" >> $START_DESKTOP + echo ' exit 0' >> $START_DESKTOP + echo 'fi' >> $START_DESKTOP + echo '' >> $START_DESKTOP + echo 'INITIAL_TOX_USERNAME=' >> $START_DESKTOP + echo 'while [ ! $INITIAL_TOX_USERNAME ]; do' >> $START_DESKTOP + echo ' data=$(tempfile 2>/dev/null)' >> $START_DESKTOP + echo ' trap "rm -f $data" 0 1 2 5 15' >> $START_DESKTOP + echo -n " dialog --title \"${MESH_TITLE}\" " >> $START_DESKTOP + echo -n "--backtitle \"${MESH_TITLE}\" " >> $START_DESKTOP + echo -n "--inputbox \"${MESH_SET_USERNAME}\" 12 60 Anon " >> $START_DESKTOP + echo '2>$data' >> $START_DESKTOP + echo ' sel=$?' >> $START_DESKTOP + echo ' case $sel in' >> $START_DESKTOP + echo ' 0)' >> $START_DESKTOP + echo ' INITIAL_TOX_USERNAME=$(<$data)' >> $START_DESKTOP + echo ' if [ ${#INITIAL_TOX_USERNAME} -lt 1 ]; then' >> $START_DESKTOP + echo ' INITIAL_TOX_USERNAME=' >> $START_DESKTOP + echo ' fi' >> $START_DESKTOP + echo ' ;;' >> $START_DESKTOP + echo ' esac' >> $START_DESKTOP + echo 'done' >> $START_DESKTOP + echo '' >> $START_DESKTOP + echo 'toxid --setuser "$INITIAL_TOX_USERNAME"' >> $START_DESKTOP + echo '' >> $START_DESKTOP + echo "rm -f $FIRST_BOOT" >> $START_DESKTOP + echo '' >> $START_DESKTOP + echo 'exit 0' >> $START_DESKTOP chmod +x $START_DESKTOP START_DESKTOP2=$rootdir/home/$MY_USERNAME/.config/autostart/mesh-start.desktop