Linux Lite 8.0 RC1 has been released - Click here


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Lite Upgrade Development
#1

Code:
#!/bin/bash
#----------------------------------------------------------------
# Description: Linux Lite Upgrade Script
# Authors: Misko_2083, Jerry Bezencon 2015
# Website: https://www.linuxliteos.com
#----------------------------------------------------------------

# Ensure multi-language support
export LANG=C

# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]
then
   sudo killall -9 synaptic
else
   echo""
fi

if [ -z "$(pgrep gdebi-gtk)" ]
then
   echo ""
else
   killall -9 gdebi-gtk
fi

# Linux Lite default dialog icon
ic="/usr/share/icons/zenity-llcc.png"

# Get list of available updated packages
zenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now Upgrade to Linux Lite 2.2\n\nPlease ensure you are connected to the internet before you start.\n\nClick Yes to continue or No to abort."
   if [ "$?" -eq "0" ];then

x=$( stdbuf -oL /bin/bash \-c '(sudo apt-get update \-y )' 2>&1 |
stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|
zenity --progress --title="Updating package information..." --pulsate \
--width=600 --auto-close )

# Erase existing available info
sudo dpkg --clear-avail

  else
       exit 0
  fi

# Install new packages, remove obsolete packages, clean up
x=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y && sudo apt-get install inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin \-y && sudo apt-get update \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |
stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|
zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate \
--width=600 --auto-close )

# Reboot dialogue
# Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279
title="Select Reboot to complete the Upgrade"
exit_type=`zenity  --width="380" --height="220" --title="$title" --list --radiolist --column="Select" \
    --column="Exit Type" --column="Description" \
    TRUE "Reboot" "Reboot your computer"\
    FALSE "Shutdown" "Shutdown your computer"\
    FALSE "Cancel" "Continue using your computer" `

# User must select a target type (Check if they cancelled)
if [ ! "$exit_type" ]; then
    zenity --error --title="Error" --text="You must make a selection"
    exit
fi

# Action to perform by user
if [ "$exit_type" = "Reboot" ]
then

        # Do Reboot here
        sudo shutdown -r now | zenity --progress --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300


elif [ "$exit_type" = "Shutdown" ]
then
    # Do Shutdown here
    sudo shutdown -h now | zenity --progress --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300

else

    # Do Cancel here
    exit 0
fi

# #############BELOW CODE NEEDS COMPLETION AND INTEGRATING INTO ABOVE CODE#############

# #############CODE COMPLETED#############

# Add new wallapapers
cd /tmp
wget http://repo.linuxliteos.com/upgrade/2.0-2.2/walls-2.2.tar.gz
tar -xvf walls-2.2.tar.gz /usr/share/backgrounds/xfce/
cd /usr/share/backgrounds/xfce/
sudo chown root:root *.jpg
sudo chown root:root *.png

# Update plymouth, lsb_release and issue files
# /etc changes
sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/llver
sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/lsb-release
sudo sed -i "s/Linux Lite 2.0 LTS \n \l/Linux Lite 2.2 LTS \n \l/g" /etc/issue

# /lib/plymouth/themes/ubuntu-text/ changes
sudo sed -i "s/Ubuntu 14.04/Linux Lite 2.2/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/black=0x2c001e/black=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/white=0xffffff/white=0xffffff/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/brown=0xff4012/brown=0xffff00/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/blue=0x988592/blue=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo update-initramfs -u

# Update to new login screen
cd /tmp
wget https://github.com/linuxlite/litelogin/archive/master.zip
unzip master.zip
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.theme /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.html /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/low_contrast_linen.png /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/style.css /usr/share/lightdm-webkit/themes/linuxlite
sudo rm -rf master.zip
sudo rm -rf litelogin-master/

# #############CODE UNCOMPLETED#############

# Set lite-welcome to autostart on first boot - to do
# Requires script to locate default user, and run the following commands as that user
# command here
# ln -s /usr/share/applications/lite_welcome.desktop /home/USER/.config/autostart ????

# Change launchers from xdg-open to exo-open - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop, alacarte-made-4.desktop, alacarte-made-5.desktop, alacarte-made-6.desktop
# In 64bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop
# Requires script to locate default user, and run the following commands as that user
# commands here

# Implement new Create System Report changes - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file is: alacarte-made-7.desktop
# In 64bit version, file is: alacarte-made-8.desktop
# Change - Exec=x-terminal-emulator --geometry=95x25 -t "Create System Report" -e /usr/scripts/info ##to## Exec=gksudo /usr/scripts/systemreport
# Requires script to locate default user, and run the following commands as that user
# commands here

# Add new right click actions to Thunar - to do (path is /home/USER/.config/Thunar/uca.xml)
# Requires script to locate default user, and run the following commands as that user
# commands here

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#2

Some minor improvements:
Code:
#!/bin/bash
#----------------------------------------------------------------
# Description: Linux Lite Upgrade Script
# Authors: Misko_2083, Jerry Bezencon 2015
# Website: https://www.linuxliteos.com
#----------------------------------------------------------------

# Ensure multi-language support
export LANG=C

# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]
then
   sudo killall -9 synaptic
else
   echo""
fi

if [ -z "$(pgrep gdebi-gtk)" ]
then
   echo ""
else
   killall -9 gdebi-gtk
fi

# Linux Lite default dialog icon
ic="/usr/share/icons/zenity-llcc.png"

# Get list of available updated packages
zenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now Upgrade to Linux Lite 2.2\n\nPlease ensure you are connected to the internet before you start.\n\nClick Yes to continue or No to abort."
   if [ "$?" -eq "0" ];then

stdbuf -oL /bin/bash \-c '(sudo apt-get update \-y )' 2>&1 |
stdbuf -oL sed 's/^/#/g' |
zenity --progress --title="Updating package information..." --pulsate \
--width=600 --auto-close

# Erase existing available info
sudo dpkg --clear-avail

  else
       exit 0
  fi

# Install new packages, remove obsolete packages, clean up
x=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \-y && sudo apt-get install inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |
stdbuf -oL sed 's/^/#/g' |
zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate \
--width=600 --auto-close )

(
# Add new wallapapers
cd /tmp
echo "#Downloading wallpapers"
wget http://repo.linuxliteos.com/upgrade/2.0-2.2/walls-2.2.tar.gz
tar -xvf walls-2.2.tar.gz /usr/share/backgrounds/xfce/
cd /usr/share/backgrounds/xfce/
sudo chown root:root *.jpg
sudo chown root:root *.png
) | zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate


