LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash background changing script (https://www.linuxquestions.org/questions/linux-newbie-8/bash-background-changing-script-4175537273/)

R1g1L 03-19-2015 03:00 PM

Bash background changing script
 
Hey internet people i have been trying to create a bash script that will change my desktop background, boot splash image, and the gdm3 login background. If one of you could write it for me or atleast point me in the right direction i would greatly appreciate it. Im currently running tango studio (based on debian)

Habitual 03-19-2015 04:15 PM

Welcome to LQ!
While we love to help, you need to tell us, or rather show us some work that you've attempted so far.
What have you read about doing this task?
Where did you read about doing this task?

R1g1L 03-21-2015 03:55 PM

sorry it took so long to reply i was out of town. This is what i have so far


#!/bin/bash
FIXING REPOS {

echo "FIXING REPO'S"
echo -e "\033[31m====== Adding Bleeding Edge repo and updating ======\033[m"
echo "" >> /etc/apt/sources.list
echo '# Bleeding Edge ' >> /etc/apt/sources.list
echo 'deb http://repo.kali.org/kali kali-bleeding-edge main' >> /etc/apt/sources.list
echo 'deb-src http://http.kali.org/kali kali main non-free contrib > /etc/apt/sources.list
echo 'deb-src http://security.kali.org/kali-security kali/updates main contrib non-free > /etc/apt/sources.list
apt-get update
apt-get -y upgrade
}
#INSTALLING HEADER
{
echo && echo -e " ${r}INSTALLING HEADER${endc}"
apt-get install -y linux-headers-$(uname -r) && update db
echo -e " ${b}${r}DONE"
}

######## Install Flash
{
echo -e "\e[31m[+] Installing Flash now!\e[0m"
apt-get -y install flashplugin-nonfree
update-flashplugin-nonfree --install
echo -e "\e[32m[-] Done Installing Flash!\e[0m"

}

######## Install VPNS
{
echo -e "\e[31m[+] INSTALLING VPNS\e[0m"
apt-get -y aptitude -r -y install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome
echo -e "\e[32m[-] Done Installing vpns!\e[0m"

}

# Installing virtualbox
{
echo && echo -e " ${r}INSTALLING VIRTUALBOX${endc}"
aptitude -y install virtualbox
echo -e " ${b}VIRTUALBOX READY "
}
# apt-get autoclean
{
echo && echo -e " ${r}CLEANING THE SYSTEM${endc}"
apt-get clean && apt-get autoclean
echo -e " ${b}${r}SYSTEM IS CLEAN"
}
#BACKGROUNDS
{
echo && echo -e " ${r}CHANGING BACKGROUNDS${endc}"
rm /usr/share/images/desktop-base/desktop-grub.jpg
cp /media/"Kali Live"/Rboot/desktop-grub.jpg /usr/share/images/desktop-base/
rm /usr/share/images/desktop-base/login-background.png
cp /media/"Kali Live"/Rboot/login-background.png /usr/share/images/desktop-base
rm /usr/share/images/desktop-base/desktop-grub.png
cp /media/"Kali Live"/Rboot/desktop-grub.png /usr/share/images/desktop-base/
rm /usr/share/images/desktop-base/kali-grub.png
cp /media/"Kali Live"/Rboot/kali-grub.png /usr/share/images/desktop-base/
}
echo && echo -en " ${r}ALL DONE PRESS ENTER TO EXIT${endc}"
read input
restart now
}
}


For some reason everytime i run it the terminal opens up and then disappears without performing anything,
Thanks in advance for your help.


All times are GMT -5. The time now is 05:19 PM.