Geany is a lightweight, fast, and versatile text editor that is widely used by developers for programming and scripting. It offers a simple yet powerful interface with features like syntax highlighting, code folding, and a built-in terminal, making it an excellent choice for both beginners and experienced developers. Geany supports a wide range of programming languages, providing a comfortable environment for coding in various languages without the overhead of a full-fledged Integrated Development Environment (IDE).
On Fedora 40 or 39, Geany can be installed using the DNF package manager via Fedora’s AppStream, which ensures a stable and well-integrated version of the editor. Alternatively, for users who prefer a more isolated environment or want access to newer versions, Geany can also be installed using Flatpak with the Flathub third-party repository. This guide will walk you through both installation methods, allowing you to choose the approach that best fits your needs.
Method 1: Install Geany via DNF
Update Fedora Before Geany Installation
It’s essential to start by updating your Fedora system. This step ensures that all your existing packages are current, providing a stable base for new installations.
To update Fedora, execute the following command:
sudo dnf upgrade --refresh
This command refreshes the repository and upgrades the packages, maintaining the system’s integrity and security.
Install Geany via DNF Command
After updating your system, you can install Geany. Geany is available directly from Fedora’s official repository, ensuring a secure and straightforward installation. Use the following command to install Geany:
sudo dnf install geany
This command downloads and installs the latest version of Geany.
Method 2: Install Geany via Flatpak and Flathub
Verify Flatpak Installation
Before installing Geany, ensure Flatpak is installed on your Fedora workstation. Flatpak is often pre-installed, but if you’ve previously removed it, reinstall it using this command:
sudo dnf install flatpak -y
This command reinstalls Flatpak, allowing you to access various applications, including Geany.
Enable Flathub for Geany Installation
After confirming Flatpak’s installation, the next step is to enable Flathub. Flathub is a repository for Flatpak applications, often offering more current software versions than Fedora’s default repositories. To enable Flathub, use the following command:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
This command ensures that your system can access and install applications from Flathub.
Install Geany via Flatpak Command
With Flathub enabled, you can now install Geany. Use the command below to install Geany via Flatpak:
flatpak install flathub org.geany.Geany -y
This command installs the latest version of Geany available on Flathub.
Troubleshoot Flatpak Geany Installation
If you encounter an error stating, “error: Unable to load summary from remote flathub: Can’t fetch summary from disabled remote ‘flathub,'” the solution is straightforward. Enable Flathub using the following command:
"error: Unable to load summary from remote flathub: Can't fetch summary from disabled remote 'flathub,"
The fix is simple: run the following command to enable Flathub.
flatpak remote-modify --enable flathub
This command resolves the issue by enabling the Flathub repository.
Launching Geany User Interface
CLI Commands to Launch Geany
Once Geany is installed on your Fedora Linux system, you can launch it using the command-line interface (CLI). This method is efficient for those who prefer working in a terminal environment.
To open Geany via the CLI, enter:
geany
This command quickly launches the Geany application.
For users who installed Geany via Flatpak, use this alternative command:
flatpak run org.geany.Geany
This command targets explicitly the Flatpak installation of Geany, ensuring that the correct version of the application is launched.
GUI Method to Launch Geany
For desktop users, launching Geany through the graphical user interface (GUI) is more convenient. This method is straightforward and does not require the use of terminal commands.
To open Geany via the GUI, follow this path:
Activities > Show Applications > Geany
Additional Commands For Geany
Updating Geany
DNF Update Method for Geany
For installations done via DNF, the following command will update Geany along with other system packages:
sudo dnf upgrade --refresh
Flatpak Update Method for Geany
If you installed Geany using Flatpak, use this command to update it:
flatpak update
Remove Geany
If you need to uninstall Geany, select the command corresponding to your original installation method.
DNF Remove Method for Geany
To remove Geany installed via DNF, along with its unused dependencies and other remnants, use:
sudo dnf autoremove geany
Running this command regularly helps prevent system bloat by removing unnecessary files.
Flatpak Remove Method for Geany
For Geany installations via Flatpak, the following command will uninstall the application and delete its data:
flatpak uninstall --delete-data org.geany.Geany -y
Conclusion
By installing Geany on Fedora using the DNF package manager or Flatpak, you have set up a versatile and efficient text editor tailored to your development needs. The DNF method integrates Geany seamlessly with your Fedora system, while the Flatpak approach provides added flexibility and isolation. To keep your development environment up-to-date and secure, ensure regular updates through your chosen installation method. This will help you maintain access to the latest features and enhancements, ensuring Geany remains a reliable tool for your coding projects on Fedora.