← 返回命令列表

Linux command

gendesk 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Generate a desktop file from a PKGBUILD

gendesk

Generate a desktop file with package name

gendesk -n --pkgname=[appname]

Generate with a custom display name

gendesk --name="[App Name]" --pkgname=[appname]

Specify the exec command and categories

gendesk --pkgname=[app] --exec="[/usr/bin/app %U]" --categories="[Development;IDE]"

Generate a terminal application entry

gendesk --pkgname=[app] --terminal

说明

gendesk generates .desktop files for Linux applications following the freedesktop.org Desktop Entry specification. It can read values from a PKGBUILD file in the current directory or accept them as command-line flags. The tool simplifies creating desktop files during package building by generating entries with proper formatting, handling icon references, categories, MIME types, and exec paths. Supported PKGBUILD variables include _name, _genericname, _comment, _mimetype, _exec, and _categories. gendesk is commonly used in Arch Linux package building (PKGBUILDs).

参数

--pkgname _NAME_
Package name (used for filename and defaults).
--name _NAME_
Application display name.
--exec _CMD_
Command to execute (supports field codes like %U, %F).
--categories _LIST_
Semicolon-separated application categories (e.g., Development;IDE).
--comment _TEXT_
Short description comment.
--genericname _NAME_
Generic name for the application (e.g., "Text Editor").
--mimetype _LIST_
Semicolon-separated MIME types the application can open.
--terminal
Set Terminal=true in the desktop file.
--path _DIR_
Working directory for the application.
-n
Don't include Name field if same as pkgname.
--help
Display help information.

FAQ

What is the gendesk command used for?

gendesk generates .desktop files for Linux applications following the freedesktop.org Desktop Entry specification. It can read values from a PKGBUILD file in the current directory or accept them as command-line flags. The tool simplifies creating desktop files during package building by generating entries with proper formatting, handling icon references, categories, MIME types, and exec paths. Supported PKGBUILD variables include _name, _genericname, _comment, _mimetype, _exec, and _categories. gendesk is commonly used in Arch Linux package building (PKGBUILDs).

How do I run a basic gendesk example?

Run `gendesk` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --pkgname _NAME_ do in gendesk?

Package name (used for filename and defaults).