xdg-desktop-menu
Install or uninstall desktop menu entries
TLDR
Install an application to the desktop menu system
Install an application to the desktop menu system with the vendor prefix check disabled
Uninstall an application from the desktop menu system
Force an update of the desktop menu system
SYNOPSIS
xdg-desktop-menu {install | uninstall | forceupdate | validate} [options]
PARAMETERS
install <.desktop file>
Install the specified .desktop file into the system's application menu. The path must be absolute, and the .desktop file must be valid.
uninstall <.desktop file>
Uninstall the specified .desktop file from the system's application menu. The argument is the base name of the .desktop file (e.g., 'myapp.desktop').
forceupdate
Force an update of the desktop menu cache. This is useful after manually modifying menu files.
validate <.desktop file>
Validate the specified .desktop file for syntax errors and conformance to the Desktop Entry Specification. The full path to the file must be provided.
--mode {user | system}
Specifies the installation mode. 'user' installs for the current user only, while 'system' installs system-wide (requires root privileges).
DESCRIPTION
The xdg-desktop-menu command is part of the X Desktop Group (XDG) utilities.
It provides tools for installing, uninstalling, updating, and validating desktop menu entries in a freedesktop.org-compliant environment. Specifically, it aids in integrating applications into the desktop environment's application menu. This ensures that applications are easily discoverable and accessible to users.
The command offers subcommands for different tasks, like installing a new desktop menu entry file (`install`), uninstalling an existing one (`uninstall`), forcing an update of the menus (`forceupdate`), and checking a desktop file for syntax errors and validity (`validate`).
The tool typically updates the desktop's menu cache to reflect the changes. The menus will be refreshed to reflect any changes made. This tool helps conform application integration with XDG standards.
CAVEATS
The 'install' and 'uninstall' subcommands may require root privileges when operating in 'system' mode.
The behavior of the commands can be influenced by environment variables related to XDG base directories.
DESKTOP ENTRY SPECIFICATION
The xdg-desktop-menu command relies heavily on the Desktop Entry Specification, which defines the format and structure of .desktop files. These files contain metadata about an application, such as its name, description, icon, and command to execute.
XDG BASE DIRECTORY SPECIFICATION
The command uses the XDG Base Directory Specification to determine the locations where desktop files and menu configuration files are stored. This allows for consistent handling of application menus across different systems.
HISTORY
The xdg-desktop-menu command is part of the XDG utilities, a collection of tools developed to standardize desktop integration across different Linux distributions and desktop environments. It was created to provide a consistent way to manage application menu entries, regardless of the underlying desktop environment (GNOME, KDE, XFCE, etc.). The freedesktop.org project defines the specifications that this tool adheres to, ensuring interoperability.
SEE ALSO
desktop-file-validate(1), xdg-open(1), xdg-settings(1)