From af97157d4a31f058c165aadc14c512a6da36a9a6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 Sep 2017 15:16:05 +0100 Subject: [PATCH] Patchwork desktop icon on mesh client --- src/freedombone-image-customise | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 9077100d..7487427c 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -588,6 +588,21 @@ EOF fi fi rm $rootdir/usr/bin/install_patchwork + + echo '#!/bin/bash' > $rootdir/usr/bin/start_patchwork + echo 'cd /etc/patchwork' > $rootdir/usr/bin/start_patchwork + echo 'npm start' > $rootdir/usr/bin/start_patchwork + chmod +x $rootdir/usr/bin/start_patchwork + + echo '[Desktop Entry]' > $rootdir/home/$MY_USERNAME/Desktop/social.desktop + echo 'Name=Social' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop + echo 'Type=Application' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop + echo 'Comment=A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop + echo 'Exec=bash /usr/bin/start_patchwork' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop + echo "Icon=/root/freedombone/img/icon_patchwork.png" >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop + echo 'StartupNotify=true' >> $rootdir/home/$MY_USERNAME/Desktop/social.desktop + chmod +x $rootdir/home/$MY_USERNAME/Desktop/social.desktop + chown $MY_USERNAME:$MY_USERNAME $rootdir/home/$MY_USERNAME/Desktop/social.desktop } initialise_mesh() { @@ -894,6 +909,9 @@ if [ \$no_of_users -gt 0 ]; then chmod +x /home/$MY_USERNAME/Desktop/tox.desktop chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/tox.desktop fi + if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then + sed -i 's|Name=.*|Name=Social|g' /home/$MY_USERNAME/Desktop/social.desktop + fi else if [ -f /tmp/Users.txt ]; then rm /tmp/Users.txt @@ -910,6 +928,9 @@ else if [ -f /home/$MY_USERNAME/Desktop/tox.desktop ]; then rm /home/$MY_USERNAME/Desktop/tox.desktop fi + if [ -f /home/$MY_USERNAME/Desktop/social.desktop ]; then + sed -i 's|Name=.*|Name=Social (Offline)|g' /home/$MY_USERNAME/Desktop/social.desktop + fi pkill qtox fi fi