- 10 Oct 2024
- 1 Minute to read
- Print
- PDF
Install Any App using Flatpack
- Updated on 10 Oct 2024
- 1 Minute to read
- Print
- PDF
Use this script to install flatpack and install any application on Linux machine.
Copy and save the contents below to a UTF-8 editor like notepad++ OR Sublime Text in Windows or gedit in Ubuntu.
If you are using notepad++ then use the bottom right panel to change the type to Unix (LF).
Or click here to download the file.
#!/bin/bash # Install Flatpak if not already installed if ! command -v flatpak &> /dev/null; then sudo apt-get update sudo apt-get install -y flatpak fi # Add Flathub repository if not already added if ! flatpak remote-list | grep -q flathub; then flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo fi # Note : You can check available list of applications on this URL https://flathub.org/apps. # List of applications to install. Specify multiple packages in a new line. apps=( ADD_APP_PACKAGE_NAME ) # Example that installs multiple apps #apps=( #org.gnome.Calendar #org.gnome.Geary #com.github.johnfactotum.Foliate #com.github.artemanufrij.polarr #) # Install each application for app in "${apps[@]}"; do flatpak install flathub "$app" -y done
In the script, replace the following placeholder:
ADD_APP_PACKAGE_NAME: Provide a Flatpack-compatible package name. Find the package name by navigating to https://flathub.org/apps > clicking on the app name and scroll down to see the package name.
Follow our guide to upload & publish the script using Scalefusion Dashboard.
Note:
Some of the scripts and their contents are sourced from internet and yes, our new friend ChatGPT.
Please validate the scripts on a test machine before deploying them on all your managed devices.
Scalefusion has tested these scripts, however Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the usage of these scripts.