diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 779a6bbc..fb9f60d4 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -109,6 +109,10 @@ AMNESIC='no' # defines the initial keyboard layout KEYBOARD_MAP='gb' +# Strings used for setting the username +MESH_TITLE=$"Freedombone Mesh" +MESH_SET_USERNAME=$"Welcome to the Freedombone mesh.\n\nThe first thing you will need to do is set a username so that other peers can find you." + enable_eatmydata_override() { chroot $rootdir apt-get install --no-install-recommends -y eatmydata if [ -x $rootdir/usr/bin/eatmydata ] && \ @@ -605,9 +609,9 @@ function mesh_client_startup_applications { 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 $"Freedombone Mesh" \' >> $START_DESKTOP - echo ' --backtitle $"Freedombone Mesh" \' >> $START_DESKTOP - echo ' --inputbox $"\nWelcome to the Freedombone mesh.\n\nThe first thing you will need to do is set a username so that other peers can find you." 12 60 "Anon" 2>$data' >> $START_DESKTOP + echo " dialog --title \"${MESH_TITLE}\" " >> $START_DESKTOP + echo " --backtitle \"${MESH_TITLE}\" " >> $START_DESKTOP + echo " --inputbox \"${MESH_SET_USERNAME}\" 12 60 \"Anon\" 2>$data" >> $START_DESKTOP echo ' sel=$?' >> $START_DESKTOP echo ' case $sel in' >> $START_DESKTOP echo ' 0)' >> $START_DESKTOP @@ -633,6 +637,18 @@ function mesh_client_startup_applications { echo "Exec=bash -c '~/mesh-desktop.sh'" >> $START_DESKTOP2 echo 'X-GNOME-Autostart-enabled=true' >> $START_DESKTOP2 chmod +x $START_DESKTOP2 + + START_DESKTOP3=$rootdir/home/$MY_USERNAME/.config/autostart/set_username.desktop + echo '[Desktop Entry]' > $START_DESKTOP3 + echo 'Version=1.0' >> $START_DESKTOP3 + echo 'Name=Set Username' >> $START_DESKTOP3 + echo 'Type=Application' >> $START_DESKTOP3 + echo 'Comment=Set username' >> $START_DESKTOP3 + echo "Exec=mate-terminal -e /home/${MY_USERNAME}/mesh-desktop.sh" >> $START_DESKTOP3 + echo 'Icon=user-away' >> $START_DESKTOP3 + echo 'Terminal=false' >> $START_DESKTOP3 + echo 'Categories=Application;' >> $START_DESKTOP3 + chmod +x $START_DESKTOP3 } function mesh_desktop_icons {