Desktops and applications installer menu taking as source official repositories, third-party ones or others on Ubuntu, Debian, Linux Mint , LMDE or Raspbian (desktop or server). |
---|
There are a lot of applications or desktops environments included in the default application list, it can be modified by the user by just editing a single text file. Furthermore, the user can add subscripts to extend main menu functionality, for example, add new repositories, setup applications, etc. In addition, exist one separate script for each application as an alternative way to do the installation proccess without the main menu.
Spanish version can be found here ( Versión española disponible aquí )
Script's website can be found here
- Understanding project structure
- Add new application to a category. Modify or delete an existing one
- Add new subscript to prepare the installation of an application
- Add a new file to add a third-party repo through a PPA
- Add new subscript to install an application
- Add new subscript to install a non-repository application
- Add new subscript to setup an application
- Add new subscript to setup EULA support
- Add default authentication credentials for an application
Tested on: Ubuntu 16.04 LTS Xenial, Debian 9 Stretch, Linux Mint 18.1 Serena, LMDE 2 Betsy and Raspbian Stretch (desktop or server).
With some changes in config files, it can be 100% compatible with previous versions.
Version: 1.3.4
Last change: 2017/12/06 (yyyy/mm/dd)
- One main script that shows a menu of aplications or linux desktops enviroment which can be selected for installation.
- Alternatively, there is one separate script for each application, so it can be installed by just executing the appropriate script.
- Install official and third-party repository applications. In the last case, first add the necessary repositories to the distro.
- Download, extract and install non-repository applications through custom subscripts that extend the main script functionality. It includes several subscripts by default.
- Set up applications after they are installed through custom subscripts.
- Customize your own application list to be installed and third-party repositories to add to your distro by just editing some config files (no need to edit main script at all for this purpose).
- Third-party repositories, added by some applications, will be automatically disabled after the installation proccess.
- EULA support. Install applications automatically with no need of user interaction to accept legal terms of the application.
- The script runs with an interface adapted to the detected environment: Dialog for terminal. Yad or Zenity for desktop or terminal emulator.
- User can set the authentication credentials for thouse applications witch require user's login.
- Installation log file that shows installation steps and errors if they have occurred.
- Multilingual support. Easy to add new translations. For the time being English and Spanish languages are included. The script detects system language and it use the appropiate translation.
- Valid for multiple arquitecture systems: x64, i386, arm.
$ sudo apt install git
$ git clone https://github.com/cesar-rgon/desktop-app-installer.git
$ cd desktop-app-installer
$ wget https://github.com/cesar-rgon/desktop-app-installer/archive/master.tar.gz
$ tar -xvf master.tar.gz
$ cd desktop-app-installer-master
It shows a menu of applications to be installed which are ordered by categories. The user can navigates through categories and selects the applications to be installed. Furthermore user can edit one specific category to modify the selected applications to be installed. Finally, when all are ready, installation process will begin.
$ bash installer.sh
There is one separate script for each application, so it can be installed just by executing it.
$ bash ./app-scripts/applicationName.sh
-
The user must SELECT the APPLICATIONS to be installed.
-
The user can SET the AUTHENTICATION CREDENTIALS for thouse applications witch require user's login.
-
The User REQUIRES to START the INSTALATION process.
-
The script EXECUTES INITIAL OPERATIONS to be ready to install the selected applications.
-
For each application, execute next steps:
- The script ADDS THIRD-PARTY REPOSITORY through a PPA, if defined in a specific file.
- The script EXECUTES PRE-INSTALLATION OPERATIONS of the application to be installed if exists a custom sub-script for that purpose. The sub-script could add a third-party repository, custom commands instead of use a PPA, and/or prepare the installation of the application.
- The script INSTALLS the APPLICATION, with EULA support, taking as source official distro repositories, third-party one or a custom sub-script created for that purpose.
- The script automatically DISABLES THIRD-PARTY REPOSITORY of the installed application to avoid possible problems related to this.
- The script EXECUTES POST-INSTALLATION OPERATIONS to set-up the installed application if exists a custom sub-script for that purpose.
- The script STORES CREDENTIALS for AUTHENTICATION to the applicacion, if required.
- The script EXECUTES FINAL OPERATIONS to clean packages, remove temporal files/folders, show logs and show login credentials.
NOTE 1: Main script runs all the previous steps whereas each individual application script skip step one and run the remaining.
NOTE 2: The script automatically updates repositories after pre-installation operations, add third-party repository or disable it.
NOTE 3: Logs generated during installation process contains installation steps and posible errors occurred.
NOTE 4: The Login credentials are used by those installed applications that require user authentication.
To extend script functionality is required to add subscripts for custom purposes. To customize applications to install, it's necessary to edit some config files. These actions will be detailed in next chapters.
Tree of folders and some files:
├── app-scripts It contains one installation script per application
│ ├── template-script.sh
│ └── *.sh
│
├── common It contains common functions, common variables and commands used by installation scripts
│ ├── commonFunctions.sh
│ ├── commonVariables.properties
│ ├── installapp.sh
│ └── *.sh
│
├── etc It contains config files used by some subscripts and version number of main installation script
│ ├── systemd.service
│ ├── version
│ │
│ ├── applist It contains application list available to install for every linux distribution supported
│ │ ├── applicationList-debian.csv
│ │ ├── applicationList-linuxmint.csv
│ │ ├── applicationList-lmde.csv
│ │ ├── applicationList-raspbian.csv
│ │ └── applicationList-ubuntu.csv
│ │
│ ├── credentials It contains a file per application with username/password needed for authentication
│ │ ├── template-credentials.properties
│ │ └── *.properties
│ │
│ ├── eula It contains files to avoid questions to accept applications terms of use during installation's process
│ │ ├── template-eula
│ │ └── *
│ │
│ ├── languages It contains language translation files used by installation scripts
│ │ ├── en.properties
│ │ ├── es.properties
│ │ └── *.properties
│ │
│ ├── old-init.d It contains init.d scripts. Used by some daemons (for compatibility with LMDE2)
│ │ └── *
│ │
│ ├── ppa It contains one file per application which contains PPA to be added before installation
│ │ └── *
│ │
│ └── *
│
├── icons It contains a sets of application icons used by subscripts
│ ├── *
│ └── installer/* It contains a set of icons used by installation script
│
├── installer.sh File to start main installation script
│
├── install-non-repo-apps It contains subscripts to install non-repository applications
│ ├── template-non-repo-app.sh
│ ├── *.sh Subscripts used on any linux system
│ ├── debian/*.sh Subscripts only used on a Debian system
│ ├── linuxmint/*.sh Subscripts only used on a Linux Mint system
│ ├── lmde/*.sh Subscripts only used on a LMDE system
│ ├── raspbian/*.sh Subscripts only used on a Raspbian system
│ └── ubuntu/*.sh Subscripts only used on an Ubuntu system
│
├── menu It contains functions used by main script menu (Terminal / Desktop)
│ ├── dialogFuntions.sh
│ ├── menuFunctions.sh
│ ├── menuVariables.properties
│ ├── yadFunctions.sh
│ └── zenityFunctions.sh
│
├── post-installation It contains subscripts to setup applications after installation
│ ├── template-post-installation.sh
│ ├── *.sh Subscripts used on any linux system
│ ├── debian/*.sh Subscripts only used on a Debian system
│ ├── linuxmint/*.sh Subscripts only used on a Linux Mint system
│ ├── lmde/*.sh Subscripts only used on a LMDE system
│ ├── raspbian/*.sh Subscripts only used on a Raspbian system
│ └── ubuntu/*.sh Subscripts only used on an Ubuntu system
│
├── pre-installation It contains subscripts to add third-party repositories and/or prepare the installation of apps
│ ├── template-pre-installation.sh
│ ├── *.sh Subscripts used on any linux system
│ ├── debian/*.sh Subscripts only used on a Debian system
│ ├── linuxmint/*.sh Subscripts only used on a Linux Mint system
│ ├── lmde/*.sh Subscripts only used on a LMDE system
│ ├── raspbian/*.sh Subscripts only used on a Raspbian system
│ └── ubuntu/*.sh Subscripts only used on an Ubuntu system
│
├── uninstall It contains subscripts to remove application config files
│ ├── template-uninstall.sh
│ ├── *.sh Subscripts used on any linux system
│ ├── debian/*.sh Subscripts only used on a Debian system
│ ├── linuxmint/*.sh Subscripts only used on a Linux Mint system
│ ├── lmde/*.sh Subscripts only used on a LMDE system
│ ├── raspbian/*.sh Subscripts only used on a Raspbian system
│ └── ubuntu/*.sh Subscripts only used on an Ubuntu system
│
└── uninstaller.sh File to start main uninstallation script
Some important files | Description |
---|---|
commonFunctions.sh | It contains common functions used by all the installation scripts |
commonVariables.properties | It contains common variables available for all scripts |
installapp.sh | It contains needed commands to allow the installation of an application and posible reparation in case of error |
dialogFunctions.sh | It contains menu functions for Dialog box (terminal mode). Used only by main script |
menuFunctions.sh | It contains menu functions. Used only by main script |
menuVariables.properties | It contains menu global variables available only for main script |
yadFunctions.sh | It contains menu functions for Yad windows (desktop mode). Used only by main script |
zenityFunctions.sh | It contains menu functions for Zenity windows (desktop mode). Used only by main script |
applicationList-debian.csv | It defines categories, applications and related packages for a Debian system |
applicationList-linuxmint.csv | It defines categories, applications and related packages for a Linux Mint system |
applicationList-lmde.csv | It defines categories, applications and related packages for a LMDE system |
applicationList-raspbian.csv | It defines categories, applications and related packages for a Raspbian system |
applicationList-ubuntu.csv | It defines categories, applications and related packages for an Ubuntu system |
installer.sh | Main script file |
en.properties | English translation file |
es.properties | Spanish translation file |
template-script.sh | Template file to help to create a new script file to install an application |
template-pre-installation.sh | Template file to help to create a new subscript to add TPrepo or run pre-inst. commands |
template-eula | Template file to help to create a new subscript to setup EULA support for an application |
template-non-repo-app.sh | Template file to help to create a new subscript to install a non-repository application |
template-post-installation.sh | Template file to help to create a new application subscript to run post-installation commands |
template-uninstall.sh | Template file to help toremove application config files. No need to define commands to uninstall the application |
To add an application to be installed follow next steps:
- Edit applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file (it is recommended to use LibreOffice or OpenOffice) and add a new line with the next syntax:
1st column - Category (*) | 2nd column - Application Name (*) | 3rd column (Packages) |
---|---|---|
CategoryName | ApplicationName | package1 |
Considerations:
- Blank or comment lines are ignored in this file.
- First column - Category: is mandatory. It repeats once per line, that means, once per application of this category.
- If the category name is new in the file, the script will generate a new window for this category.
- Each category must contain at least one application.
- The category name shall contain only letters, digits and/or underscores '_' and it can't start with a digit.
- Second column - Application name: is mandatory.
- Just one row per application.
- The application name shall contain only letters, digits and/or underscores '_' and it can't start with a digit.
- The application source can be official repositories, third-party repositories even other sources (non-repositories).
- The order in which applications are listed in the menu script is the same as set in this config file.
- Third column - Packages: is mandatory only if the application belongs to a repository.
- Package names must be separated by whitespace character.
- Non-repository applications must leave this field empty.
- Edit en.properties file and add a description for categories (if it's a new one) and applications with the next syntax:
CategoryNameDescription=Here goes the category description that is used by the main menu
ApplicationNameDescription=Here goes the application name description that is used by the main menu
Considerations:
- CategoryNameDescription is composed by CategoryName word: must be identical (case-sensitive) to the category name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file. Description word: must always follow the category name word.
- To be intuitive, is recommended that CategoryNameDescription is defined in the 'CATEGORIES' section of the file.
- ApplicationNameDescription is composed by: ApplicationName word: must be identical (case-sensitive) to the application name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file. Description word: must always follow the application name word.
- To be intuitive, is recommended that ApplicationNameDescription is defined in the 'APPLICATIONS' section of the file.
- It's recommended, but not mandatory, to add those descriptions to other translation files.
- You can create a new translation file in your native language to be easier for your understanding. See chapter Add new translation file for more information.
To modify or delete an application or category just edit applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file and change/delete the corresponding lines.
To add a new subscript that prepares the installation of an application before the installation proccess begins just follow next steps:
- Create a new file taking, as base, the template-pre-installation.sh file following next considerations.
- Add neccessary commands at the end of the file to add a third-party repository and/or to setup the application following next considerations.
To add a new file that defines PPA to be used to add a third-party repository for an application just follow next steps:
- Create a new file './etc/ppa/applicationName' Considerations:
- The filename must be identically (case-sensitive) to the related application name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file.
- The filename must not have extension at all.
- The file must contain one and only one PPA. It can contains:
- Blanck lines [optional]
- '# Comentary' [optional]
- ppa:/... [mandatory]
To add a new installation script for an application follow next steps:
-
Create a new file './app-scripts/application-name.sh' taking, as base, next commands defined in template-script.sh file
-
Modify content to asign values to variables: appName and logFile
Considerations:
- appName value must be identically (case-sensitive) to the application name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file.
- logFile value is used to create the log file ~/logs/logFile.
To add a new subscript that installs a non-repository application just follow next steps:
- Create a new file taking, as base, the template-non-repo-app.sh file following next considerations.
- Add neccessary commands at the end of the file to download and install the non-repository application following next considerations.
To add a new subscript to setup an application after installation proccess just follow next steps:
- Create a new file taking, as base, the template-post-installation.sh file following next considerations.
- Add neccessary commands at the end of the file to setup the application following next considerations.
To add a new subscript to setup EULA support for an application just follow next steps:
- Create a new file './etc/eula/applicationName' taking, as base, next commands from template-eula file. Considerations:
- The filename must be identically (case-sensitive) to the related application name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file.
- Add parameters at the end of the file with the syntax indicated in template file to skip EULA questions during installation proccess.
To add default authentication credentials for an application which requires user's login just follow next steps:
- Create a new file './etc/credentials/applicationName.properties' taking, as base, template-credentials.properties file. Considerations:
- The applicationName must be identically (case-sensitive) to the related application name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file.
- Set values of variables appUsername, appPassword (credentials) and usernameCanBeEdited, passwordCanBeEdited (that tells to script if the value of the associated variable can be modified).
To add a new language file just follow next steps:
- Create a new file './languages/xx.properties' copying the content of an existing language file, for example, en.properties Considerations:
- 'xx' must consist of two lowercase characters based on ISO639-1 code for the specific language.
- Translate values of all variables to the specific language.
Considerations:
- The variable names must not be changed at all.
To define a subscript that remove settings of an installed repo application, just follow next steps:
- Create a new file taking, as base, the template-uninstall.sh file following next considerations.
- Add neccessary commands at the end of the file to remove settings of the application during uninstallation proccess following next considerations.
- No need to define commands to uninstall the application, just to remove config settings. Main script will uninstall the application automatically.
- Only is valid for repo-applications, that means, not valid for non-repo applications.
- The filename must follow next pattern: ApplicationName[_i386/_x64].sh
- ApplicationName: must be identical (case-sensitive) to the application name defined in applicationList-ubuntu/debian/linuxmint/lmde/raspbian.csv file.
- _i386 / _x64 / _arm: Optional if neccessary. Script to be executed only if match corresponding O.S. architecture (that means, i386 for 32 bits O.S.; x64 for 64 bits O.S.; arm for ARM O.S.).
- The extension must be always '.sh'
- The script must be ubicated in pre-installation|post-installation|install-non-repo-apps|uninstall folder if it's valid for all supported linux distros. We call general subscript and
- The script must be ubicated in /ubuntu, /debian, /linuxmint, /lmde, /raspbian folder if it's valid only for a specific supported linux distro. We call specific subscript.
- Is possible to create a specific and a general subscripts for the same application. Both will be executed.
- No need to use 'sudo' in commands because the subscript will be executed as root user.
- Use common variables supplied by commonVariables.properties file.
- This script must be non-interactive, that means, no echo to monitor, no read from keyboard, no wait confirmation.
Any contribution to this project would be appreciated.
I hope you find it useful.