A desktop command-line widget
Command Line – KRunner
KRunner combines the command line with graphical navigation, offering speed and comfort for Plasma users.
For most users, the command line and the desktop environment are distinct. One notable exception is KRunner [1], which is installed by default with KDE's Plasma. Interacting with other default Plasma applications, as well as the system hardware, KRunner is basically a convenient widget for entering a single command, but it is also an application launcher and general navigation tool, as well as a calculator, a measurement and currency converter, music player controller, and even a spell checker – all controllable from the keyboard. In fact, should you choose, you can control the desktop entirely from KRunner, making it one of the most versatile applications in all of Plasma, despite suffering from few limitations.
The KRunner Interface
KRunner uses graphical navigation in the service of the command line (Figure 1). You can run it from the menu, but starting it with one of the KRunner keyboard shortcuts (Alt+F2 or Alt+Space) is more efficient. The KRunner window has an entry field at the top, with a list of possible text completions beneath it. You select these items with the arrow keys or mouse. To the left of the entry field is a button that opens the KRunner System Settings (Figure 1). From the settings, you can choose whether KRunner opens at the top center or top middle of the screen, and whether its text completions are determined partly from previous choices. Below is a list of 26 plugins, some of which can be configured to change the order in which results are displayed, or similar features. If you are short on memory or have no use for a plugin, you can disable it (Figure 2).
Entering Commands
Most commands that can be entered in a terminal can be entered in KRunner, using the same syntax as in the Bash shell. At the top of the drop-down list, you can select the option to run the command. In the same way, you can install software from KRunner. Type in your best guess at an application's name, and KRunner will offer suggestions. Click a suggestion, and the KDE Plasma Software Center opens.
KRunner also has its own handful of commands to call different functions. Should you want to repeat a command, select it from the drop-down list at the end of the entry field. One of the most useful KRunner commands is kill
, which shuts down any application, including a misbehaving one. Note, though, that KRunner's kill
command is not the same as Bash's. In fact, it is an arbitrary choice of characters that can be changed in System Settings | KRunner | Terminate Applications. You can also choose whether the list of applications that can be killed displays with the least or most CPU useage first or according to typing completion. Similarly, to view a man page, the syntax is Man:/COMMAND
. The man page opens in the KDE man page viewer in Konqueror. Typing #COMMAND
no longer works, although it did in past versions of KRunner.
Opening Resources
One of KRunner's main uses is as an alternative to scanning menus and file managers. Files and directories can be opened by entering their paths. For instance, file:/home/HOME
opens the home directory in Dolphin; a file path opens the file in the appropriate application. Conveniently, if you don't know the path, you can enter just the file name and choose it from the list of possible results.
Web page addresses and bookmarks in your default browser can be opened by typing them in KRunner's entry field. To save time, you can use the Web Search Keywords in System Settings. For example, typing backports
opens Debian Backports, and typing arch
opens the ArchWiki for Arch Linux. If a web page is not among the installed defaults, you can add a keyword.
Similarly, you can open a virtual workspace with Desktop NUMBER
, but if you customize the name, the best KRunner can do is open the Virtual Workspace window in System Settings. Bookmarks in Dolphin can also be opened, including external drives or a contact in KAddressbook in your email reader. The KDE UserBase Wiki suggests that Activities can be started by typing their names, but in practice that feature does not work in recent Plasma releases.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.