Is there an app icon on your KDE Linux desktop that doesn’t look right? Are you looking to edit it to make a change? Follow this guide to learn to how edit program shortcuts in KDE Plasma 5.
Method 1: KDE menu editor
If you’re on KDE Plasma 5 and need to edit some program shortcuts, the best way to go about it is to use the built-in KDE menu editor. Here’s how to use the KDE menu app to edit shortcuts on Linux.
Step 1: Minimize all applications to view the Plasma desktop. Additionally, close all open applications, as you’ll be modifying shortcuts on the system.
Step 2: Locate the KDE Plasma 5 app launcher on the panel (it’s on the far left portion of the panel). Once you’ve found the app launcher, right-click on it with the mouse to open up the right-click menu.
Step 3: Look through the app launcher right-click menu for the option “Edit Applications” and select it with the mouse. Selecting “Edit Applications” will launch a program called “KDE Menu Editor” on the screen.
Step 4: In the KDE Menu Editor, look through the different categories on the left-hand side. They are “Development, Education, Games, Graphics, Internet, Multimedia, office, Science & Math, Settings, System, Utilities, Lost & Found, and Help (Help Center).
Click on the down arrow next to one of the categories. From there, find the application shortcut you’d like to edit in the KDE Menu Editor.
Step 5: After selecting an application shortcut in KDE Menu Editor, the app information will show up on the right. Look through the different columns “Name, Description, Comment, Command” and edit what you’d like to change.
Step 6: Once you’ve edited your application shortcut in the KDE Menu Editor, click the “Save” button on the top-left. It will save changes, and apply them instantly!
Method 2: Terminal
Another way to edit program shortcuts on KDE Plasma 5 is through the terminal. The terminal route is an excellent way to go if you want to make a quick edit, and don’t feel like messing with the KDE Menu editor, as it is a sophisticated tool with tons of options.
Editing program shortcuts in KDE Plasma 5 is done by editing individual “desktop” files in the “/usr/share/applications/” directory with a text editor. To edit any program shortcut on your KDE PC, start by opening up a terminal window. You can launch a terminal by pressing Ctrl + Alt + T or Ctrl + Shift + T. Once open, follow the step-by-step instructions below.
Note: we highly recommend editing program shortcuts on KDE in the KDE Menu editor if you are a beginner. This method is for those that have some skill with the terminal on Linux already.
Step 1: Using the CD command, move your terminal window from the home directory (~) to the “applications” directory.
Once in the folder, you can confirm it by running the pwd command.
Step 2: Inside of the “applications” directory, the terminal session must transition from a normal user account to the “root” user. The reason the root user is necessary is that program shortcuts can only be edited as root.
To transition from a traditional user account to the root account, run the sudo -s command.
Step 3: After gaining root access in the terminal window, run the ls command to reveal all of the program shortcut files available in the “applications” directory.
Alternatively, if you need to find the name of a specific program shortcut file, run the ls command alongside the grep command to filter the results.
ls | grep 'searchterm'
Step 4: When you’ve located the exact program shortcut you wish to edit in the terminal window, open it up in the Nano text editor. To do this, use the following command.
nano -w program-shortcut.desktop
Step 5: Using the Nano text editor, edit the program shortcut.
If you are having trouble understanding what to do while editing, check out our tutorial on how to create new desktop shortcuts, it goes over what individual items in the program shortcut files are, which can aid in the editing process.
Step 6: After making changes to the program’s shortcut, it is time to save. To save your edits, press Ctrl + O on the keyboard. Alternatively, the Ctrl + S keyboard shortcut also works.
Step 7: Now that your shortcut is edited, you must close the Nano text editor in the terminal window. To do this, press Ctrl + X on the keyboard.
Step 8: Now that the Nano text editor is closed, take a look at the edits you’ve made to your program shortcut to ensure that the changes indeed saved correctly by running it through the cat command.
Or, for better viewing, attach the more command as a pipe. It will allow you to read the file line-by-line.
cat name-of-program-shortcut.desktop | more