Installing ntfy on Linux Mint

In this tutorial, we will learn how to install ntfy, a command-line utility that sends desktop notifications when a long running command completes or fails, on Linux Mint.

Prerequisites

Installing ntfy

Follow the steps below to install ntfy on Linux Mint:

  1. Open a terminal emulator by pressing Ctrl + Alt + T or search for "terminal" in the application menu.

  2. First, update the package information and install the necessary dependencies:

    sudo apt-get update
    sudo apt-get install -y libdbus-glib-1-dev libdbus-1-dev libgirepository1.0-dev libnotify-bin
    
  3. Next, install pip, a package installer for Python:

    sudo apt-get install -y python3-pip
    
  4. Finally, use pip to install ntfy:

    sudo pip3 install ntfy
    
  5. You can verify whether ntfy is installed by typing the following command:

    ntfy --version
    
  6. If ntfy is installed correctly, you will see the version number displayed in the terminal.

Using ntfy

To use ntfy, simply append the ntfy command to the start of a long running command. For example, let's use the sleep command to simulate a long running command:

ntfy sleep 10

When the sleep command completes, a desktop notification will appear telling you the command has finished. If the command fails or takes longer than expected, you will receive a notification indicating the error.

Congratulations, you have successfully installed and started using ntfy on Linux Mint.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!