From 1067b3e8cf138c01acf20ec384baa96f08e346b3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Oct 2017 20:10:51 +0100 Subject: [PATCH] Change place where ssb mesh icons are initially created --- src/freedombone-image-customise | 24 ------------------------ src/freedombone-image-mesh | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index ac827bc3..f13cc6a6 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -600,18 +600,6 @@ EOF # Copy icon to an accesible location cp $rootdir/root/$PROJECT_NAME/img/icon_patchwork.png $rootdir/etc/patchwork/icon_patchwork.png - - if [ -d $rootdir/home/$MY_USERNAME ]; then - echo '[Desktop Entry]' > $rootdir/home/$MY_USERNAME/Desktop/social.desktop - echo 'Name=Social (Offline)' >> $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=/etc/patchwork/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 - chroot "$rootdir" chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/social.desktop - fi } install_ferment() { @@ -649,18 +637,6 @@ EOF # Copy icon to an accesible location cp $rootdir/root/$PROJECT_NAME/img/icon_ferment.png $rootdir/etc/patchwork/icon_ferment.png - - if [ -d $rootdir/home/$MY_USERNAME ]; then - echo '[Desktop Entry]' > $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - echo 'Name=Audio/Music (Offline)' >> $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - echo 'Type=Application' >> $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - echo 'Comment=Audio publishing and streaming' >> $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - echo 'Exec=bash /usr/bin/start_ferment' >> $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - echo "Icon=/etc/patchwork/icon_ferment.png" >> $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - echo 'StartupNotify=true' >> $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - chmod +x $rootdir/home/$MY_USERNAME/Desktop/audio.desktop - chroot "$rootdir" chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/audio.desktop - fi } initialise_mesh() { diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 4c1ea0d0..287784f2 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -792,6 +792,32 @@ function initialise_scuttlebot_pub { systemctl restart scuttlebot.service } +function add_ssb_icons { + if [ ! -d /home/$MY_USERNAME/Desktop ]; then + return + fi + + echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop + echo 'Name=Social (Offline)' >> /home/$MY_USERNAME/Desktop/social.desktop + echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/social.desktop + echo 'Comment=A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)' >> /home/$MY_USERNAME/Desktop/social.desktop + echo 'Exec=bash /usr/bin/start_patchwork' >> /home/$MY_USERNAME/Desktop/social.desktop + echo "Icon=/etc/patchwork/icon_patchwork.png" >> /home/$MY_USERNAME/Desktop/social.desktop + echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/social.desktop + chmod +x /home/$MY_USERNAME/Desktop/social.desktop + chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/social.desktop + + echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/audio.desktop + echo 'Name=Audio/Music (Offline)' >> /home/$MY_USERNAME/Desktop/audio.desktop + echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/audio.desktop + echo 'Comment=Audio publishing and streaming' >> /home/$MY_USERNAME/Desktop/audio.desktop + echo 'Exec=bash /usr/bin/start_ferment' >> /home/$MY_USERNAME/Desktop/audio.desktop + echo "Icon=/etc/patchwork/icon_ferment.png" >> /home/$MY_USERNAME/Desktop/audio.desktop + echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/audio.desktop + chmod +x /home/$MY_USERNAME/Desktop/audio.desktop + chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/audio.desktop +} + # whether to reset the identity set_new_identity= if [ $2 ]; then @@ -855,6 +881,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then #setup_tahoelafs mesh_setup_vpn initialise_scuttlebot_pub + add_ssb_icons setup_ipfs mesh_amnesic make_root_read_only