# Update plymouth, lsb_release and issue files
# /etc changes
sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/llver
sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/lsb-release
sudo sed -i "s/Linux Lite 2.0 LTS \n \l/Linux Lite 2.2 LTS \n \l/g" /etc/issue

# /lib/plymouth/themes/ubuntu-text/ changes
sudo sed -i "s/Ubuntu 14.04/Linux Lite 2.2/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/black=0x2c001e/black=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/white=0xffffff/white=0xffffff/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/brown=0xff4012/brown=0xffff00/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/blue=0x988592/blue=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo update-initramfs -u

# Update to new login screen
cd /tmp
wget https://github.com/linuxlite/litelogin/archive/master.zip
unzip master.zip
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.theme /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.html /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/low_contrast_linen.png /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/style.css /usr/share/lightdm-webkit/themes/linuxlite
sudo rm -rf master.zip
sudo rm -rf litelogin-master/



# Reboot dialogue
# Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279
title="Select Reboot to complete the Upgrade"
exit_type=`zenity  --width="380" --height="220" --title="$title" --list --radiolist --column="Select" \
    --column="Exit Type" --column="Description" \
    TRUE "Reboot" "Reboot your computer"\
    FALSE "Shutdown" "Shutdown your computer"\
    FALSE "Cancel" "Continue using your computer" `

# User must select a target type (Check if they cancelled)
if [ ! "$exit_type" ]; then
    zenity --error --title="Error" --text="You must make a selection"
    exit
fi

# Action to perform by user
if [ "$exit_type" = "Reboot" ]
then

        # Do Reboot here
        sudo shutdown -r now | zenity --progress --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300


elif [ "$exit_type" = "Shutdown" ]
then
    # Do Shutdown here
    sudo shutdown -h now | zenity --progress --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300

else

    # Do Cancel here
    exit 0
fi


# #############CODE UNCOMPLETED#############

# Set lite-welcome to autostart on first boot - to do
# Requires script to locate default user, and run the following commands as that user
# command here
# ln -s /usr/share/applications/lite_welcome.desktop /home/USER/.config/autostart ????

# Change launchers from xdg-open to exo-open - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop, alacarte-made-4.desktop, alacarte-made-5.desktop, alacarte-made-6.desktop
# In 64bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop
# Requires script to locate default user, and run the following commands as that user
# commands here

# Implement new Create System Report changes - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file is: alacarte-made-7.desktop
# In 64bit version, file is: alacarte-made-8.desktop
# Change - Exec=x-terminal-emulator --geometry=95x25 -t "Create System Report" -e /usr/scripts/info ##to## Exec=gksudo /usr/scripts/systemreport
# Requires script to locate default user, and run the following commands as that user
# commands here

# Add new right click actions to Thunar - to do (path is /home/USER/.config/Thunar/uca.xml)
# Requires script to locate default user, and run the following commands as that user
# commands here
This part here:
Code:
# #############CODE UNCOMPLETED#############

# Set lite-welcome to autostart on first boot - to do
# Requires script to locate default user, and run the following commands as that user
# command here
# ln -s /usr/share/applications/lite_welcome.desktop /home/USER/.config/autostart?
What is exactly 'default user'?
This command prints user that is set to auto login:
Code:
sed -n 's/^autologin-user=//p' /etc/lightdm/lightdm.conf
this command prints all the user names:
Code:
awk -F':' '$3>=1000 && $3<=60000 {print $1}' /etc/passwd

This part:
Code:
# Change launchers from xdg-open to exo-open - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop, alacarte-made-4.desktop, alacarte-made-5.desktop, alacarte-made-6.desktop
# In 64bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop
# Requires script to locate default user, and run the following commands as that user
# commands here

# Implement new Create System Report changes - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file is: alacarte-made-7.desktop
# In 64bit version, file is: alacarte-made-8.desktop
# Change - Exec=x-terminal-emulator --geometry=95x25 -t "Create System Report" -e /usr/scripts/info ##to## Exec=gksudo /usr/scripts/systemreport
# Requires script to locate default user, and run the following commands as that user
# commands here

# Add new right click actions to Thunar - to do (path is /home/USER/.config/Thunar/uca.xml)
# Requires script to locate default user, and run the following commands as that user
# commands here
The script must change the launchers for all the users + in /etc/skel/.local/share/applications/
to ensure that when creating a new user the user doesn't use old desktop files
Reply
#3

(01-05-2015, 02:46 AM)misko_2083 link Wrote:  Some minor improvements:

Thank you.

(01-05-2015, 02:46 AM)misko_2083 link Wrote:  This part here:

Code:
# #############CODE UNCOMPLETED#############

# Set lite-welcome to autostart on first boot - to do
# Requires script to locate default user, and run the following commands as that user
# command here
# ln -s /usr/share/applications/lite_welcome.desktop /home/USER/.config/autostart?

What is exactly 'default user'?

Default user being the user who installed LL.

(01-05-2015, 02:46 AM)misko_2083 link Wrote:  This command prints user that is set to auto login:
Code:
sed -n 's/^autologin-user=//p' /etc/lightdm/lightdm.conf
this command prints all the user names:
Code:
awk -F':' '$3>=1000 && $3<=60000 {print $1}' /etc/passwd

That's correct. We can use the second command to pull out all the users we need to apply update changes to (in both their /home folder and in /etc/skel as you mentioned below)

(01-05-2015, 02:46 AM)misko_2083 link Wrote:  This part:
Code:
# Change launchers from xdg-open to exo-open - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop, alacarte-made-4.desktop, alacarte-made-5.desktop, alacarte-made-6.desktop
# In 64bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop
# Requires script to locate default user, and run the following commands as that user
# commands here

# Implement new Create System Report changes - to do (path is /home/USER/.local/share/applications/)
# In 32bit version, file is: alacarte-made-7.desktop
# In 64bit version, file is: alacarte-made-8.desktop
# Change - Exec=x-terminal-emulator --geometry=95x25 -t "Create System Report" -e /usr/scripts/info ##to## Exec=gksudo /usr/scripts/systemreport
# Requires script to locate default user, and run the following commands as that user
# commands here

