|
@@ -779,18 +779,11 @@ function mesh_client_startup_applications {
|
779
|
779
|
echo '' >> $START_DESKTOP
|
780
|
780
|
echo 'INITIAL_TOX_USERNAME=""' >> $START_DESKTOP
|
781
|
781
|
echo 'while [ ${#INITIAL_TOX_USERNAME} -eq 0 ]; do' >> $START_DESKTOP
|
782
|
|
- echo ' data=$(tempfile 2>/dev/null)' >> $START_DESKTOP
|
783
|
|
- echo ' trap "rm -f $data" 0 1 2 5 15' >> $START_DESKTOP
|
784
|
|
- echo -n " dialog --title \"${MESH_TITLE}\" " >> $START_DESKTOP
|
785
|
|
- echo -n "--backtitle \"${MESH_TITLE}\" " >> $START_DESKTOP
|
786
|
|
- echo -n "--inputbox \"${MESH_SET_USERNAME}\" 12 60 Anon " >> $START_DESKTOP
|
787
|
|
- echo '2>$data' >> $START_DESKTOP
|
788
|
|
- echo ' sel=$?' >> $START_DESKTOP
|
789
|
|
- echo ' case $sel in' >> $START_DESKTOP
|
790
|
|
- echo ' 0)' >> $START_DESKTOP
|
791
|
|
- echo ' INITIAL_TOX_USERNAME=$(<$data)' >> $START_DESKTOP
|
792
|
|
- echo ' ;;' >> $START_DESKTOP
|
793
|
|
- echo ' esac' >> $START_DESKTOP
|
|
782
|
+ echo " data=\$(zenity --forms --title=\"$MESH_TITLE\" --text=\"$MESH_SET_USERNAME\" --separator=\",\" --add-entry=\"Username\")" >> $START_DESKTOP
|
|
783
|
+ echo ' accepted=$?' >> $START_DESKTOP
|
|
784
|
+ echo ' if ((accepted == 0)); then' >> $START_DESKTOP
|
|
785
|
+ echo " INITIAL_TOX_USERNAME=\$(awk -F, '{print \$1}' <<<\$data)" >> $START_DESKTOP
|
|
786
|
+ echo ' fi' >> $START_DESKTOP
|
794
|
787
|
echo 'done' >> $START_DESKTOP
|
795
|
788
|
echo '' >> $START_DESKTOP
|
796
|
789
|
echo 'toxid --setuser "$INITIAL_TOX_USERNAME"' >> $START_DESKTOP
|
|
@@ -892,6 +885,9 @@ function configure_user_interface {
|
892
|
885
|
# audio recording
|
893
|
886
|
chroot "$rootdir" apt-get -yq install audacity
|
894
|
887
|
|
|
888
|
+ # for gtk dialog entry
|
|
889
|
+ chroot "$rootdir" apt-get -yq install zenity
|
|
890
|
+
|
895
|
891
|
# Produce a text file on the desktop listing users on the mesh
|
896
|
892
|
cat <<EOF > $rootdir/usr/bin/list-tox-users
|
897
|
893
|
#!/bin/bash
|