LINUX

How and Why to Install Latte Dock From Source Code

0

Latte Dock is one of the most popular and versatile panel and menu replacements for the KDE Plasma desktop. When you install it from source code, you get the very latest features and functions that are unavailable in most distro package repositories.

No matter which Linux distribution you use, you probably install most if not all of your software through your distro’s package management system. Since the package manager generally handles all of the necessary dependencies and updates for whatever program you want, it’s usually the safest and most efficient choice.

Sometimes, though, even if a program is available in your distro’s software repositories, you’ll end up with a much better final product if you download, compile, and install the program from source code. This is the case with Latte Dock.

Why You Should Install Latte Dock From Source Code

Latte Dock is available through the package manager of most Linux distributions. In the majority of cases, however, the version of Latte in distro repositories is quite a bit older than the version currently available if you download the source code from GitHub.

Most Linux distributions’ file repositories only update specific packages every few weeks, or even months. Latte Dock, on the other hand, is an actively developed project with updates added to its GitHub page nearly every day. You can check in and grab updates whenever you like and you will always have the absolute latest fixes and features.

How to Download Latte Dock Source Code From GitHub

If you’ve never used Git and GitHub, it can look confusing and intimidating at first. Don’t worry, though. If all you want to do is download a project’s source code, you can do it in just a few moments with a single Git command.

Important Note: Remember, Latte Dock is designed specifically for KDE Plasma. It will not work on GNOME or other desktop environments.

Check for Git Installation

The first thing you’ll need to do is make sure that you have Git installed on your system. There is a very good chance that it is already there. To check, simply open a terminal and type git at the command line and press enter. If it is installed you will get a quick help message with a list of common Git commands. If you get an error message, you’ll need to install it with one of the commands below.

To install Git on RPM-based systems like RedHat and Fedora:

sudo dnf install git

To install on DEB based systems like Debian and Ubuntu:

sudo apt install git

Clone the Latte Dock GitHub Repository

Don’t let the terminology scare you away. “Cloning” is just a fancy word for downloading an exact copy of the current source code from GitHub. You’ll need to go to the Latte Dock GitHub repository in your web browser first, and then initiate the download with Git in your terminal.

git latte dock code branch selection

When the page loads, you will see something similar to the image above. The first thing you want to do is make sure you are looking at the “master” branch of the source code. This is the default, and you should see the word master as in the red box on the left above. If it does not say master for some reason, click and select master from the pulldown menu.

Next, click the green Code button on the right. A pop-up box will open with the URL you need to clone the repository. Copy that URL and go back to your terminal.

In your terminal, switch to or create the directory where you want to download the source code. Git will automatically create a latte-dock subdirectory, so you only need to navigate to where you want that subdirectory placed. For example, if you go to your /home directory and run the following git command, the source code will be placed in /home/latte-dock.

At your terminal prompt, enter the following command (replacing the URL with the one you copied from the web page if necessary):

git clone https://github.com/KDE/latte-dock.git
git clone latte dock output

It will take just a few seconds for the repository files to be duplicated on your system. You should see output similar to above.

Install Dependencies Needed to Compile the Code

Before you can compile the Latte Dock source code for the first time, you’ll need to install some required libraries and packages. You’ll only need to do this once. After that, you’ll be able to compile newer versions with one simple command. The exact commands to install these dependencies vary by distribution. Pick the command(s) for your Linux distribution, copy, and paste at a terminal prompt.

Kubuntu/Ubuntu

sudo add-apt-repository ppa:kubuntu-ppa/backportssudo apt updatesudo apt dist-upgrade

Kubuntu/Ubuntu and KDE Neon

sudo apt install cmake extra-cmake-modules qtdeclarative5-dev libqt5x11extras5-dev libkf5iconthemes-dev libkf5plasma-dev libkf5windowsystem-dev libkf5declarative-dev libkf5xmlgui-dev libkf5activities-dev build-essential libxcb-util-dev libkf5wayland-dev git gettext libkf5archive-dev libkf5notifications-dev libxcb-util0-dev libsm-dev libkf5crash-dev libkf5newstuff-dev libxcb-shape0-dev libxcb-randr0-dev libx11-dev libx11-xcb-dev kirigami2-dev

Arch Linux

sudo pacman -Syusudo pacman -S cmake extra-cmake-modules python plasma-framework plasma-desktop

Fedora and RedHat

sudo dnf install cmake extra-cmake-modules qt5-qtdeclarative-devel qt5-qtx11extras-devel kf5-kiconthemes-devel kf5-plasma-devel kf5-kwindowsystem-devel kf5-kdeclarative-devel kf5-kxmlgui-devel kf5-kactivities-devel gcc-c++ gcc xcb-util-devel kf5-kwayland-devel git gettext kf5-karchive-devel kf5-knotifications-devel libSM-devel kf5-kcrash-devel kf5-knewstuff-devel kf5-kdbusaddons-devel kf5-kxmlgui-devel kf5-kglobalaccel-devel kf5-kio-devel kf5-kguiaddons-devel kf5-kirigami2-devel kf5-kirigami-devel kf5-ki18n kf5-ki18n-devel

Important Note: Dependencies may change over time as the code is updated. You can always find a list of the most current dependencies in the INSTALLATION.md file that is included when you clone the GitHub repository.

Compile the Latte Dock Source Code

Latte Dock compiling output

With the dependencies installed, you’re ready to compile the source code and start using Latte Dock. You’ll just need to switch into the latte-dock subdirectory, if you’re not already there, and enter the following command at your terminal prompt:

sh install.sh

Depending on the speed of your computer, it can take up to several minutes for the code to compile and install. You’ll see plenty of messages flying by on the screen as the compiler does its job.

Launch and Enable Latte Dock

When the compilation and installation process completes, you can launch and begin using Latte Dock. You should see it in your regular launcher menu under the Utilities category. You can also launch it directly from the terminal by typing latte-dock at the command prompt.

Fedora Plasma Latte Dock default

It will take a moment for the program to load and then you should see the default Latte Dock panel at the bottom center of your desktop. The first thing you should do is right-click over the dock and select Configure Latte Dock. On the preferences tab of the dialog that appears, be sure to select the checkbox to enable autostart of Latte Dock at startup.

Latte Dock enable startup

With the program installed and enabled, you can look through the many configuration options and begin creating your own personal dock and panel system. For some excellent examples of what you can do with Latte Dock, check out the custom Latte layouts available from the KDE Store.

Special Note: If this is your first time using Latte, be careful about removing your existing Plasma panel(s) and launcher(s). You can quickly make your system difficult to navigate if you remove existing launcher widgets before adding replacements to your new dock.

How to Update Latte Dock From Source Code

Once you have cloned the Latte Dock GitHub repository, it’s incredibly easy to update the program whenever you like. Simply open a terminal, switch into the latte-dock directory and enter the following commands:

cd path/to/latte-dockgit pullsh install.sh

The git pull command will automatically connect to GitHub and update the source files on your computer with any changes that have been made in the repository. Running the install script again will recompile the program using the new source code. You can do this daily, weekly, or as often as you like.

You’ll Never Fall Behind Again

Now, with Latte Dock installed from source code, you will never fall behind the latest version again. Whenever you want to, you can easily download and incorporate up-to-the-minute changes, fixes, and features.

admin

AirPods 2 vs. AirPods 3: Which One Should You Buy?

Previous article

Can You Use a MacBook Power Adapter to Fast Charge Your iPhone? Is It Safe?

Next article

You may also like

Comments

Leave a reply

Your email address will not be published. Required fields are marked *

More in LINUX

Login/Sign up