How to Install Element on Linux Mint 21/20

In the arena of real-time communication, Element establishes itself as a force to reckon with. It’s an open-source instant messaging client designed on the framework of the Matrix protocol, freely available for anyone seeking a secure, robust and feature-rich communication solution. Its prowess comes from several unique aspects that set it apart in the crowded domain of messaging applications:

  • Open-Source Advantage: Element, being open-source, opens doors to continual innovation and improvement. Developers across the globe can access, review, and enhance its source code, ensuring it remains at the cutting edge of technology while maintaining transparency and trust.
  • Matrix Protocol: Matrix is a novel open standard protocol for decentralized, real-time communication. It delivers interoperability between diverse communication apps and services, turning the dream of universal secure messaging into reality. Element, built on this protocol, brings a myriad of these benefits to its users.
  • Security and Privacy: Emphasizing user privacy and data security, Element provides end-to-end encryption. This assures that your communication remains solely within your control, and not even the server can access it.
  • Interoperability: With Matrix at its core, Element presents a significant advantage in interoperability. It can seamlessly communicate with other applications using the same protocol, effectively bridging gaps between different platforms.
  • Versatility: Element’s utility isn’t limited to personal use. It also facilitates secure, reliable, and customizable communication channels for teams, businesses, and even governments.

While these standout features make Element a compelling choice for many, it’s the ease of use that really shines through. Despite its technological sophistication, the application remains approachable for users of all levels of expertise. No matter the device or platform, Element provides a consistent experience. If you are a Linux user, for instance, setting up Element on your machine is straightforward.

The forthcoming guide will demonstrate how to install the Element desktop client on Linux Mint 21 or the older release, Linux Mint 20. From download to installation, every step will be covered in detail to ensure you can start enjoying the secure and flexible communication experience offered by Element.

Section 1: Element Desktop Installation on Linux Mint with APT

Step 1: System Update

The primary task in the process of installing Element is to confirm that your Linux Mint system is fully updated with the latest software packages. This preemptive measure mitigates potential compatibility issues that might surface during the Element installation.

To perform a system update, we utilize APT (Advanced Package Tool), a default package management utility on Linux Mint. This tool facilitates interaction with Mint’s package repository, empowering us to perform a host of tasks, including installation and upgrades. The command to execute these tasks is:

sudo apt update && sudo apt upgrade

In the command sudo apt update && sudo apt upgrade, sudo grants the necessary superuser privileges to execute the commands. apt update retrieves the package lists from the repositories, refreshing them with data about the newest versions of packages and their dependencies. Subsequently, apt upgrade proceeds to install the available upgrades for all currently installed packages.

Step 2: Prerequisite Packages Installation

Before installing Element, it’s paramount to ensure certain prerequisite packages are installed on our Linux Mint system. These packages – software-properties-common, apt-transport-https, and curl – offer essential utilities needed at different stages of the Element installation process.

The command to install these packages is:

sudo apt install software-properties-common apt-transport-https curl -y

In the command sudo apt install software-properties-common apt-transport-https curl -y, apt install serves to install new packages (software-properties-common, apt-transport-https, and curl in this instance). The -y flag is used to confirm our intent to proceed with the operation without requiring further approval.

Step 3: Element Repository Integration

Before installing Element, we must add its repository to our Linux Mint system. However, we first need to import Element’s GPG key for security purposes. This key vouches for the integrity and authenticity of the packages that we are about to install.

Here is the command to import the GPG key:

curl -fSsL https://packages.element.io/debian/element-io-archive-keyring.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/element-io-archive-keyring.gpg > /dev/null

In this command, curl fetches the GPG key from the given URL, and gpg --dearmor processes this key. The sudo tee command then writes the processed key to a specific file in your system.

Next, we add Element’s repository to our system’s package sources with the following command:

echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" | sudo tee /etc/apt/sources.list.d/element-io.list

In this command, echo is responsible for writing the repository details to the element-io.list file located within /etc/apt/sources.list.d/.

Step 4: Refreshing the Package Index

Now that the Element repository has been integrated into our Linux Mint system, we need to instruct APT to refresh its package list. This action allows APT to recognize the newly available packages for installation from the recently incorporated Element repository.

We execute this using the command:

sudo apt update

Step 5: Installing Element

Finally, we’ve arrived at the terminal point of our process—installing Element! Having completed all preliminary steps with due diligence, we can now instruct APT to install the element-desktop package. This package acts as the Element client for Linux Mint.

Execute the installation with the following command:

sudo apt install element-desktop

The command sudo apt install element-desktop specifically tells APT to download and install the Element desktop client. sudo provides the necessary administrative privileges, apt install is the instruction to install a package, and element-desktop is the package we want to install.

With the completion of these steps, you have successfully installed the Element desktop client on your Linux Mint system with APT and the Element APT repository. For Linux Mint users that prefer Flatpak installations, check out section 2 below.