# Add new right click actions to Thunar - to do (path is /home/USER/.config/Thunar/uca.xml)
# Requires script to locate default user, and run the following commands as that user
# commands here

(01-05-2015, 02:46 AM)misko_2083 link Wrote:  The script must change the launchers for all the users + in /etc/skel/.local/share/applications/
to ensure that when creating a new user the user doesn't use old desktop files

See my last comment.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#4

Code:
#!/bin/bash
#----------------------------------------------------------------
# Description: Linux Lite Upgrade Script
# Authors: Misko_2083, Jerry Bezencon 2015
# Website: https://www.linuxliteos.com
#----------------------------------------------------------------

# Ensure multi-language support
export LANG=C

# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]
then
   sudo killall -9 synaptic
else
   echo""
fi

if [ -z "$(pgrep gdebi-gtk)" ]
then
   echo ""
else
   killall -9 gdebi-gtk
fi

# Linux Lite default dialog icon
ic="/usr/share/icons/zenity-llcc.png"

# Get list of available updated packages
zenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now Upgrade to Linux Lite 2.2\n\nPlease ensure you are connected to the internet before you start.\n\nClick Yes to continue or No to abort."
   if [ "$?" -eq "0" ];then

stdbuf -oL /bin/bash \-c '(sudo apt-get update \-y )' 2>&1 |
stdbuf -oL sed 's/^/#/g' |
zenity --progress --title="Updating package information..." --pulsate \
--width=600 --auto-close

# Erase existing available info
sudo dpkg --clear-avail

  else
       exit 0
  fi

# Install new packages, remove obsolete packages, clean up
x=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \-y && sudo apt-get install inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |
stdbuf -oL sed 's/^/#/g' |
zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate \
--width=600 --auto-close )

(
# Add new wallapapers
cd /tmp
echo "#Downloading wallpapers"
wget http://repo.linuxliteos.com/upgrade/2.0-2.2/walls-2.2.tar.gz
tar -xvf walls-2.2.tar.gz /usr/share/backgrounds/xfce/
cd /usr/share/backgrounds/xfce/
sudo chown root:root *.jpg
sudo chown root:root *.png
) | zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate


# Update plymouth, lsb_release and issue files
# /etc changes
sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/llver
sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/lsb-release
sudo sed -i "s/Linux Lite 2.0 LTS \n \l/Linux Lite 2.2 LTS \n \l/g" /etc/issue

# /lib/plymouth/themes/ubuntu-text/ changes
sudo sed -i "s/Ubuntu 14.04/Linux Lite 2.2/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/black=0x2c001e/black=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/white=0xffffff/white=0xffffff/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/brown=0xff4012/brown=0xffff00/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo sed -i "s/blue=0x988592/blue=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
sudo update-initramfs -u

# Update to new login screen
cd /tmp
wget https://github.com/linuxlite/litelogin/archive/master.zip
unzip master.zip
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.theme /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.html /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/low_contrast_linen.png /usr/share/lightdm-webkit/themes/linuxlite
sudo cp /litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/style.css /usr/share/lightdm-webkit/themes/linuxlite
sudo rm -rf master.zip
sudo rm -rf litelogin-master/

#Make sure the list of users is empty
>/tmp/user_ll

#Write usernames to the list
awk -F':' '$3>=1000 && $3<=60000 {print $1}' /etc/passwd >> /tmp/user_ll

while read -r line
do
    # Set lite-welcome to autostart on first boot
    ln -s /usr/share/applications/lite_welcome.desktop /home/"$line"/.config/autostart
 
   # Change launchers from xdg-open to exo-open -  (path is /home/USER/.local/share/applications/)
   sudo  sed -i  's/xdg-open/exo-open/g' /home/"$line"/.local/share/applications/exo-terminal-emulator.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /home/"$line"/.local/share/applications/Thunar.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /home/"$line"/.local/share/applications/alacarte-made-4.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /home/"$line"/.local/share/applications/alacarte-made-5.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /home/"$line"/.local/share/applications/alacarte-made-6.desktop

  # Implement new Create System Report changes  (path is /home/USER/.local/share/applications/)
  sudo  sed -i  's,^Exec=.*$,Exec=gksudo /usr/scripts/systemreport,g' /home/"$line"/.local/share/applications/alacarte-made-7.desktop
done < /tmp/user_ll

# Change launchers from xdg-open to exo-open -  (path is /etc/skel/.local/share/applications/)
  sudo  sed -i  's/xdg-open/exo-open/g' /etc/skel/.local/share/applications/exo-terminal-emulator.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /etc/skel/.local/share/applications/Thunar.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /etc/skel/.local/share/applications/alacarte-made-4.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /etc/skel/.local/share/applications/alacarte-made-5.desktop
   sudo  sed -i  's/xdg-open/exo-open/g' /etc/skel/.local/share/applications/alacarte-made-6.desktop


# Reboot dialogue
# Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279
title="Select Reboot to complete the Upgrade"
exit_type=`zenity  --width="380" --height="220" --title="$title" --list --radiolist --column="Select" \
    --column="Exit Type" --column="Description" \
    TRUE "Reboot" "Reboot your computer"\
    FALSE "Shutdown" "Shutdown your computer"\
    FALSE "Cancel" "Continue using your computer" `

# User must select a target type (Check if they cancelled)
if [ ! "$exit_type" ]; then
    zenity --error --title="Error" --text="You must make a selection"
    exit
fi

# Action to perform by user
if [ "$exit_type" = "Reboot" ]
then

        # Do Reboot here
        sudo shutdown -r now | zenity --progress --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300


elif [ "$exit_type" = "Shutdown" ]
then
    # Do Shutdown here
    sudo shutdown -h now | zenity --progress --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300

else

    # Do Cancel here
    exit 0
fi


# #############CODE UNCOMPLETED#############
# Add new right click actions to Thunar - to do (path is /home/USER/.config/Thunar/uca.xml)
# Requires script to locate default user, and run the following commands as that user
# commands here
I've done a part of the uncompleted code for the 32bit version.
/home/NEW_USER/.local/share/applications/exo-terminal-emulator.desktop
and /home/NEW_USER/.local/share/applications/Thunar.desktop
are missing when I create a new user.
I've created a new user to test the code.
It's because they aren't in /etc/skel/.local/share/applications/
Is this just on my side?
Code:
$ ls /etc/skel/.local/share/applications/
alacarte-made-10.desktop  alacarte-made-5.desktop  defaults.list
alacarte-made-11.desktop  alacarte-made-6.desktop  gnome-system-log.desktop
alacarte-made-1.desktop   alacarte-made-7.desktop  hardinfo.desktop
alacarte-made-2.desktop   alacarte-made-8.desktop  htop.desktop
alacarte-made-3.desktop   alacarte-made-9.desktop  mimeapps.list
alacarte-made-4.desktop   alacarte-made.desktop    xfce4-session-logout.desktop
Reply
#5

I've merged the 32bit and 64bit scripts.
Did the test on 32bit LL 2.2. So far it seems ok.
Some old icons are in the menu but they will go away once you update lite-software. update-gui not working I guess you will include that in the new lite-software package once 2.4 is ready.

lite-upgrade-series2
Code:
#!/bin/bash
#----------------------------------------------------------------
# Description: Linux Lite Upgrade Script - Home
# About: For Linux Lite 2.- Series only
# Authors: Misko_2083, Jerry Bezencon 2015
# Website: https://www.linuxliteos.com
#----------------------------------------------------------------

# Ensure multi-language support
export LANG=C

# Linux Lite default dialog icon
ic="/usr/share/icons/zenity-llcc.png"

# Set functions for non-root execution
# The ones that need root go to the other file: lite-upgrade-system-series2
MKDIRBUPS() {
    echo "#Creating back up directories..."
    sleep 2
        mkdir -p /home/$USER/.llupgradebackup/2.4
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nCreating back up directories!\nUpgrade canceled."
                    exit 1
                        fi
     mkdir -p /etc/skel/.llupgradebackup/2.4
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nCreating back up directories!\nUpgrade canceled."
                    exit 1
                        fi
}

# Copy all original files from /home/user and /etc/skel to their respective backup folders and versions

# Backup /home/$USER/ first
BUPHOMEUSER() {
    echo "#Backing up select home files..."
        cp /home/$USER/.config/lxterminal/lxterminal.conf /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.config/xfce4/panel/whiskermenu-1.rc /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/exo-terminal-emulator.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/exo-file-manager.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/exo-file-manager.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-2.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-4.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-5.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-6.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-7.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-10.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-11.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.config/Thunar/uca.xml /home/$USER/.llupgradebackup/2.4
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nBacking up select home files!"
                        fi
}

BUPHOMEUSER64() {
    echo "#Backing up select home files..."
        cp /home/$USER/.config/lxterminal/lxterminal.conf /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.config/xfce4/panel/whiskermenu-1.rc /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/exo-terminal-emulator.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/exo-file-manager.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/exo-file-manager.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.local/share/applications/alacarte-made-2.desktop /home/$USER/.llupgradebackup/2.4
        cp /home/$USER/.config/Thunar/uca.xml /home/$USER/.llupgradebackup/2.4
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nBacking up select home files!"
                        fi
}

# Then backup /etc/skel/
BUPETCSKEL() {
    echo "#Backing up /etc/skel files..."
        cp /etc/skel/.config/lxterminal/lxterminal.conf /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.config/xfce4/panel/whiskermenu-1.rc /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/exo-terminal-emulator.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/exo-file-manager.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/exo-file-manager.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-2.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-4.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-5.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-6.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-7.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-10.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-11.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.config/Thunar/uca.xml /etc/skel/.llupgradebackup/2.4
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nBacking up /etc/skel files!"
                        fi
}

BUPETCSKEL64() {
    echo "#Backing up /etc/skel files..."
        cp /etc/skel/.config/lxterminal/lxterminal.conf /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.config/xfce4/panel/whiskermenu-1.rc /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/exo-terminal-emulator.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/exo-file-manager.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/exo-file-manager.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.local/share/applications/alacarte-made-2.desktop /etc/skel/.llupgradebackup/2.4
        cp /etc/skel/.config/Thunar/uca.xml /etc/skel/.llupgradebackup/2.4
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nBacking up /etc/skel files!"
                        fi
}

# Set lite-welcome to autostart on first boot
LITEWELCOME() {
    echo "#Setting Lite Welcome to autostart..."
        ln -s /usr/share/applications/lite_welcome.desktop /home/$USER/.config/autostart
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nSetting Lite Welcome to autostart!"
                        fi
}

# Change launchers from xdg-open to exo-open - to do (path is /home/$USER/.local/share/applications/)
# In 32bit version, file are: exo-terminal-emulator.desktop, alacarte-made-2.desktop, alacarte-made-4.desktop, alacarte-made-5.desktop, alacarte-made-6.desktop
# In 64bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktop
XDGTOEXO() {
    echo "#Changing launchers from xdg-open to exo-open..."
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/exo-terminal-emulator.desktop
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-2.desktop
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-4.desktop
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-5.desktop
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-6.desktop
        cp /home/$USER/.local/share/applications/exo-terminal-emulator.desktop /etc/skel/.local/share/applications/
        cp /home/$USER/.local/share/applications/alacarte-made-2.desktop /etc/skel/.local/share/applications/
        cp /home/$USER/.local/share/applications/alacarte-made-4.desktop /etc/skel/.local/share/applications/
        cp /home/$USER/.local/share/applications/alacarte-made-5.desktop /etc/skel/.local/share/applications/
        cp /home/$USER/.local/share/applications/alacarte-made-6.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nChanging launchers from xdg-open to exo-open!"
                        fi
}

XDGTOEXO64() {
    echo "#Changing launchers from xdg-open to exo-open..."
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/exo-terminal-emulator.desktop
        sed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-2.desktop
        cp /home/$USER/.local/share/applications/exo-terminal-emulator.desktop /etc/skel/.local/share/applications/
        cp /home/$USER/.local/share/applications/alacarte-made-2.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nChanging launchers from xdg-open to exo-open!"
                        fi
}

# Change to gksudo for Install Updates, file is: exo-file-manager.desktop for new GUI Updates
UPDATECOM() {
    echo "#Updating to new GUI Updates..."
        mv /home/$USER/.local/share/applications/exo-file-manager.desktop /home/$USER/.local/share/applications/exo-file-manager.desktop.backup
        mv /etc/skel/.local/share/applications/exo-file-manager.desktop /etc/skel/.local/share/applications/exo-file-manager.desktop.backup
        touch /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Version=1.0" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Type=Application" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Exec=gksudo /usr/scripts/updates-gui" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Icon=system-software-installer" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "StartupNotify=true" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Terminal=false" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Categories=Utility;X-XFCE;X-Xfce-Toplevel;" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "OnlyShowIn=XFCE;" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "X-XFCE-MimeType=x-scheme-handler/file;x-scheme-handler/trash;" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Name=Install Updates" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        echo "Comment=Get the latest updates for your computer" >> /home/$USER/.local/share/applications/exo-file-manager.desktop
        cp /home/$USER/.local/share/applications/exo-file-manager.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nChanging launcher to GUI Updates!"
                        fi
}

# Create new Network Share Settings Menu link, file name will be: alacarte-made-50.desktop
CNSSGUI() {
    echo "#Updating to new GUI Network link..."
        mv /home/$USER/.local/share/applications/alacarte-made-10.desktop /home/$USER/.local/share/applications/alacarte-made-10.desktop.backup
        mv /home/$USER/.local/share/applications/alacarte-made-11.desktop /home/$USER/.local/share/applications/alacarte-made-11.desktop.backup
        mv /etc/skel/.local/share/applications/alacarte-made-10.desktop /etc/skel/.local/share/applications/alacarte-made-10.desktop.backup
        mv /etc/skel/.local/share/applications/alacarte-made-11.desktop /etc/skel/.local/share/applications/alacarte-made-11.desktop.backup
        touch /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Comment=Set your Network Share Settings" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Terminal=false" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Name=Network Share Settings" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Exec=gksudo /usr/scripts/cnss-gui" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Type=Application" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Icon=network-workgroup" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Categories=XFCE;GTK;System;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        cp /home/$USER/.local/share/applications/alacarte-made-50.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nChanging launcher to CNSS GUI!"
                        fi
}

CNSSGUI64() {
    echo "#Updating to new GUI Network link..."
        mv /home/$USER/.local/share/applications/alacarte-made-4.desktop /home/$USER/.local/share/applications/alacarte-made-4.desktop.backup
        mv /home/$USER/.local/share/applications/alacarte-made-5.desktop /home/$USER/.local/share/applications/alacarte-made-5.desktop.backup
        mv /etc/skel/.local/share/applications/alacarte-made-4.desktop /etc/skel/.local/share/applications/alacarte-made-4.desktop.backup
        mv /etc/skel/.local/share/applications/alacarte-made-5.desktop /etc/skel/.local/share/applications/alacarte-made-5.desktop.backup
        touch /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Comment=Set your Network Share Settings" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Terminal=false" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Name=Network Share Settings" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Exec=gksudo /usr/scripts/cnss-gui" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Type=Application" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Icon=network-workgroup" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        echo "Categories=XFCE;GTK;System;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;" >> /home/$USER/.local/share/applications/alacarte-made-50.desktop
        cp /home/$USER/.local/share/applications/alacarte-made-50.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nChanging launcher to CNSS GUI!"
                        fi
}

# Change to new terminal theme, file is: /home/$USER/.config/lxterminal/lxterminal.conf
TERMTHEME() {
    echo "#Updating to new Terminal theme..."
        mv /home/$USER/.config/lxterminal/lxterminal.conf /home/$USER/.config/lxterminal/lxterminal.conf.backup
        mv /etc/skel/.config/lxterminal/lxterminal.conf /etc/skel/.config/lxterminal/lxterminal.conf.backup
        touch /home/$USER/.config/lxterminal/lxterminal.conf
        echo "[general]" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "fontname=Monospace 10" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "selchars=-A-Za-z0-9,./?%&#:_" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "scrollback=100000" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "bgcolor=#464646" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "bgalpha=65535" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "fgcolor=#f0f0f0" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "disallowbold=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "cursorblinks=true" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "cursorunderline=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "audiblebell=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "tabpos=top" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "hidescrollbar=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "hidemenubar=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "hideclosebutton=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "disablef10=true" >> /home/$USER/.config/lxterminal/lxterminal.conf
        echo "disablealt=false" >> /home/$USER/.config/lxterminal/lxterminal.conf
        cp /home/$USER/.config/lxterminal/lxterminal.conf /etc/skel/.config/lxterminal/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nChanging the Terminal theme!"
                        fi
}

# Implement new Create System Report changes - to do (path is /home/$USER/.local/share/applications/)
# In 32bit version, file is: alacarte-made-7.desktop
# In 64bit version, file is: alacarte-made-8.desktop
# Change - Exec=x-terminal-emulator --geometry=95x25 -t "Create System Report" -e /usr/scripts/info ##to## Exec=gksudo /usr/scripts/systemreport

CREATESYSREP() {
    echo "#Updating Create System Report entry..."
        mv /home/$USER/.local/share/applications/alacarte-made-7.desktop /home/$USER/.local/share/applications/alacarte-made-7.desktop.backup
        touch /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "Comment=Create a detailed System Report of your computer" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "Terminal=false" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "Name=Create System Report" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "Exec=gksudo /usr/scripts/systemreport" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "Type=Application" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        echo "Icon=evolution-tasks" >> /home/$USER/.local/share/applications/alacarte-made-7.desktop
        cp /home/$USER/.local/share/applications/alacarte-made-7.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nUpdating Create System Report entry!"
                        fi
}

CREATESYSREP64() {
    echo "#Updating Create System Report entry..."
        mv /home/$USER/.local/share/applications/alacarte-made-8.desktop /home/$USER/.local/share/applications/alacarte-made-8.desktop.backup
        touch /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "Comment=Create a detailed System Report of your computer" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "Terminal=false" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "Name=Create System Report" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "Exec=gksudo /usr/scripts/systemreport" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "Type=Application" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        echo "Icon=evolution-tasks" >> /home/$USER/.local/share/applications/alacarte-made-8.desktop
        cp /home/$USER/.local/share/applications/alacarte-made-8.desktop /etc/skel/.local/share/applications/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nUpdating Create System Report entry!"
                        fi
}

