gendesk(1)

πŸ“¦ version 1.0.15, in arch rolling

πŸ’… gendesk β€” the gendesk(1) glow-up

okay so bestie, listen. gendesk is that girl who makes .desktop files for you, straight from your command-line arguments (or from a PKGBUILD file, iykyk). she's lowkey iconic and she does NOT miss. ✨


✨ SYNOPSIS ✨

gendesk [flags or PKGBUILD file]

like, that's it. flags or a PKGBUILD. pick your fighter. πŸŽ€


🌸 DESCRIPTION 🌸

so here's the tea β€” these are the PKGBUILD variables she supports, and yes, every single one gets included in the generated file:

  • _name
  • _genericname
  • _comment
  • _mimetype
  • _exec
  • _categories

gendesk will fr fr try to find the correct icon from the Open Icon Library, and if that doesn't work out she falls back on the default icon. no cap. πŸ¦‹

and the correct application category? she'll guess it if you didn't provide one. main character energy honestly.

she also reads these environment variables, bestie:

  • pkgname
  • pkgdesc

🧚 EXAMPLES 🧚

gendesk

gendesk

exits with error code 1 if ../PKGBUILD isn't found and pkgname isn't given and $pkgname isn't defined. she'll try to use both $pkgname and $pkgdesc. 😭

gendesk PKGBUILD

gendesk PKGBUILD

looks for a PKGBUILD in the current directory and generates a .desktop file. slay.

gendesk --pkgname test --pkgdesc test

gendesk --pkgname test --pkgdesc test

generates a .desktop file for the name "test" with the description "test". simple, clean, ate. πŸ’…

gendesk /home/user/archpackages/mypackage/PKGBUILD

gendesk /home/user/archpackages/mypackage/PKGBUILD

generates a .desktop file from the given PKGBUILD. periodt.

⚠️ a package name must be given β€” either by specifying a PKGBUILD file, using --pkgname, or by defining a $pkgname environment variable. no name, no file, that's the rule 🫢
πŸ’‘ also note: a "-bin", "-git", "-hg" or "-svn" suffix in a package name will be ignored, if present. she sees it, she just doesn't care. πŸ’€

πŸ”₯ OPTIONS πŸ”₯

  • --version β€” displays the current version information
  • -h or --help β€” displays brief usage information
  • -n β€” don't attempt to download an icon, if missing
  • --nocolor β€” don't use colored text
  • -q β€” quiet; don't output text
  • -f β€” force; overwrite files if needed
  • -wm β€” generate a small desktop file for launching a window manager instead
  • --pkgname β€” use this package name for the application (ie. emacs)
  • --pkgdesc β€” use this package description for describing the application and try to find a suitable category
  • --name β€” use this name for the desktop shortcut (ie. Emacs)
  • --genericname β€” use this generic name for the desktop shortcut (ie. Text Editor)
  • --comment β€” use this comment for the desktop shortcut (ie. Use this to edit files)
  • --exec β€” specify an alternative executable, (ie. /usr/bin/emacs)
  • --path β€” specify a starting path for the program, (ie. /usr/share/kotlin)
  • --icon β€” specify an icon filename (defaults to the pkgname)
  • --categories β€” specify categories (ie. Utility;TextEditor;)
  • --terminal β€” specify if the application should be run in a terminal (default is false)
  • --mimetypes β€” specify mime-types
  • --startupnotify β€” specify if a desktop notification should occur when the application starts (default is false)
  • --custom β€” specify an extra line (or several lines) to append at the end
  • -o or --output β€” specify the output .desktop filename. For split PKGBUILDs, pass a comma-separated list with one filename per package; mismatched counts are an error. Defaults to PKGNAME.desktop.
πŸ’– quick note on -o / --output: the comma-separated list is one filename per package, and if the counts don't match up? that's an error, bestie. she's not doing that math for you.

πŸ‘‘ WHY πŸ‘‘

her whole goal is to make it easy for package maintainers to add menu entries for the applications they're trying to package β€” without including anything that hasn't been supplied by upstream in the package itself. respectful, clean, does what it says. 🌈


πŸ’€ BUGS πŸ’€

only unknown bugs so far. πŸ’€ bugs can be reported at https://github.com/xyproto/gendesk/issues.


⭐ VERSION ⭐

1.0.15


πŸŽ€ AUTHOR πŸŽ€

gendesk was written by Alexander F. Rødseth <xyproto@archlinux.org> 🫢


and that's the whole page, bestie β€” gendesk(1), dated 29 May 2026, page gendesk(1). go forth and generate some .desktop files, mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from