Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




KDE Menu

How it Works

In KDE 3.2 a common menu format is introduced at

Before KDE 3.2:

  • Directory structure under share/applnk

  • Directory structure represents menu structure

  • Each .desktop file represents a single application

It was difficult to rearrange the structure in KDE 3.2 so the new menu format:

  • Defines structure in a single .menu file

  • Is based on categories

  • is shared between GNOME and KDE

  • Supports applnk style menus as well

Example from

	        <Filename>Acrobat Reader.desktop</Filename>

Menu entry with 3 applications:

  • /usr/share/applications/Acrobat Reader.desktop

  • /opt/kde3/share/applications/kde/kpresenter.desktop

  • /opt/kde3/share/applications/kde/kword.desktop

Stored Where?

.menu files describing the menu structure. The files are stored in $ KDEDIR /etc/xdg/menus and /etc/xdg/menus. These store the system-wide menu structure and are controlled by $ XDG_CONFIG_DIRS . $ HOME /.config/menus stores user-specific changes to the menu structure and is controlled by $ XDG_CONFIG_HOME . For more information, see

.desktop files describe the applications and are stored in: $ KDEDIR /share/applications, /usr/share/applications, /usr/local/share/applications. These are the system-wide application .desktop files which are controlled by $ XDG_DATA_DIRS .

$ HOME /.local/applications contains user-specific .desktop files and user-specific changes. It is controlled by $ XDG_DATA_HOME . For more information, see

.directory files describing the sub-menus are stored in: $ KDEDIR /share/desktop-directories, /usr/share/desktop-directories, /usr/local/share/desktop-directories. These are the system-wide menu .directory files, controlled by $ XDG_DATA_DIRS . The user-specific changes are stored in $ HOME /.local/desktop-directories. These are controlled by $ XDG_DATA_HOME . For more information, see

Example from


Art is the internal name for this menu. defines the name and icon for this menu, and the menu includes all applications that have X-SuSE-Art listed as a category, e.g.:

Categories=Qt;KDE;Education;X-SuSE-Art defines the name and icon for this menu:

[Desktop Entry]
Name=Art and Culture

Common Pitfalls

Applications not in the menu do not exist with regard to other applications or file associations: If you remove an application from the menu, KDE assumes you don't want to use it.

When applications are unwanted in the menu, either place them in .hidden menu or a dedicated menu with


in the .directory file

Essential Menus

$ KDEDIR /etc/xdg/menus/applications-merged/ contains which includes some essential menus that are normally not shown in the KDE menu itself:

  • Control Center has a hidden Settings menu whose contents are defined by and whose icon and name are defined by

  • Info Center has a hidden Information menu whose contents are defined by and whose icon and name are defined by

  • Screensavers contains a hidden System/Screensavers menu, whose contents are defined by and whose icon and name are defined by $ KDEDIR /share/desktop-directories/ contains:


Old-Style Menus

KDE continues to support old-style menus that are defined by the directory structures in $ KDEDIR /share/applnk (system wide) and $ HOME /.kde/share/applnk (user specific). This is observed unless the .desktop file has a Categories= line. In that case the categories determine the location in the menu.


KSycoca caches menu structure and information about all available applications. You can rebuild the database with kbuildsycoca . The database which is built lives in /var/tmp/kdecache-${ USER }/ksycoca. It is automatically updated by KDED, checked during KDE login, and KDED watches for changes while logged in.

To disable watching for changes (since it may hurt over NFS) add the following to kdedrc:


To force regeneration, run touch $ KDEDIR /share/services/update_ksycoca .


kmenuedit is aimed at a single user setup. Changes to menu structure are saved to ~/.config/menus/, changes to applications are saved in ~/.local/share/applications/ and changes to sub-menus (icon, name) are saved in ~/.local/share/desktop-directories/. The KIOSK Admin Tool uses kmenuedit and copies the above changes to profile- or system-wide locations.

  Published under the terms of the GNU General Public License Design by Interspire