# Add new right click actions to Thunar - to do (path is /home/$USER/.config/Thunar/uca.xml)
THUNARACTIONS() {
    echo "#Adding custom actions to Thunar..."
        sed -i '$ d' /home/$USER/.config/Thunar/uca.xml
        echo '<action>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <icon>media-optical</icon>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <name>Check MD5SUM</name>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <unique-id>1422219337486382-1</unique-id>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <command>zenity --info --title="Check MD5 for %n" --text="$(md5sum %f)"</command>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <description>Checks the MD5SUM of an image file</description>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <patterns>*.iso;*.ISO;*.img;*.IMG</patterns>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <audio-files/>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <image-files/>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <other-files/>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <text-files/>' >> /home/$USER/.config/Thunar/uca.xml
        echo '    <video-files/>' >> /home/$USER/.config/Thunar/uca.xml
        echo '</action>' >> /home/$USER/.config/Thunar/uca.xml
        echo '</actions>' >> /home/$USER/.config/Thunar/uca.xml
        cp /home/$USER/.config/Thunar/uca.xml /etc/skel/.config/Thunar/
        thunar -q
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nAdding custom actions to Thunar!"
                        fi
}

# Whisker Menu open with Windows (Super) key- changes /home/$USER/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
MENUSUPERKEY() {
    echo "#Setting Whisker Menu Super key..."
        xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "xfce4-popup-whiskermenu"
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nSetting Whisker Menu Super key!"
                        fi
}

# Whisker Menu - changes /home/$USER/.config/xfce4/panel/whiskermenu-1.rc
WHISKERMENU() {
    echo "#Applying Whisker Menu changes..."
        sed -i "s/command-lockscreen=xflock4/command-lockscreen=light-locker-command -l/g" /home/$USER/.config/xfce4/panel/whiskermenu-1.rc
        dbus-send --print-reply --dest=org.xfce.Panel /org/xfce/Panel org.xfce.Panel.Terminate boolean:true
        cp /home/$USER/.config/xfce4/panel/whiskermenu-1.rc /etc/skel/.config/xfce4/panel/
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nApplying Whisker Menu changes!"
                        fi
}

# Clean up
CLEANUP() {
    echo "#Cleaning up..."
        rm -rf /home/$USER/.local/share/applications/xarchiver.desktop
        rm -rf /etc/skel/.local/share/applications/xarchiver.desktop | zenity --progress --title="Upgrade test..." --window-icon="/usr/share/icons/zenity-llcc.png" --text="Please wait whilst the upgrade completes..." --pulsate --width=400 --auto-close --auto-kill
        sleep 2
            if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                        echo "#Error"
                    sleep 2
                                        zenity --error \
                                        --title="Error" --text="There was an error while\nCleaning up!"
                        fi
}

LL20() {
# Invoke arrays
ARRAYA=()       # Array for LL 2.0

#Check the arch
arch=$(uname -m)

case "$arch" in
    x86)    arch="x86"  ;;
    i?86)   arch="x86"  ;;
    amd64)  arch="amd64"    ;;
    x86_64) arch="amd64"    ;;
    * ) echo "Your Arch '$arch' -> Its not supported."  ;;
esac

# Populate arrays based on the arch
case "$arch" in
    x86)
    ARRAYA+=('MKDIRBUPS')
    ARRAYA+=('BUPHOMEUSER')
    ARRAYA+=('BUPETCSKEL')
    ARRAYA+=('LITEWELCOME')
    ARRAYA+=('XDGTOEXO')
    ARRAYA+=('UPDATECOM')
    ARRAYA+=('CNSSGUI')
    ARRAYA+=('TERMTHEME')
    ARRAYA+=('CREATESYSREP')            # LL 2.0 only
    ARRAYA+=('THUNARACTIONS')        # LL 2.0 only
    ARRAYA+=('MENUSUPERKEY')
    ARRAYA+=('WHISKERMENU')
    ARRAYA+=('CLEANUP')
    ;;
    amd64)
    ARRAYA+=('MKDIRBUPS')
    ARRAYA+=('BUPHOMEUSER64')
    ARRAYA+=('BUPETCSKEL64')
    ARRAYA+=('LITEWELCOME')
    ARRAYA+=('XDGTOEXO64')
    ARRAYA+=('UPDATECOM')
    ARRAYA+=('CNSSGUI64')
    ARRAYA+=('TERMTHEME')
    ARRAYA+=('CREATESYSREP64')        # LL 2.0 only
    ARRAYA+=('THUNARACTIONS')        # LL 2.0 only
    ARRAYA+=('MENUSUPERKEY')
    ARRAYA+=('WHISKERMENU')
    ARRAYA+=('CLEANUP')
    ;;
esac
}

LL22() {
# Invoke arrays
ARRAYA=()       # Array for LL 2.2

#Check the arch
arch=$(uname -m)

case "$arch" in
    x86)    arch="x86"  ;;
    i?86)   arch="x86"  ;;
    amd64)  arch="amd64"    ;;
    x86_64) arch="amd64"    ;;
    * ) echo "Your Arch '$arch' -> Its not supported."  ;;
esac

# Populate arrays based on the arch
case "$arch" in
    x86)
    ARRAYA+=('MKDIRBUPS')
    ARRAYA+=('BUPHOMEUSER')
    ARRAYA+=('BUPETCSKEL')
    ARRAYA+=('LITEWELCOME')
    ARRAYA+=('XDGTOEXO')
    ARRAYA+=('UPDATECOM')
    ARRAYA+=('CNSSGUI')
    ARRAYA+=('TERMTHEME')
    ARRAYA+=('MENUSUPERKEY')
    ARRAYA+=('WHISKERMENU')
    ARRAYA+=('CLEANUP')
    ;;
    amd64)
    ARRAYA+=('MKDIRBUPS')
    ARRAYA+=('BUPHOMEUSER64')
    ARRAYA+=('BUPETCSKEL64')
    ARRAYA+=('LITEWELCOME')
    ARRAYA+=('XDGTOEXO64')
    ARRAYA+=('UPDATECOM')
    ARRAYA+=('CNSSGUI64')
    ARRAYA+=('TERMTHEME')
    ARRAYA+=('MENUSUPERKEY')
    ARRAYA+=('WHISKERMENU')
    ARRAYA+=('CLEANUP')
    ;;
esac
}

