Fedora

How to Install Cacher Code Snippet Library in Fedora

Code snippets are an important time-saver and productivity enhancer for programmers. Snippets can help programmers to avoid writing repetitive code again and again. They also help in organizing code and providing a clean workspace. Snippets help to speed up the development process, reducing the time and effort of programmers in managing large blocks of code. There are many great snippet tools available, including Brackets, CodePen, JSFiddle, Cacher, and more to boost the workflow. This article shows you how to install Cacher, a code snippet library tool for organizing code snippets.

Features of Cacher

  1. Provides plugins for various text editors and IDEs, including IntelliJ, Visual Studio, Sublime Text, etc.
  2. Contains a command-line interface tool to carry out operations in Cacher libraries.
  3. Snippet file contents can run inside a shell, such as bash or zsh.
  4. Stores snippets online, which can be accessed using the desktop clients of various operating systems or the Cacher web app.
  5. Code snippets can be tagged with flexible, nest-able, color-coded labels for categorization.
  6. Users can join teams with their peers to work on snippets in a shared library.
  7. Support for more than 100 programming languages.

About this Article

This article will show you how to install the Cacher tool on Fedora Linux. We will first use the Snap repository, then the .AppImage file, to install Cacher. This guide was performed on a Fedora 33 workstation. The steps provided in this guide should also work on other Fedora versions, as well as other Linux distros.

Prerequisites

  1. Internet connectivity to download various files.
  2. User account with administrator (sudo) privileges.
  3. Fedora Linux installed on your machine.

Method 1: Installing Cacher from the .AppImage File

Cacher provides an .AppImage file that can be downloaded from the official Cacher website. To install Cacher from the .AppImage file, follow the procedure provided below:

Step 1. Visit the official website of Cacher and click the Download button.

Step 2. Once you hit this button, a new popup window will appear. This popup window will show the steps to be performed to install the .AppImage file.

Step 3. The above popup window will be followed by another window for downloading the .AppImage file. Hit the Save File button to download the file onto your system.

See the reference picture below for an overview of the above steps:

Step 4. Once the file has been downloaded onto your system, open the terminal and navigate to the downloaded file:

Step 5. Give the required permission to the Cacher .AppImage file to make it installable. To do so, run the following command:

$ sudo chmod a+x ~/Downloads/Cacher-2.39.0.AppImage

The above command will give execute permission for the file to everyone. If the .AppImage file is executed without running the above command, you may get the following error:

sudo: ./Cacher-2.39.0.AppImage: command not found


Step 6. After assigning proper permissions, launch the Cacher application from the .AppImage file with the following command:

$ ./Cacher-2.39.0.AppImage

Note: In this method, Cacher can only be started from the directory in which it was downloaded.


As you can see in the above picture, the Cacher sign-up screen will appear after executing the file.

Note: Do not run the file with the ‘sudo’ command, as the .AppImage file of Cacher does not support running as the root user. This is depicted in the picture below:

Uninstalling Cacher

To uninstall Cacher, simply remove the .AppImage file with the command provided below:

$ rm Cacher-2.39.0.AppImage

The above command is shown here:

Method 2: Installing Cacher from the Snap Repository

Snap is another easy way to install Cacher on Fedora Linux. The benefit of using the Snap is that the applications are already packaged with all the required dependencies. You only need to find the application and install it from the Snap Store. To do so, first, you will need to install the Snap application on Fedora.

Step 1. Open the terminal (Alt+Ctrl+T) and issue the following command:

$ sudo dnf install snapd

Once the Snap has been installed, we need to confirm that the Snap’s path has been updated properly. To do so, either log out and log in again or restart the system.

If you do not log out and log in again and instead try to directly install Cacher, the following error may occur:

Step 2. You can create a symbolic link between /var/lib/snapd/snap and /snap. This will enable the classic Snap support. Issue the following command to do so:

$ sudo ln -s /var/lib/snapd/snap /snap

Step 3. Now, you can continue to install Cacher from the Snap repository, as follows:

$ sudo snap install cacher

This process will take some time to download the various files, such as snapd, core18, Cacher, etc. In the Activities tab, open the System Monitor application and go to the Resources tab. Here, you can see the downloaded data at the bottom-left of the System Monitor window, as shown below:

The following message will be displayed when the Cacher installation is complete:


Step 4. Unlike in the previous method, in this method, Cacher requires ‘sudo’ privileges to launch. Cacher can also be launched from the Activities tab, as well as from any directory.

Uninstalling Cacher

Cacher can be uninstalled quite easily from Fedora with the following command:

$ sudo snap remove cacher

Conclusion

This guide showed you how to install the Cacher code snippet library on the Fedora 33 workstation. If you follow the guide correctly, you will notice that Method 2 of the installation is comparatively easy and more flexible. You can launch Cacher from any directory or the main menu using this method. But in Method 1, you must launch the Cacher from the Downloads directory only. Cacher is available for free to download with limited features, while the premium version comes with multiple additional features.

About the author

Ali Imran Nagori

Ali Imran Nagori

Ali imran is a technical writer and Linux enthusiast who loves to write about Linux system administration and related technologies. You can connect with him on LinkedIn
.