Monthly Archives: March 2025

Amarok is finally available on Flathub

I have always liked Amarok, the (initially) default KDE media player. It’s very feature-rich, nothing compared to Elisa. Moreover, it has two crucial features that I haven’t found in any other players:

  • it saves statistics (play count and stars) directly into the music file
  • it synchronizes statistics with the iPod.

I have always liked Amarok, the (initially) default KDE media player, and I have already blogged on installing it in Arch Linux and Fedora through its flatpak repository.

Now, installing Amarok on any Linux distribution is easy: it’s available from Flathub!

Once flatpak is configured correctly on your distribution, you just need to run:

Quoting from previous posts on Amarok, it’s also best to install Flatseal for configuring the flatpak application permission:

Let’s start Flatseal and check the Amarok permissions. Some settings are already configured to allow Amarok access to a few standard directories and databases. In my case, I also configure the access to all my files and a mount point because I have my music stored on an external drive, which I mount at that mount point “/media/bettini/backuplinux”):

You can now start Amarok either from the Gnome menu or from the command like:

IMPORTANT: The flatpak version of Amarok stores its files in

instead of the standard directories “.config” and “.local”.

If you want to connect your IPOD, first you must ensure that the “libgpod” package is installed, and then you have to add the permission access in Flatseal to the mount point of your IPOD. Otherwise, Amarok will detect your iPod but as a non-initialized one because it cannot access its contents:

If the Flatseal permissions are set correctly, you can enjoy your Amarok iPod!

Enjoy your music! 🙂

A first look at Pop!_OS Cosmic DE

I’ll briefly review the (currently in alpha 6) Cosmic DE in Pop Os 24.04 from System76 implemented in Rust.

The installation is smooth and easy to follow, based on standard dialogs:

I’m selecting “Clean Install” here because I’m testing it on a virtual machine.

There’s also the chance to encrypt the drive, but I’m not trying that.

The installation process is fast, and it only takes a few minutes.

It’s time to restart the installed system.

It’s a nice-looking DE, clearly inspired by GNOME, with a nice dock.

There are also a few beautiful wallpapers, all related to the space.

Generally, the DE is very responsive and smooth, though there are still graphical glitches now and then. Remember, it’s still in the alpha stage.

The DE comes with a few typical applications, like a terminal, a file manager, and a text editor; from what I understand, they’ve all been written from scratch. Although these applications look neat and clean, they don’t seem feature-complete yet, at least comparing them to Gnome or, even better, KDE-corresponding applications.

The file manager automatically changes the size of the icons when resizing its window.

However, there’s no way to have a tree view.

The terminal allows for some theme customizations, like custom profiles and also the beautiful transparency effect (by the way, note the style of application settings in Cosmic applications):

The above screenshot also shows the installer’s default partition layout.

However, currently, the terminal only allows you to either “Select All” or the text visible on the screen: while selecting, scrolling does not work.

Then, we have the application launcher that also looks clean and neat:

The launcher that appears with SUPER is very helpful. Note that by default, it shows the windows that are currently opened so you can quickly select one of them, e.g., by starting typing or by using the arrow keys:

Press “?” for more options:

The “File Search” looks interesting: I seem to understand that it relies on the standard “find” (or maybe “fd”) to show directories and files inside of them (see the found text file), though I haven’t tried that with actual directories full of tons of files.

The Google search also looks interesting:

The software center, with the “updates” functionality, looks fine:

Let’s now come to the well-known Pop OS “tiling” features:

The tiling features are nice. Also, the shortcuts make navigating and moving tiled windows very easy. During the moving, you also get nice effects.

In the “Settings” application, you can tweak many settings.

The “Appearance” setting, besides the standard “light” or “dark” mode, also allows you to change the accent color (I switched to green).

You also have additional appearance and theming settings, including icons.

By the way, I love the thick and colored border indicating the focused window. Of course, you can remove it if you don’t like it. I find it nice-looking and useful for easily spotting which window you’re working on.

Speaking of settings, Cosmic adopts a textual file approach, which I greatly like. Configuration files of applications or parts of the desktop can all be found in subdirectories of “~/.config/cosmic”.

For example, this is the file with the terminal opacity:

And this is the accent color of the dark theme:

This makes it very easy to manage your dotfiles in Cosmic. It is much easier than Gnome, with settings stored in the “dconf” database, and KDE, with its configuration files spread around in “~/.config” with names you always have to guess.

Of course, you can customize the shortcuts:

Finally, you have fractional scaling if you want:

To conclude this first look at Cosmic, considering it’s still in the alpha stage, I was very impressed by its responsiveness, cleanness, and beauty.