RUN() {
# Check if ARRAYA is empty
# If it is skip the execution
if [ ${#ARRAYA[@]} -ne 0 ]; then

    x=0
    for k in "${!ARRAYA[@]}"; do  x=$(( $x + 1 )); done  # Get the total number of selected items in array A

    TOTAL_LINES=$x

    printf '%s \n' "${ARRAYA[@]}"|
    while read  line
        do
            $line     # Execute functions one by one
            if [ $? = 1 ]; then
                zenity --error --title="Lite Upgrade" --text="There was an error while performing upgrades:\n ${line}"
                exit 1
            fi   
        let i++
         (( PERCENTAGE = 100 \* ${i} / ${TOTAL_LINES} ))
         echo "$PERCENTAGE"

        if [ "$PERCENTAGE" == "100" ]; then
            echo "#Done"
            sleep 2
        fi
   
    done| zenity --progress  --title="Lite Upgrade" --auto-kill --auto-close --width=300
fi


    gksudo /usr/bin/lite-upgrade-system-series2 GO      # Run the next script with superuser privileges


zenity --info --title="Linux Lite Upgrade Utility" --text="Upgrade complete.\n\nDon't forget to restart your computer\nto complete the upgrade."
}

# First dialogue box
zenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" \
--text="We will now Upgrade your system to Linux Lite 2.4\n\nPlease ensure you are connected to the internet before you start.\n\nAt the end of this upgrade, please reboot to complete the upgrade process.\n\nClick Yes to continue or No to abort."

# If No is clicked then exit
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
    zenity --info --title='Linux Lite Upgrade Utility' --text='Upgrade cancelled.' --width="250"
      exit 0
fi

#Check the version and start  the appropriate function
LLVER=$(awk '{print $3}' /etc/llver)

if [ "$LLVER" == "2.0" ]; then
    LL20
elif [ "$LLVER" == "2.2" ]; then
    LL22
elif [ "$LLVER" == "2.4" ]; then
    zenity --info --text="You are already running the latest release"
    exit 0
fi

RUN

exit 0
Reply
#6

lite-upgrade-system-series2
Code:
#!/bin/bash
#----------------------------------------------------------------
# Description: Linux Lite Upgrade Script - System
# About: For Linux Lite 2.- Series only
# Authors: Misko_2083, Jerry Bezencon 2015
# Website: https://www.linuxliteos.com
#----------------------------------------------------------------

# Ensure multi-language support
export LANG=C

# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]
then
   sudo killall -9 synaptic
else
   echo""
fi

if [ -z "$(pgrep gdebi-gtk)" ]
then
   echo ""
else
   killall -9 gdebi-gtk
fi

# Linux Lite default dialog icon
ic="/usr/share/icons/zenity-llcc.png"

# Get input from a previous file
FRM="$@"

# Check if the input is correct and populate array C
echo "$FRM" | grep "GO" > /dev/null
if [ $? = 0 ];then
arch=$(uname -m)

case "$arch" in
    x86)    arch="x86"  ;;
    i?86)   arch="x86"  ;;
    amd64)  arch="amd64"    ;;
    x86_64) arch="amd64"    ;;
    * ) echo "Your Arch '$arch' -> Its not supported."  ;;
esac

ARAYC=()

# Populate arrays based on the arch
case "$arch" in
    x86)
    ARRAYC+=('UPD1')
    ARRAYC+=('ERASEDPKG')
    ARRAYC+=('CRLCL')
    ARRAYC+=('INPKCL')
    ARRAYC+=('ADDWALL1')
    ARRAYC+=('UPLSBISSUE')
    ARRAYC+=('LBPLYUB')
    ARRAYC+=('SYSAUTH')
    ARRAYC+=('ROOTTERTHEM')
    ARRAYC+=('NWLOG')
    ;;
    amd64)
    ARRAYC+=('UPD1')
    ARRAYC+=('ERASEDPKG')
    ARRAYC+=('CRLCL')
    ARRAYC+=('INPKCL64')
    ARRAYC+=('ADDWALL1')
    ARRAYC+=('UPLSBISSUE')
    ARRAYC+=('LBPLYUB')
    ARRAYC+=('SYSAUTH')
    ARRAYC+=('ROOTTERTHEM')
    ARRAYC+=('NWLOG')
    ;;
esac
else
    exit 0
fi

# Get list of available updated packages
UPD1() {
#sed 's/^\(.\{128\}\).*/\1/' Display only the first 128 characters
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo apt-get update \-y )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Updating package information..." \
--width=600 --auto-close )
unset UPDATER
}

# Erase existing available info
ERASEDPKG() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo dpkg --clear-avail )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Clearing dpkg..." \
--width=600 --auto-close )
unset UPDATER
}

# Create /etc/apt/apt.conf.d/local to leave /etc/issue and /etc/lsb-release defaults (only needed in LL 2.2)
CRLCL() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(cd /tmp && wget http://repo.linuxliteos.com/upgrade/local && sudo mv local /etc/apt/apt.conf.d/ && sudo chown root:root /etc/apt/apt.conf.d/local && sleep 2 )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Automating packaging defaults..." \
--width=600 --auto-close )
unset UPDATER
}

# Install new packages, remove obsolete packages, clean up
INPKCL() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \-y && sudo apt-get install locate vpnc openconnect network-manager-openconnect-gnome network-manager-vpnc-gnome gvfs-fuse network-manager-openvpn mugshot ntp ntpdate tumbler-plugins-extra mtpfs libmtp9 libmtp-runtime libmtp-common mtp-tools libnet-smtp-ssl-perl exfat-fuse exfat-utils inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin whiskermenu \-y && sudo apt-get update \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Installing new packages..." \
--width=600 --auto-close )
unset UPDATER
}

INPKCL64() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y && sudo apt-get install locate vpnc openconnect network-manager-openconnect-gnome network-manager-vpnc-gnome gvfs-fuse network-manager-openvpn mugshot ntp ntpdate tumbler-plugins-extra mtpfs libmtp9:amd64 libmtp-runtime libmtp-common mtp-tools libnet-smtp-ssl-perl exfat-fuse exfat-utils inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin whiskermenu \-y && sudo apt-get update \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Installing new packages..." \
--width=600 --auto-close )
unset UPDATER
}

# Add new wallpapers
ADDWALL1() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(cd /tmp && wget http://repo.linuxliteos.com/upgrade/wallpapers/walls.tar.gz && sudo tar -xvf walls.tar.gz -C /usr/share/backgrounds/xfce/ && cd /usr/share/backgrounds/xfce/ && sudo chown root:root *.jpg && sudo chown root:root *.png && sudo chmod 644 *.jpg && sudo chmod 644 *.jpeg && sudo chmod 644 *.png && sleep 2 )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Adding new wallapapers..." \
--width=600 --auto-close )
unset UPDATER
}

