Playing with DBus and KDE applications (part 3)

In a previous article I have shown how to handle the D-Bus resources provided in general and in particular by the Konsole and Yakuake D-Bus services, and take advantage of them in a Bash script. This time we will explore more services that provide useful features to embed in our Bash scripts.

Playing with DBus and KDE applications (Part 2)

In a previous article I introduced the DBus technology and provided some examples built around the Klipper service to integrate the clipboard area within our scripts.

Playing with D-Bus and KDE applications (Part 1)

Speaking about the several ways that a Linux system offers to users to create custom automation, there is a software technology that hides under the hoods of modern desktop environments, D-Bus. To make parallelism, in the same way we use piping | the output from a shell command to the input of another, we might altogether find interesting to get some info from an application running on our DE, no matter if it is a GUI application or an application running in the background, and use it in our scripts.

Add an application to the KDE system menu

Whether you are compiling an application yourself, or you are just using a binary tarball archive, having a method to notify the Desktop Environment about the installed software to have a shortcut in the system menu or just register it to handle a certain MIME type, it is for sure a comfortable adding. If that method is also widely adopted among several, if not the major part, of Desktop Environment available, then it becomes a must!

Populate the KDE service menu

Often we rely on CLI applications or small scripts to elaborate files and most of the time we would like to have quick access to them while browsing our filesystem with a file manager like Dolphin. Luckily, an highly configurable environment like KDE, overcomes this issue allowing every user to populate the contextual menu.