← 返回命令列表

Linux command

gtk-launch 命令

文本

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

常用示例

Launch

gtk-launch [Application_name]

Example

gtk-launch -h

说明

gtk-launch launches applications using their .desktop files from standard XDG locations (/usr/share/applications, ~/.local/share/applications, etc.). This is the programmatic equivalent of clicking an application icon. The application parameter is the desktop file ID (filename without .desktop extension). For example, gtk-launch firefox launches the application defined in firefox.desktop. This is useful for launching applications from scripts in a desktop-agnostic way, respecting the application's StartupNotify, exec parameters, and other desktop file settings.

参数

-h, --help
Display help message

FAQ

What is the gtk-launch command used for?

gtk-launch launches applications using their .desktop files from standard XDG locations (/usr/share/applications, ~/.local/share/applications, etc.). This is the programmatic equivalent of clicking an application icon. The application parameter is the desktop file ID (filename without .desktop extension). For example, gtk-launch firefox launches the application defined in firefox.desktop. This is useful for launching applications from scripts in a desktop-agnostic way, respecting the application's StartupNotify, exec parameters, and other desktop file settings.

How do I run a basic gtk-launch example?

Run `gtk-launch [Application_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -h, --help do in gtk-launch?

Display help message