LINUX LITE 7.4 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lite Software - Suggestions welcomed
#41
(09-03-2014, 12:47 AM)Valtam link Wrote: Example - You want to install Chrome and Skype. If you choose Yes to launch Chrome after it has finished installing, the Skype installer won't start. Do you think you could fix this? Cheers.
That's an easy fix. You will have to edit all of the install scripts and where there is a command to start the app just add &
This way the program will run in the background. [Edit] This way the shell will not wait for the command to finish.
Here is an example:
Code:
chromium-browser &
Code:
#!/bin/bash
#-------------------------------------------
# Description: Linux Lite Installer Dialogue
# Author: Jerry Bezencon 2014
# Website: https://www.linuxliteos.com
#-------------------------------------------

# Main window dialogue.
INSTALLER_TITLE="Chromium Web Browser Installer
-----------------------------------------------------------------------------------------------------
This will install the Chromium Web Browser.

When you click on Yes, this window will close and the install will begin.
The install time will vary based on your internet connection and computer.
Support is available from - http://www.chromium.org/Home

Once installed, Chromium is located in Menu, Internet.
-----------------------------------------------------------------------------------------------------
Click on Yes to continue or No to cancel the installation."

# Call the zenity window icon location.
INSTALL_ICON="/usr/share/icons/zenity-llcc.png"
APPNAME="Chromium Web Browser"
       
        zenity --question --title="$APPNAME Installer" --window-icon="${INSTALL_ICON}" --text="${INSTALLER_TITLE}"

                if [ "$?" -eq "0" ]; then
                        gksudo -g --message 'To install this software your password is required. Enter your password, or press Cancel.' "sudo apt-get install -f chromium-browser --force-yes -y" | zenity --progress --title="Installing $APPNAME" --window-icon="${INSTALL_ICON}" --text="Please wait whilst $APPNAME downloads and installs..." --pulsate --width=400 --auto-close --auto-kill


                                if [ "${PIPESTATUS[0]}" -ne "0" ]; then
                       
                                        zenity --error \
                                        --title="Error" --text="$APPNAME could not be installed."
                                        exit 0
                                fi

                else

                                        exit 0
                fi


PROCEED=$(zenity --question --title="$APPNAME Installer" --window-icon=/usr/share/icons/zenity-llcc.png --text="The installation has finished.\n\nWould you like to launch $APPNAME now?"; echo $?)
if [ ${PROCEED} -eq 1 ]; then
    zenity --info --title="Finished" --window-icon="${INSTALL_ICON}" --text="Install Complete.\n\n$APPNAME is located in Menu, Internet"
    exit;
else
   chromium-browser &
fi

exit 0

[move]Cheers Smile[/move]
Reply


Messages In This Thread
Re: A GUI tool to install additional software in Linux Lite 2.0 - by misko_2083 - 09-03-2014, 11:12 AM
Re: Lite Software - Suggestions welcomed - by crismblog - 10-07-2014, 05:48 PM
Re: Lite Software - Suggestions welcomed - by nvm - 04-06-2020, 08:21 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)