Build Your Own Linux Productivity Machine With KDE Service Menus
You’re probably not losing much sleep over your file manager. Chances are you either use the one that came with your Linux distribution, or you’ve settled for an alternative that suits your needs . But are you fully aware of its limits and abilities?
If you’ve never taken the time to tinker with your file manager’s settings, you might be missing out on many time-saving tweaks – from custom keyboard shortcuts and quick-rename actions to editable menus and file preview plugins, all these options can greatly improve your productivity . After all, the point of using a file manager is to organize your digital assets in the most efficient way, which means that you should automate as many tasks as possible.
KDE Service Menus are a perfect example of file manager customization done right. They are simple scripts that add functionality to KDE’s file manager, Dolphin. If you’re using Konqueror, most Service Menus will work with it as well, although some might require minor modifications. The concept of custom scripts in a file manager is not unique to KDE, so if you’re using Nautilus, Thunar , or SpaceFM, you have access to the same feature, just under a different name.
Service Menus can be created and edited in a regular text editor, and once you’ve installed them, you can toggle them in Dolphin’s Preferences dialog under the Services tab. They will appear as new options in the right-click menu.
Don’t worry about cluttering the menu—even if you enable a lot of Service Menus, they won’t be visible all the time. Most Service Menus are filetype-aware, which means they appear only when you right-click on a filetype that they can modify.
Installing Service Menus
Generally speaking, there are two ways to install Service Menus: manually and automatically. Doing it manually means that you will download the Service Menu files (for example, from KDE-Apps.org), unpack them, and copy the contents into appropriate directories.
If you want to install a Service Menu for all users on KDE 4, the directory you need is
/usr/share/kde4/services/ServiceMenus/. Installing it for just one user means you’ll have to copy it into your local KDE directory (
~/.kde/share/kde4/services/ServiceMenus/). This path depends on the distribution, so you can check what it looks like on your system by typing
kde4-config --localprefix into the terminal.
On KDE 5, the paths have been changed, so you’ll have to copy Service Menu files into
/usr/share/kservices5/ServiceMenus/ for single user or all users, respectively.
Automatic installation relies on the Download New Services option that’s implemented in Dolphin’s Preferences > Services dialog. It lets you browse, add and remove Service Menus, and sort them by several criteria.
Service Menus installed in this way will work only for one user. Those you find in the repositories or download as packages will be installed for all users.
Creating Service Menus
If you’re feeling adventurous, you can try your hand at making your own Service Menus. Here are a few basics you should know:
- Service Menus have to be saved as files with the .desktop extension
- A Service Menu file has two main parts: “Desktop Entry” and “Desktop Action”
- The essential parts of “Desktop Entry” are the Type=Service line, where you define the file as a Service Menu, and the MimeType line, where you indicate which file types the Service Menu can modify
- One Service Menu file can contain multiple “Desktop Action” parts. The most important line here is Exec=, which is the path to a command or a Bash script that’s executed when you click on the Service Menu option in Dolphin’s right-click menu
To learn more about creating Service Menus, consult the KDE Techbase. Their helpful tutorial will point you in the right direction.
Now when you understand what Service Menus are and how they work, it’s time to try them out. This selection of KDE Service Menus covers various types of actions that can be added to Dolphin to bring order to your folders and make you feel like the master of file management.
Managing Files and Folders
The purpose of this Service Menu is pretty straightforward: it lets you quickly manage compressed files right in the Dolphin window. It can handle the most popular compressed file formats (ZIP, RAR, TAR…), provided that you first install their command-line utilities.
If you love color-coding your projects and to-do lists, you’ll love Dolphin Folder Color. This Service Menu lets you change the color of folder icons , and it works on the majority of currently available icon themes for KDE. You can also replace generic folder icons with custom ones. The icon settings for each folder are saved in a hidden .directory file, so be careful not to delete it lest you lose all your colors.
Root Actions is the must-have Service Menu for those who want to avoid using the terminal and typing “su(do)”. It’s a collection of handy shortcuts for opening, copying, renaming and removing files that require root permissions. You can also use it to change permissions and ownership of any file.
Infopartitions provides a quick overview of all partitions on your system, shows you which ones are currently mounted, and lets you know how much free space there is on each partition. All this fits into a simple (albeit not very attractive) popup window.
Building a PDF Workshop
When it comes to working with PDF files, Linux has a magic trick called pdftk up its sleeve. In order to use pdfForts in Dolphin, you’ll have to install pdftk. Then you’ll be able to password-protect PDF files, combine and convert them, rotate and extract pages from them, add bookmarks and watermarks to PDFs; all from the comfort of your file manager.
Like pdfForts, this Service Menu also depends on pdftk (and a few other utilities: Ghostscript and poppler-utils). It offers various conversion options: from PDF to DjVu, HTML, plain text and images, as well as options to resize PDF files and prepare them for printing.
Image Editing and Conversion
KIM is an acronym for KDE Image Menu, an image management Service Menu that lets you compress, resize, and rotate your photos. You can apply grayscale and sepia effects, and convert images to GIF, JPG, PNG, and other file formats. It also offers some pretty cool features, like creating an animated GIF, a photo montage, and an HTML photo gallery.
Image Manipulation is similar to KIM, though it has a few unique features. It can resize images into predefined dimensions, auto-correct brightness, and intensify color of your photos. File format conversion is also supported.
If your typical workflow involves converting a lot of images, and you need more than these two Service Menus can offer, consider installing Converter. It supports more than thirty file formats and offers advanced conversion options that you can configure. With its image processsing features, Converter could even compete with some lightweight image editing applications . The most practical feature is batch-processing that works on both files and folders. However, be prepared to install additional software as dependencies without which Converter wouldn’t be as powerful.
Those who work with audio files instead of images can take a look at audiokonverter, a Service Menu that can convert between several popular audio (and video) file formats, including OGG, WMA, MP3, WAV, and FLAC.
It would be easier to list the features that this Service Menu does not have—it’s the ultimate file management toolkit. Apart from basic actions that every user performs on their files and folders, KDE Services packs plenty of extras and perks for your convenience. It can convert video and audio files, mount, burn and create ISO images, perform backups, access network monitoring tools , search and replace text in files, and even update the kernel ! Of course, the list of dependencies is huge, but you already have most of these utilities installed, and if you don’t, they should all be available in the repositories of your distribution.
KDE users often cite Service Menus as one of the reasons why Dolphin is their favorite file manager. Since they’re just simple text files, they don’t add any bloat; on the contrary, they can turn Dolphin into a powerful central point for all your everyday file management needs.
Which KDE Service Menus do you use? Can you recommend some great ones that we should know about? Tell us all about them in the comments.