A desktop command-line widget
Command Line – KRunner
![© Lead Image © fernandocastoldi, 123RF.com © Lead Image © fernandocastoldi, 123RF.com](/var/linux_magazin/storage/images/issues/2023/267/mightier-than-the-sword/123rf_98366519_sword_fernandocastoldi_resized.png/815975-1-eng-US/123rf_98366519_Sword_fernandocastoldi_resized.png_medium.png)
© Lead Image © fernandocastoldi, 123RF.com
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).
![](/var/linux_magazin/storage/images/issues/2023/267/mightier-than-the-sword/figure-1/815978-1-eng-US/Figure-1_large.png)
![](/var/linux_magazin/storage/images/issues/2023/267/mightier-than-the-sword/figure-2/815981-1-eng-US/Figure-2_large.png)
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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.