However, if I had to use it as a daily driver, I’d probably use other applications for tasks like file explorer, terminal, and text editor.

I’ll have another look at this DE soon!

Neovim and Java with LazyVim, part 4: Running programs

This is the fourth part of a few tutorials on Java development with Neovim using the LazyVim setup.

This post assumes you have already read and applied all the steps of the first, second, and third parts.

You need Java installed (possibly 21), while Maven is optional.

I will use this Maven example during the tutorial: https://github.com/LorenzoBettini/maven-bank-example, part of my TDD book.

The final result of this series of tutorials can be found here: https://github.com/LorenzoBettini/lazyvim-java. The “main” branch always points to the latest blog post.

The end of this part is still the branch “fourth-blog-post”.

Currently, we cannot run/debug anything, i.e., not even tests. We need the “nvim-dap” (debugger adapter), which is optional in the LazyVim Java extra (see the documentation, https://www.lazyvim.org/extras/lang/java). If the “nvim-dap” is installed, the LazyVim Java extra automatically configures the corresponding mechanisms for Java. Instead of installing the single plugin, we use another extra: https://www.lazyvim.org/extras/dap/core, which also installs other dap-related goodies, including the UI. We install the extra in one of the documented ways. As done before, I’m using the “:LazyExtras” UI, searching for “dap.core” and installing it. Of course, then we need to restart Neovim.

When you enable this extra, Mason must install additional packages: “java-test” and “java-debugger-adapter”. They are installed automatically (but you have to wait for their installation the first time you start Neovim; as usual, you can check the installation status using the Mason UI, “:Mason”).

Running

These plugins are configured so that the Java LSP can detect Java files with the “main” method. Let’s open such a file (in this example, “Main.java”). To start the application (in debug mode, though in this first run, we haven’t set any breakpoint), the command to search for is “Run/Continue” (not “Run with args”). In fact, “continue” is meant to continue a program under debugging that has stopped due to a breakpoint. Still, it is ALSO meant to start a program if there’s no program under debugging (that’s the documented behavior of DAP). Such commands can be accessed as submenus with “<leader> d” (“d” is for “debug”):

Let’s start this program with “c”.

In the dialog that appears, we select the “Launch” configuration (remember that you can type to fuzzy select):

This example contains a single Java file with a “main” method. If, in your program, you have several Java files with the “main” method, the LSP will detect them all and, upon launching, will show a picker to select the one you want to run.

The program doesn’t do anything interesting besides creating an object, calling a few methods, and logging something on the console. It terminates quickly, so you might see a few additional windows (the UI changes) for a second and then return to the source code. The UI that quickly appeared and disappeared is the “Dap UI”. As shown in the menus above, you can manually toggle it back with “<leader> d u” (as usual, I change the color scheme so that some parts of the UI are more evident):

For the moment, since we did not do any debugging, the only interesting window is the one at the bottom-right, showing the console with the output of the program we have just run.

Running with arguments

Let’s use “Run with Args,” which allows us to pass command line arguments to the Java application.

This application does not do anything with the passed arguments. Let’s change the “main” to print the arguments on the console. For example, adding this line at the beginning:

Select “<leader> d a”, and specify a few arguments:

We’ll see “[first, second, third]” in the console.

Custom launch configurations

Besides the automatically detected Java files with a “main” method, the LSP is configured to support VSCode launch configurations, which, by default, are searched for in the file at the root of the project “.vscode/launch.json”. The options for such files are similar to the ones found here: https://code.visualstudio.com/docs/java/java-debugging#_configuration-options, though the accepted JSON is not strictly the same, and some options might be different. The specific format accepted by Dap is documented in the Dap documentation (e.g., online at https://github.com/mfussenegger/nvim-dap/blob/master/doc/dap.txt or using the “:help dap-api”).

TIP: it might be a good moment to install the LazyVim JSON extra, as we have already seen before.

If you create in the root of the Java project the file “.vscode/launch.json”, i.e., “:e .vscode/launch.json”, the file is created with some initial contents:

For this example, I’m creating two additional launch configurations for passing some fixed arguments to the main file and another one that prompts the command line to pass:

Note that since these launch configurations do not specify the Java class with the main (see the corresponding option if you want to do that), they work correctly only when your buffer contains a Java file with “main”.

Let’s open the “Main.java” file and try to run the program with “<leader> d c”: we get this selection dialog to choose the configuration (where the first two are as before, and the other ones are taken from the “launch.json” above):

If you select the configuration with the prompt, you get another pop-up dialog where you can insert the command line arguments. The dialog is pre-filled with the default value specified above, “foobar”:

That’s all for this post.

In the next post, we’ll learn how to debug a Java program from Neovim.