Section 2: Element Installation through Flatpak and Flathub

Flatpak stands as a universal package management system specifically designed for Linux. Its utility lies in providing a sandbox environment that allows applications to run in isolation from the rest of the system. This form of isolation can be likened to Snap, yet with Flatpak, there’s a distinctive edge. When installing applications like Element through Flatpak, all the necessary dependencies are encapsulated within a single package. This self-containment significantly enhances software execution, making it more reliable and free from potential conflicts.

Step 1: Activating the Flathub Repository

Before we venture into the installation of Element using Flatpak, it’s essential to first activate the Flathub repository. Flathub serves as a comprehensive source for obtaining Flatpak applications. The Flathub repository houses a plethora of applications, including the Element package we seek. To enable Flathub, the following command should be executed in your terminal:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

In this command, sudo is granting the required administrative privileges. The command flatpak remote-add --if-not-exists flathub adds the Flathub repository to your Flatpak configuration, ensuring you have access to a broad range of applications, only if the ‘flathub’ remote hasn’t been added already. The URL following the command points to the location of the Flathub repository online. Thus, with this single line of code, you are essentially widening the range of applications accessible to you, preparing your system for the subsequent installation of Element.

Step 2: Element Installation Process

Once the Flathub repository has been enabled, you are now equipped to proceed with the installation of Element using the flatpak install command. To commence the installation of Element, the following command should be run in your terminal:

flatpak install flathub im.riot.Riot -y

In the above command, flatpak install signals Flatpak to initiate an installation. flathub is the repository from where the package will be fetched, and im.riot.Riot is the specific package you wish to install, i.e., Element. The -y flag at the end of the command ensures the installation process proceeds without further prompts for confirmation.

Upon successful execution of this command, Flatpak retrieves the Element package from the Flathub repository and installs it on your Linux Mint system. As with the APT-based installation discussed earlier, the application is now ready for use.

Section 3: Starting up Element on Linux Mint

Now that Element has been successfully installed on your Linux Mint system, the next milestone to achieve is to get it up and running. Two predominant avenues are available for launching applications in Linux Mint: the Command Line Interface (CLI) and the Graphical User Interface (GUI). Both methods have their unique strengths and applicability, and the choice between the two will largely depend on user preference and specific task requirements.

Method 1: Launching Element through the Command Line Interface (CLI)

The Command Line Interface, more colloquially known as the terminal, provides a text-oriented environment in which commands are directly executed on the operating system. Although it might appear daunting to beginners, the terminal holds immense power and efficiency for certain tasks.

To commence Element via the terminal, input element-desktop and press the enter key. Be mindful that Linux commands are case sensitive, implying that ‘element-desktop’ and ‘Element-desktop’ would be interpreted as different commands.

element-desktop

Upon executing this command, the Element application will launch, revealing its Graphical User Interface (GUI).

However, for installations carried out through Flatpak, Element can be kickstarted using the following command:

flatpak run im.riot.Riot

Method 2: Launching Element via Graphical User Interface (GUI)

For those who lean towards a more visual method, launching Element through Linux Mint’s applications taskbar would be a suitable choice. Here’s a straightforward process to get you started by following the following path:

Taskbar > Internet > Element

Example of Element application icon on Linux Mint:

example of element application icon on linux mint taskbar

Section 4: Tips on Getting Started with Element on Linux Mint

Element is an open-source, end-to-end encrypted messaging and collaboration application that operates on the Matrix network. It’s a powerful tool for secure communication, and it’s available on a variety of platforms, including Linux. This guide will provide you with some tips on how to get the most out of Element on Linux.

General Tips

  • End-to-End Encryption: Element uses end-to-end encryption for all messages. This means that your messages are encrypted on your device before they are sent, and can only be decrypted by the intended recipient. This ensures that your communications are secure and private.
  • Device Verification: Element allows you to verify your devices, which adds an extra layer of security. When you log in on a new device, you can verify it on an existing device. This helps to ensure that the new login is really you.
  • Secure Backup: Element provides a secure backup feature. This creates an encrypted backup of your messages and data on your server, which only you can decrypt. This is a crucial step to ensure that you never lose access to your encrypted messages and data.

Customizations

  • Profile Customization: You can customize your profile by updating your display name, profile picture, and language. You can also manage your notifications, security, and privacy settings from your profile.
  • Spaces: Element allows you to organize groups of people and rooms together using Spaces. A selected space will only show the list of rooms and people that are part of it. This can help you to keep your conversations organized and focused.
  • Appearance: Element allows you to customize the appearance of the application. You can switch between a light and dark theme, adjust the font size, and more.