# Update lsb_release and issue files /etc changes, update /etc/llver
UPLSBISSUE() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo sed -i "s/DISTRIB_DESCRIPTION=.*/DISTRIB_DESCRIPTION=\"Linux Lite 2.4\"/g" /etc/lsb-release && echo "Linux Lite 2.4" | sudo tee /etc/llver && echo "Linux Lite 2.4 LTS \n \l" | sudo tee /etc/issue && sleep 2 )' 2>&1 |
stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|
zenity --progress --percentage="$PERCENTAGE"  --title="Updating version information..." \
--width=600 --auto-close )
unset UPDATER
}

# /lib/plymouth/themes/ubuntu-text/ changes
LBPLYUB() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo sed -i "s/^title=Linux Lite.*$/title=Linux Lite 2.4/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/^title=Ubuntu.*$/title=Linux Lite 2.4/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/black=0x2c001e/black=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/white=0xffffff/white=0xffffff/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/brown=0xff4012/brown=0xffff00/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/blue=0x988592/blue=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo update-initramfs -u )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Updating boot configuration please wait..." \
--width=600 --auto-close )
unset UPDATER
}

# Fix syslog, auth.log not logging
SYSAUTH() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo chown syslog:adm /var/log/syslog && sudo chmod 640 /var/log/syslog && sudo chown syslog:adm /var/log/auth.log && sudo chmod 640 /var/log/auth.log && sudo service rsyslog restart )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Fixing syslog and auth.log..." \
--width=600 --auto-close )
}

# Set root's Terminal theme
ROOTTERTHEM() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(sudo mv /root/.config/lxterminal/lxterminal.conf /root/.config/lxterminal/lxterminal.conf.backup && sudo cp /etc/skel/.config/lxterminal/lxterminal.conf /root/.config/lxterminal/ && sudo chown root:root /root/.config/lxterminal/lxterminal.conf && sleep 2 )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Setting Terminal theme..." \
--width=600 --auto-close )
unset UPDATER
}

# Update to new login screen
NWLOG() {
UPDATER=$( stdbuf -oL /bin/bash \-c '(cd /tmp && wget https://github.com/linuxlite/litelogin/archive/master.zip && unzip master.zip && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.theme /usr/share/lightdm-webkit/themes/linuxlite && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.html /usr/share/lightdm-webkit/themes/linuxlite && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/low_contrast_linen.png /usr/share/lightdm-webkit/themes/linuxlite && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/style.css /usr/share/lightdm-webkit/themes/linuxlite && sudo rm -rf master.zip && sudo rm -rf litelogin-master/ && sleep 2 )' 2>&1 |
stdbuf -oL sed -n -e 's/^\(.\{128\}\).*/\1/' -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p' |
zenity --progress --percentage="$PERCENTAGE"  --title="Updating to new login theme..." \
--width=600 --auto-close )
unset UPDATER
return
}

    x=0
    for k in "${!ARRAYC[@]}"; do  x=$(( $x + 1 )); done  # Get the total number of selected items in the array

    TOTAL_LINES=$x
    PERCENTAGE=0
    printf '%s \n' "${ARRAYC[@]}"|
    while read  line
        do
        (( PERCENTAGE = 100 \* ${i} / ${TOTAL_LINES} ))
            $line     # Execute functions one by one
            if [ $? = 1 ]; then
                zenity --info --title="Lite Upgrade" --text="Error:\n${line}"
            fi   
        let i++

        if [ "$PERCENTAGE" == "100" ]; then
            echo "#Done"
            sleep 2
        fi
   
    done

# Reboot dialogue
# Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279
title="Linux Lite Upgrade Complete"
exit_type=`zenity  --width="400" --height="220" --title="$title" --list --radiolist --column="Select" \
    --column="Exit Type" --column="Description" \
    TRUE "Reboot" "Reboot your computer"\
    FALSE "Shutdown" "Shutdown your computer"\
    FALSE "Cancel" "Continue using your computer" `

# User must select a target type (Check if they cancelled)
if [ ! "$exit_type" ]; then
    zenity --error --title="Error" --text="You must make a selection"
    exit
fi

# Action to perform by user
if [ "$exit_type" = "Reboot" ]
then

        # Do Reboot here
        sudo shutdown -r now | zenity --progress --percentage="$PERCENTAGE"  --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300


elif [ "$exit_type" = "Shutdown" ]
then
    # Do Shutdown here
    sudo shutdown -h now | zenity --progress --percentage="$PERCENTAGE"  --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300

else

    # Do Cancel here
    exit 0
fi

unset ARAYC
unset FRM
Reply
#7

There must be a limit to the post length. Had to split the post in two.
Anyway, changes in the scripts.
Removed ARAYB because it's not needed here. User will not have an option to choose what to run.
ARAYA will be populated with items depending on the arch.
Some functions are release specific so I added a check for release.
in the system part I removed the other progress bar. One is enough I think. :)
Reply
#8

Thanks misko, I've got 2 days of 12 hour shifts at work ahead of me so I won't be around as much. You'll need to confirm this works on 2.0 too. The new Lite Software will be released the day of 2.4 Final :) Also a heads up, looks like we're changing web hosts shortly, my current host is being dishonest with me about bandwidth usage. I've found a new host with truly unlimited monthly bandwidth, so I won't have to keep a close eye on traffic anymore, or pay for another dedicated server just yet :) Hoping to get this sorted out today or tomorrow, I'll make a public announcement as soon as they answer my latest email.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#9

I'll run tests tomorow on 2.0.
So you decided to change the web host.
Nothing like unlimited monthly bandwidth. I hope the new host has good transfer rate limits too.
One thing less to worry about. You probably had to pay extra when bandwidth usage is over the top.
A few questions:
Is the new host going to be secure enough? And will it affect the way the website works?
Reply
#10

(03-13-2015, 08:02 PM)misko_2083 link Wrote:  A few questions:
Is the new host going to be secure enough? And will it affect the way the website works?

It will be just as secure as our previous host. There may be some issues during the transition, but thats normal. I want to get this done and settled before we release the Final, so this job and fixing 2.4 bugs will be my main focuses.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)