Skip to main content

Nitrux is a distribution that doesn’t revolve around a package manager like other distributions; in Nitrux, the preferred method of obtaining new software is using AppImages. However, we understand that not all software is available as an AppImage. So, by default, we have included various options for users, such as Flatpak and Distrobox, to complement AppImages.

Additionally, Nitrux is an immutable distribution (the root is immutable by default), with the idea being that by making the root immutable, we provide users with a functional system that will not break over an update from a delivery channel we can’t control and that each upgrade to a new version occurs without anomalies, what we call “to have degree of certainty.” In fact, in Nitrux, there is no package manager because, of course, having a package manager that can alter the root wholly defeats the purpose.

Having laid out the context, today’s tutorial will look at how users can manage software in Nitrux.

Difficulty: ★☆☆☆☆

📜 Table of Contents

  1. AppImage
  2. Flatpak
  3. Distrobox
    1. Compiling Software in Nitrux
  4. Waydroid
  5. Zero Install
  6. One more thing…
    1. Support for Other Self-Contained Formats
    2. Support for Other Software Installation Methods

AppImage

An AppImage is a downloadable file for Linux that contains an application and everything the app needs to run (e.g., libraries, icons, fonts, translations, etc.) that you can’t expect to be part of each target system.

The first method to manage software in Nitrux is by using AppImages. AppImage provides a very simplistic solution to software distribution, a one-click solution to obtain software that is instantly accessible to anyone. AppImages can be obtained from the NX Software Center.

  • The managed locations (and thus the default) for AppImages in Nitrux are /Applications and ~/Applications.
  • AppImages launched from the application menu will be launched using Firejail for sandboxing by default in Nitrux.
  • Some Electron applications or Chromium-based web browsers packaged as AppImages will refuse to run when using Firejail unless the application uses a specific Chromium flag. To run these Chromium-based AppImages, append the following Chromium flag.
electron-app.AppImage --no-sandbox
chromium-based-browser.AppImage --no-sandbox
  • For AppImages that refuse to work and are not Chromium-based, edit the desktop launcher to launch the AppImage directly, i.e., open the applications menu, right-click the launcher to edit, go to the tab “Applications” and on “Program,” only enter the full path to the AppImage and on “Argument(s)” leave it blank if no arguments will be passed.
      • ⚠️ Important: We strongly emphasize that we do not recommend running AppImages without the Firejail sandbox, especially anything connected to the internet. Do it at your own risk.
  • The AppImages listed in the software center come from AppImagehub.com.
    • 🔰 Information: If an AppImage downloaded from the NX Software Center does not work out of the box and its creator no longer maintains it, causing segmentation faults or other errors, check our tutorial to use Distrobox and run the AppImage using a container.

NX Software Center.

Disclaimer: We do not create, maintain, or host the AppImage files the software center lists. These files are created, maintained, and hosted by third parties. Please let their creators or maintainers know if you have issues with these files.

In addition to the NX Software Center, the distribution includes Zap. Zap is an AppImage command-line manager.

  • Install AppImages from the AppImage Catalog and AppImage Catalog v2.
  • Update AppImages.
  • Run as a daemon to check for updates (this feature requires systemd and does not work in Nitrux).

Zap is a CLI manager for AppImages running on Station.

Disclaimer: We do not create, maintain, or host the AppImage files that Zap lists. These files are created, maintained, and hosted by third parties. Please let their creators or maintainers know if you have issues with these files.

Flatpak

Flatpak builds upon existing technologies such as CGroups, namespaces, bind mounts, and seccomp in the Linux kernel, OSTree from Project Atomic, and the OCI format developed by the Open Container Initiative.

  • Nitrux supports Flatpak by default, and Flathub is also enabled by default. However, the order of preference to obtain end-user software is AppImage first and Flatpak second.
    • ⚠️ Important: Users who want to use bleeding-edge Flatpaks can enable Flathub-beta. Do it at your own risk.
flatpak remote-add --user flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
  • Users can also use Bauh from the NX Software Center as an AppImage to manage Flatpaks.
    • Nitrux does not come with Bauh by default.
      • 🔰 Information: Since AppImages are executed using Firejail, this may interfere with installing some Flatpak applications, i.e., Bauh may display an error such as “bwrap: execvp /app/bin/apply_extra: Permission denied” when running under Firejail. Run Flatpak from the terminal to install the application, or run Bauh without Firejail to avoid this issue.

Bauh (not included by default).

Disclaimer: We do not develop Bauh or Flatpak. To report bugs about Bauh, create an issue at their bug tracker.

Distrobox

Please note that starting from version 2.6.0 to use a package manager users should use Distrobox.

Distrobox is based on an OCI image and implements concepts similar to ToolBox, built on top of Podman and OCI standard container technologies.

  • If the user requires to use APT (or any package manager), we strongly recommend users use Distrobox; check our tutorial.