Other Tips

  • Customize Notifications: Element offers detailed control over your notifications, enabling you to tweak their behavior to suit your specific needs. Access the settings menu and navigate to the notifications section. Here, you can:
    • Customize your desktop notifications – determine when and how Element will alert you of new messages.
    • Mute specific rooms or chats – ideal if you are part of a busy room or if you need to focus without interruptions.
    To navigate to Notification Settings, follow this path: Element -> Settings -> Notifications
  • Take Advantage of Keyboard Shortcuts: Keyboard shortcuts can significantly enhance your productivity. Element includes several built-in shortcuts that can simplify routine actions:
    • Ctrl + K: Quickly switch between chats.
    • Ctrl + Shift + L: Jump to the start of your last unread message.
    You can view the full list of shortcuts under Element -> Settings -> Help & About -> Keyboard Shortcuts.
  • Use Markdown for Rich Text Formatting: Markdown is a simple syntax designed to convert plain text into HTML. In Element, it is used for text formatting and it’s quite straightforward. Here are some examples of how you can use markdown syntax in Element:
    • Italic text: If you want to make your text italic, wrap your text in either single asterisks or single underscores. For example, *This text will appear in italics* or _This text will also appear in italics_ will appear as italicized text in Element.
    • Bold text: To make your text bold, wrap your text in double asterisks or double underscores. For example, **This text will appear in bold** or __This text will also appear in bold__ will appear as bold text in Element.
    • Hyperlinks: You can create clickable text that links to a URL. To do this, you need to enclose your text in square brackets and follow it immediately with the URL in parentheses.For example, [Click here to visit LinuxCapable](https://www.linuxcapable.com/) will appear as a clickable text that directs to the specified URL in Element.
example of element on linux mint successfully installed time to sign in

Section 5: Administering Element on Linux Mint

A crucial factor that differentiates a proficient system administrator is the capability to manage software installations effectively. In this part of the guide, our focus will be on the administration of the Element installation on Linux Mint, delving into procedures for both updating and removing the software.

Updating Element

Maintaining your software up to date is pivotal to assure access to the latest features and crucial security patches. The method of updating varies, depending on your method of installation – APT or Flatpak.

If you installed Element using the APT package management system, you would first need to update the package list using:

sudo apt update

Subsequently, to upgrade packages due for updates, including Element, use the apt upgrade command:

sudo apt upgrade

This command will upgrade all packages with available updates, ensuring both your system and the Element installation are current.

Updating Element via Flatpak

If Element was installed using Flatpak, the update command is somewhat simpler. Executing the following command in your terminal is enough:

sudo flatpak update

This command refreshes all the Flatpak applications installed on your Linux Mint system, including Element.

Removing Element

APT Element Removal method:

There may arise instances when you need to uninstall Element from your system. This section will guide you on how to remove it, whether installed via APT or Flatpak.

If you installed Element via APT, the initial step to uninstall the software is:

sudo apt remove element-desktop

Subsequent to this, it’s critical to eliminate the Element repository from your system to prevent it from being used in future installations or updates:

sudo rm /etc/apt/sources.list.d/element-io.list

For maintaining good system hygiene, it’s also recommendable to remove the associated GPG key:

sudo rm /usr/share/keyrings/element-io-archive-keyring.gpg

This step assures that your system doesn’t retain any security certificates associated with the Element software.

Flatpak Element Removal method:

For Element installations that were carried out using Flatpak, you can employ the following command to uninstall Element:

sudo flatpak uninstall im.riot.Riot

This command will efficiently eliminate Element from your Linux Mint system, which was installed using Flatpak from the Flathub repository.

Closing Thoughts and Useful Links

In this comprehensive guide, we’ve walked through the process of installing and managing the Element Desktop Messenger Client on a Linux Mint distribution. Our journey included understanding the specifics of acquiring the Element application either via APT or Flatpak, techniques to launch the software using both command-line and graphical user interface methods, and essential steps to update or remove the software depending on user requirements. By following the outlined instructions, users can efficiently interact with Element and take full advantage of this versatile communication platform. In essence, this guide not only aids in understanding how to install and manage Element but also contributes towards a greater comprehension of software management on Linux Mint.

Additional Resources and Links

If you’re eager to learn more about Element, we highly recommend the following resources. These official sources provide an abundance of information, from user guides to feature breakdowns, and are essential reads for anyone looking to deepen their understanding and efficient use of Element.

  • Element Official Website: An introduction to the Element platform, its philosophy, and what it offers to users.
  • Element Features: Discover the diverse features that set Element apart from other messaging platforms.
  • Element User Guide: An essential guide to help you navigate the ins and outs of the Element platform.
  • Element Blog: Stay up to date with the latest updates, news, and articles from the Element team.
  • Element Help: A dedicated help section to answer your pressing questions about using Element.
  • Element Integrations: Learn about the possibilities and flexibility that integrations provide to Element users.
  • Element Open Source: Understand the open-source philosophy behind Element and how you can contribute to its development.