DESKTOP-FILE-INSTALL(1)
π DESKTOP-FILE-INSTALL(1) π
okay bestie, welcome to the General Commands Manual, but make it cute π
β¨ NAME β¨
desktop-file-install, desktop-file-edit β the installation and edition of desktop files, aka the girlies that handle your .desktop files for you π«Ά
πΈ SYNOPSIS πΈ
desktop-file-install [--dir=DIR] [-m MODE|--mode=MODE] [--vendor=VENDOR]
[--delete-original] [--rebuild-mime-info-cache] [EDITOPTION]... FILE...
desktop-file-edit [EDITOPTION]... FILE
π¦ DESCRIPTION π¦
so desktop-file-install is a tool that installs desktop files and optionally edits them, and desktop-file-edit is a tool that just edits a desktop file. They're mostly useful for developers and packagers, iykyk π
there are various options available to edit the desktop files. The edit options can be specified more than once, and they get processed in the same order as the options you passed to the program. no cap, order matters.
desktop-file-install and desktop-file-edit will always try to validate the resulting desktop file. A failure to validate might lead to the abortion of the installation of the desktop files π (yes, it just gives up on the install).
The list of registered categories and desktop environments is defined in the Menu specification: http://freedesktop.org/wiki/Specifications/menu-spec β go read it, it's giving reference material β
π OPTIONS π
The following options are supported:
--dir=DIRβ Install desktop files to theDIRdirectory. that's it, that's the vibe π-m,--mode=MODEβ Set the permissions of the destination files toMODE. permission glow-up β¨--vendor=VENDORβ Add a vendor prefix to the desktop files. If a file already has this prefix, nothing happens; else, the file will be namedVENDOR-FILE. For example: ifVENDORisfreedesktop.organdFILEisspecification.desktop, the result file will befreedesktop.org-specification.desktop. it's giving rebranding, periodt π--delete-originalβ Delete the source desktop files, leaving only the target files. Effectively "renames" the desktop files. lowkey a glow-up, highkey a delete π₯--rebuild-mime-info-cacheβ Rebuild the MIME types application database after installing the desktop files. Seeupdate-desktop-database(1)for information about this database. fresh cache, fresh me π§
π EDIT OPTIONS π
The following edit options are supported:
--set-key=KEYβ Set theKEYkey to the value passed to the next--set-valueoption. A matching--set-valueoption is mandatory. they're a package deal, bestie π«Ά--set-value=VALUEβ Set the key specified with the previous--set-keyoption toVALUE. A matching--set-keyoption is mandatory. same deal, other direction π--set-name=NAMEβ Set the name (keyName) toNAME. If a name was already set, it will be overridden. Localizations of the old name will be removed. out with the old, in with the new π--copy-name-to-generic-nameβ Copy the value of theNamekey to theGenericNamekey. Note that a desktop file requires aNamekey to be valid, so this option will always have an effect. it literally always eats π--set-generic-name=GENERIC-NAMEβ Set the generic name (keyGenericName) toGENERIC-NAME. If a generic name was already set, it will be overridden. Localizations of the old generic name will be removed. β¨--copy-generic-name-to-nameβ Copy the value of theGenericNamekey to theNamekey, if theGenericNamekey is present. conditional queen π--set-comment=COMMENTβ Set the comment (keyComment) toCOMMENT. If a comment was already set, it will be overridden. Localizations of the old comment will be removed. π--set-icon=ICONβ Set the icon (keyIcon) toICON. If an icon was already set, it will be overridden. Localizations of the old icon will be removed. new icon just dropped π--add-category=CATEGORYβ AddCATEGORYto the list of categories (keyCategories). IfCATEGORYwas already present in the list, this operation is a no-op. A non-registered category should be prefixed withX-. π·οΈ--remove-category=CATEGORYβ RemoveCATEGORYfrom the list of categories (keyCategories). IfCATEGORYwas not present in the list, this operation is a no-op. π«--add-mime-type=MIME-TYPEβ AddMIME-TYPEto the list of MIME types (keyMimeType). IfMIME-TYPEwas already present in the list, this operation is a no-op. π--remove-mime-type=MIME-TYPEβ RemoveMIME-TYPEfrom the list of MIME types (keyMimeType). IfMIME-TYPEwas not present in the list, this operation is a no-op. π--add-only-show-in=ENVIRONMENTβ AddENVIRONMENTto the list of desktop environments where the desktop files should be displayed (keyOnlyShowIn). IfENVIRONMENTwas already present in the list, this operation is a no-op. A non-registered desktop environment should be prefixed withX-. Note that an emptyOnlyShowInkey in a desktop file means that the desktop file will be displayed in all environments. she's everywhere, she's that girl πΈ--remove-only-show-in=ENVIRONMENTβ RemoveENVIRONMENTfrom the list of desktop environments where the desktop files should be displayed (keyOnlyShowIn). IfENVIRONMENTwas not present in the list, this operation is a no-op. π--add-not-show-in=ENVIRONMENTβ AddENVIRONMENTto the list of desktop environments where the desktop files should not be displayed (keyNotShowIn). IfENVIRONMENTwas already present in the list, this operation is a no-op. A non-registered desktop environment should be prefixed withX-. Note that an emptyNotShowInkey in a desktop file means that the desktop file will be displayed in all environments. π¦--remove-not-show-in=ENVIRONMENTβ RemoveENVIRONMENTfrom the list of desktop environments where the desktop files should not be displayed (keyNotShowIn). IfENVIRONMENTwas not present in the list, this operation is a no-op. β¨--remove-key=KEYβ Remove theKEYkey from the desktop files, if present. gone, reduced to atoms π
π ENVIRONMENT π
Some environment variables change the behavior of desktop-file-install:
π DESKTOP_FILE_VENDOR
This variable can be used as an alternative to the --vendor option. If the --vendor option is used, this environment variable will be ignored. she does not compete with the flag, the flag wins π
π DESKTOP_FILE_INSTALL_DIR
This variable can be used as an alternative to the --dir option. If the --dir option is used, this environment variable will be ignored. same energy π«Ά
π RPM_BUILD_ROOT
This variable is set when building RPM packages. If the --dir option and the DESKTOP_FILE_INSTALL_DIR environment variable are not used, it will automatically be prepended to the default install directory to install the desktop files appropriately when building packages. she shows up uninvited and honestly? iconic π
π BUGS π
If you find bugs in the desktop-file-install program, please report these on https://bugs.freedesktop.org. we do NOT gatekeep bug reports, fr fr π
π₯ SEE ALSO π₯
desktop-file-validate(1) update-desktop-database(1)
ngl if you made it here you're basically a desktop-file whisperer now. go forth and install responsibly π
big kisses from the FREEDESKTOP.ORG girlies π this page is DESKTOP-FILE-INSTALL(1), and yeah, that's the whole manual, bestie β periodt β¨
π¦ where this page comes from
- alpine 3.24: desktop-file-utils-doc 0.28-r0 Β· GPL-2.0-or-later
- arch rolling: desktop-file-utils 0.28-1 Β· GPL-2.0-or-later
- centos-stream 10: desktop-file-utils 0.26-15.el10 Β· GPL-2.0-or-later
- centos-stream 9: desktop-file-utils 0.26-6.el9 Β· GPLv2+
- debian bookworm: desktop-file-utils 0.26-1 Β· GPL-2.0-or-later
- debian trixie: desktop-file-utils 0.28-1 Β· GPL-2.0-or-later
- fedora 43: desktop-file-utils 0.28-2.fc43 Β· GPL-2.0-or-later
- fedora 44: desktop-file-utils 0.28-5.fc44 Β· GPL-2.0-or-later
- nixos 26.05: desktop-file-utils 0.28
- nixpkgs unstable: desktop-file-utils 0.28
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 Β· GPL-2.0-or-later
- ubuntu jammy: desktop-file-utils 0.26-1ubuntu3 Β· GPL-2.0-or-later
- ubuntu noble: desktop-file-utils 0.27-2build1 Β· GPL-2.0-or-later
- ubuntu questing: desktop-file-utils 0.28-1
- ubuntu resolute: desktop-file-utils 0.28-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: desktop-file-utils 0.28-1build1 Β· GPL-2.0-or-later
- (C) 2010 Vincent Untz (vuntz@gnome.org)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms