How to automate the Xubuntu post-install

Automate Xubuntu post-install
In a few days a new year will begin and with it many of you will begin the tasks of updating, installing and maintaining your operating systems. Looking for information on this topic I came across a very curious script ( thanks to this website for posting the code) that raises automating the post-installation of Xubuntu, yes, yes, from Xubuntu.

It's a pretty basic script but very complete that once started it will install the following programs:

  • Libreoffice.
  • Chrome
  • Firefox
  • VLC
  • OpenShot
  • Caliber
  • dropbox
  • Preload
  • Gedit
  • xubuntu-restricted-extras
  • Brazier
  • Gimp

In addition, this script updates the system, installs Windows fonts and installs the codecs and libraries necessary to view multimedia content. The good thing about this script is that it not only installs the basic software but also allows us to modify and configure the installation of the programs we want since the script code is free.

Using the Xubuntu post-install script

First we have to create the post-installation script, once created we will execute it so that the installation of the programs can proceed. So we open the terminal and write the following:

sudo nano post-install

In this document we will copy the following:

#! / Bin / bash
#default installation
clear
echo "Post-install xubuntu"
echo "Installing programs after installing Xubuntu 14.04 trusty tahr"
echo "Updating repositories"
sudo apt-get update
echo -e "\ e [92m Now we install the windows sources since it is the only package that asks to interact"
echo -e "\ e [0m"
echo -e "\ e [93mInstructions"
echo -e "\ e [0m"
echo -e «1) \ e [93m Press the \ e [0m \ e [4m arrow to the right \ e [24m \ e [93m and then \ e [0m \ e [4mEnter \ e [24m \ e [93m when \ e [0m \ e [41m Accept \ e [0m \ e [93m this in Red \ e [0m »
echo -e «2) \ e [93m Select \ e [0m \ e [4mSI \ e [24m \ e [93m and then press \ e [0m \ e [4mEnter \ e [24m \ e [0m]
echo -e "3) \ e [93mAnd you can leave the computer alone until it finishes \ e [0m"
echo -e ""
echo -e ""
echo -e "\ e [92m Hit enter when you understand \ e [0m"
read $ A
sudo apt-get install -y ttf-mscorefonts-installer
echo -e «\ e [92m You can go have a coffee or stare but I'm done by myself \ e [0m»
sleep 5s; echo -e "\ e [92mAupdating system"
echo -e "\ e [0m"
sudo apt-get -y upgrade
#chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main"> /etc/apt/sources.list.d/google.list'
echo "Adding software sources"
#jdownloader
sudo add-apt-repository -y ppa: jd-team / jdownloader
#yppamanager
sudo add-apt-repository -y ppa: webupd8team / y-ppa-manager
#gimp
sudo add-apt-repository -y ppa: otto-kesselgulasch / gimp
#myweather indicator
sudo add-apt-repository -y ppa: atareao / atareao
sudo apt-get update
sudo apt-get -y upgrade
echo "Installing programs"
sudo apt-get install -y google-chrome-stable xubuntu-restricted-extras vlc vlc-plugin-pulse libvlc5 libxine1-ffmpeg mencoder lame libmad0 mpg321 openshot openshot-doc rar unace p7zip-full unzip p7zip-rar sharutils mpack arj jdownloader y- ppa-manager gimp inkscape synaptic playonlinux libavcodec-extra caliber libdvdread4 thunderbird libreoffice-help-es libreoffice-l10n-es libappindicator1 icedtea-7-plugin openjdk-7-jre terminator gimp-plugin-registry x264 preload prelink header mysxpell-es gparted roller uudeview my-weather-indicator lm-sensors laptop-mode-tools
# Disable bug report notifications
sudo sed -is / enabled = 1 / enabled = 0 / g / etc / default / apport
# watch dvds
sudo /usr/share/doc/libdvdread4/./install-css.sh
sudo laptop_mode
clear
threw out ""
echo -e "\ e [1m \ e [92m Installation complete \ e [21m"
threw out ""
threw out ""
# Goodbye message
threw out ""
threw out ""
threw out ""
sleep 1s; echo -e "\ e [92mDon't forget to visit us at"
threw out ""
threw out ""
sleep 1s; echo -e «\ e [42m \ e [91m *********************************** ****************************** »
sleep 1s; echo -e «\ e [93m + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + »
sleep 1s; echo -e »\ e [42m \ e [97m \ e [1mhttps: //ubunlog.com»
sleep 1s; echo -e «\ e [42m \ e [93m + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + \ e [0m »
sleep 1s; echo -e «\ e [42m \ e [91m *********************************** ****************************** \ e [0m »
threw out ""
# For it to ask if we want to restart
echo -e «\ e [91m Do you want to reboot? (Y / n) \ e [0m »
read D
if [["$ D" == "n"]];
then
echo -e "\ e [42m \ e [97m \ e [1m] Thank you for using our script \ e [0m"
else
sleep 4s; echo -e "\ e [42m \ e [97m \ e [1mRebooting \ e [0m"
sudo sleep 1s; shutdown -r +0
fi

Once we have copied it, we save it and give it write permissions with the following:

sudo chmod 777 post install

And to run the script we just have to write the following:

sudo sh ./post-install

Once the installation has finished, it is best to restart the system, although if we need to continue with the session, we can do it without any problem. As you can see, it is a simple process and once the script is created we can use it on any computer with Xubuntu, a pretty good Ubuntu flavor for computers with few resources, Do not you think?


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

5 comments, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   xjesus.net said

    I have a similar script that can help you in http://script14.xjesus.net

  2.   person said

    the -y parameter in sudo apt-get install -y what does it mean?

  3.   pepper said

    it sends me the following error, after:

    -e "e [92m Now we install the windows sources since it is the only package that asks to interact"
    -e "e [0m"
    -e "e [93mInstrucciones"
    -e "e [0m"
    ./postinstall: 12: ./postinstall: Syntax error: ")" unexpected

    1.    pepper said

      ok I fixed it, only now the instructions come out as follows:

      "E [92m Now we install the windows sources since it is the only package that asks to interact"
      "E [0m"
      "E [93mInstrucciones"
      "E [0m"
      “1 e [93m Press the e [0me [4m arrow on the righte [24me [93m and then e [0me [4mEntere [24m e [93m when e [0me [41m] I will accept [0me [93m is in Rede [0m"
      "2 e [93mSelect e [0me [4mSIe [24me [93m and then press e [0me [4mEnter [24me [0m"
      "3 e [93mY you can leave the computer alone until it finishes [0m"
      ""
      ""
      "E [92m Press enter when you have understood ite [0m"

  4.   vicdeveloper said

    Interesting. Thanks for sharing!.

    Regards!