デスクトップランチャーアクション
概要
多くの Linux 環境では、.desktop ファイルを変更することでシステムランチャーにカスタムエントリを追加できます。 For details, see the freedesktop.org Desktop Entry Specification.
ショートカットを作成するには、ショートカットメニューに追加したいエントリごとに Name と Exec プロパティを指定する必要があります。 The desktop will execute the command defined in the Exec field after the user clicks the shortcut menu item. .desktop ファイルの例を以下に示します。
Actions=PlayPause;Next;Previous
[Desktop Action PlayPause]
Name=Play-Pause
Exec=audacious -t
[Desktop Action Next]
Name=Next
Exec=audacious -f
[Desktop Action Previous]
Name=Previous
Exec=audacious -r
The preferred way for the desktop to instruct your application on what to do is using parameters. You can find them in your application in the global variable process.argv.