neofetch on a Distrobox container.

Compiling Software in Nitrux

We strongly recommend users use containers to compile software. Users can create a container using the following tools.

  • Distrobox (our recommendation).
    • 🔰 Information: Distrobox uses Podman by default. However, Distrobox can also use Docker.
  • Toolbox (as an alternative to Distrobox).

Disclaimer: We do not develop Distrobox. To report bugs about Distrobox, create an issue at their bug tracker.

Waydroid

⚠️ Important: As described in the following issue (#120) in our bug tracker, due to changes in the Liquorix kernel disabling PSI, to use Waydroid users must use another kernel where PSI is enabled in the kernel configuration.

  • 🔰 Information: To use a different kernel than the default, we’ve created Kernel Boot; see How to use Kernel Boot.

Waydroid is “A container-based approach to boot a complete Android system on a regular GNU/Linux system like Ubuntu.” To start using Waydroid, do the following.

  • ⚠️ Important: Waydroid will not use hardware acceleration when using the NVIDIA proprietary drivers.
  • ⚠️ Important: Waydroid will not work in X11 but only in a Wayland session (hence the name, Wayland + Android).
  • ⚠️ Important: Waydroid will not work on the Live session, and it will not work on a virtual machine (except maybe QEMU; please refer to Waydroid’s documentation). Nonetheless, we strongly recommend using physical hardware as that’s where we’ve tested it and where we know it works.
  • 🔰 Information: Waydroid will download its system images to /var/lib; keep the size of this partition in mind.

Waydroid is running on Nitrux.

  • Since Nitrux 2.8.0, we include Waydroid by default.
  • First, install the Android images to use with Waydroid. To do this, click the applications launcher and then click Waydroid.
    • 🔰 Information: When initializing Waydroid using its GUI dialog window, users can choose between a system type, VANILLA (Lineage OS x64 without Google Play Services support) or a GAPPS (Lineage OS x64 with support for Google Play Services) image.
  • Alternatively, open the terminal and type the following command.
#    Initialize Waydroid using the VANILLA image
sudo waydroid init

#    Initialize Waydroid using the GAPPS image
sudo waydroid init -s GAPPS
  • Then, to launch Waydroid in full screen, click the applications launcher and then click Waydroid.
    • Alternatively, open the terminal and type the following command.
waydroid show-full-ui
  • To upgrade the system images that Waydroid uses, run the following command.
#     Upgrade Waydroid images
sudo waydroid upgrade
  • To effectively reset the configuration of Waydroid, run the following commands.
    1. First, stop the Waydroid container service.
    2. Then, clean the configuration files.
    3. And finally, start the service and initialize Waydroid again.
#    Stop Waydroid service
sudo rc-service waydroid-container stop

#    Delete Waydroid configuration and images
sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/waydroid ~/.local/share/waydroid || true

#    Start Waydroid service
sudo rc-service waydroid-container start
  • Waydroid provides a command to visualize its log; this is useful for troubleshooting. To visualize the log of Waydroid, run the following command.
#    Visualize Waydroid log
waydroid log

Disclaimer: We do not develop Waydroid. Please file issues with Waydroid at their bug tracker here.

Zero Install

Zero Install or 0install is “a decentralized cross-distribution software installation system available under the LGPL. It allows software developers to publish programs directly from their websites while supporting features familiar from centralized distribution repositories, such as shared libraries, automatic updates, and digital signatures.”

Some of Zero Install features are.

  • Run apps with a single click. Run applications without having to install them first.
  • Anyone can distribute software. Create one package that works on multiple platforms.
  • You control your computer. You don’t have to guess what happens during installation.
  • Security is central. Installing an app doesn’t grant it administrator access.

To use 0install, see the following example.

A 0install application is distributed using a feed file. A feed is an XML file that tells 0install how to run the application and which versions are available. The feed file is usually published online; the URL is the application’s unique identifier.

  • Find a program you want to run on the web.
    • 🔰 Information: Visit the following link for a list of featured apps, 0install tools, and more.
  • Copy and paste the XML URL into the dialog window and click Add.

  • Then click “Download.”

  • Once the download is complete, launch the application from the 0Install Application window.

  • 0install applications are automatically added to the application launcher.

Disclaimer: We do not create, maintain, or host the 0install executable files. These files are created, maintained, and hosted by third parties. Please let their creators or maintainers know if you have issues with these files.

One more thing…

As we can see, multiple ways of adding software to Nitrux exist. With the options above, there’s no shortage of software to install and use. Below, you can find information regarding other methods to obtain software.

Support for Other Self-Contained Formats

In addition to AppImage and Flatpak, other types of self-contained formats exist, such as Snaps.

  • Snap is a software packaging and deployment system developed by Canonical for Linux and the systemd software suite (which includes an init).
    • ⚠️ Important: Nitrux does not support Snaps as its daemon (snapd) requires systemd.

Another more popular option is undoubtedly static binaries or static builds.

  • A static binary is an executable program compiled and linked with all its dependencies statically. In contrast to dynamic binaries, which rely on shared libraries (also known as dynamic link libraries) at runtime, static binaries include all the necessary libraries and code within the binary itself. This means that a static binary can run on a system without requiring any external dependencies to be present.

This description could make static binaries sound similar to AppImages. Static binaries and AppImages offer portability and independence from external libraries, but the packaging and distribution approach is the crucial difference. Static binaries are single executable files, whereas AppImages are a specific packaging format for bundling applications and dependencies.

Disclaimer:  We do not develop or maintain the static binaries provided in these repositories. We’re not endorsing these repositories or their content. The content of these repositories is the responsibility of their maintainers.

Support for Other Software Installation Methods

As we indicated at the beginning of this tutorial, Nitrux is a distribution that doesn’t revolve around a package manager like other distributions; however, besides using Distrobox, users can use package managers in a non-containerized way in Nitrux. The critical difference with doing so is that these package managers do not alter the root directory; they store their content in the home directory. Additionally, in the case of Homebrew, the software is provided by its community of users, as the famed AUR does for Arch Linux users, rather than the distribution through software repositories, i.e., what we used to do before Nitrux 2.6.0.

Below are two recommendations for these package managers.

  • Homebrew is a macOS package manager that works on Linux, which allows users to install software to their home directory. Homebrew features are the following:
    • Homebrew can install software to your home directory, so it does not require sudo.
      • 🔰 Information: A package in Homebrew is called a formula. A list of all available formulas can be found here.
    • Install software not packaged by your host distribution.
    • Install up-to-date versions of software when your host distribution is old.
    • Use the same package manager to manage your macOS, Linux, and Windows systems.
      • To install Homebrew for Linux in Nitrux, do the following.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

#    After downloading and executing the install script, run the following commands to add Homebrew (brew) to your $PATH.
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/$USER/.zprofile && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && echo -e "\n# Alias for Homwbrew\nalias brew='\/home/linuxbrew/.linuxbrew/bin/brew'\n" >> ~/.zshrc && source ~/.zshrc

# For help run the following command.
brew --help
  • ⚠️ Important: At the time of writing, graphical software is not available in Homebrew for Linux.

Homebrew in Nitrux. Image for reference.

  • Nix Package Manager (Portable)
    • Nix is a static executable requiring no configuration, privileges, or (user) namespaces.
      • Make it extremely simple to install Nix.
      • Make Nix work in restricted environments (containers, HPC, etc.)
      • Use the official binary cache (by simulating the /nix/store).
      • Make it easy to distribute Nix (via other package managers).
        • The nix-portable executable is a self-extracting archive, caching its contents in $HOME/.nix-portable.
        • Either bubblewrap or proot is used to simulate the /nix/store directory, which resides in $HOME/.nix-portable/store.
        • A default nixpkgs channel is included, and the NIX_PATH variable is set accordingly.
        • Features flakes and nix-command are enabled out of the box.
    • To install Nix (Portable) in Nitrux, do the following.
#    The command will download the binary to the $HOME and create an alias.
axel -o $HOME/.local/bin/nix https://github.com/DavHau/nix-portable/releases/download/v010/nix-portable && chmod +x $HOME/.local/bin/nix && echo -e "\n# Alias for Nix\nalias nix='\$HOME/.local/bin/nix'\n" >> ~/.zshrc && source ~/.zshrc

#    For help run the following command.
nix --help

Nix portable in Nitrux. Image for reference.

Disclaimer:  We do not develop or maintain Homebrew for Linux and Nix (Portable). Homebrew for Linux and Nix (Portable) are not installed by default.

However, that’s not all; as we can see below, there are similar experiences to managing software in Windows but targeting Linux.

  • Linux (application) Installers. Some developers use installers rather than distribute their software through AppImages, Flatpaks, or Snaps—yes, installers exist in Linux.
    • CLI installers like the ones used by Oracle and VMware to distribute their hypervisors. Virtualbox is distributed as a .run installer, and VMware Workstation/Player is distributed as a .bundle installer. In practice, there’s no difference between these installers but their file extension. Both installers install software via a script through the terminal rather than a graphical package manager.
    • Graphical installers also exist; an example of a graphical installer for Linux is the linux-installer software, a graphical framework to create installers using GTK 3 and CSS for the GUI that imitates the look-and-feel of install wizards commonly used in Windows, specifically the NSIS (Nullsoft Scriptable Installable Software) Wizard software.

Example of linux-installer. Image for reference.


That’s it; this concludes today’s tutorial.