Black Lives Matter. Support the Equal Justice Initiative and read our statement here.

Electron Documentation

Want to check our beta docs site? We'd love your feedback.

Custom Linux Desktop Launcher Actions


On many Linux environments, you can add custom entries to the system launcher by modifying the .desktop file. For Canonical's Unity documentation, see Adding Shortcuts to a Launcher. For details on a more generic implementation, see the Specification.


NOTE: The screenshot above is an example of launcher shortcuts in Audacious audio player

To create a shortcut, you need to provide Name and Exec properties for the entry you want to add to the shortcut menu. Unity will execute the command defined in the Exec field after the user clicked the shortcut menu item. An example of the .desktop file may look as follows:


[Desktop Action PlayPause]
Exec=audacious -t

[Desktop Action Next]
Exec=audacious -f

[Desktop Action Previous]
Exec=audacious -r

The preferred way for Unity to instruct your application on what to do is using parameters. You can find them in your application in the global variable process.argv.

Keyboard Shortcuts

Key Action
/ Focus the search bar
Esc Focus the search bar and cleans it
Select the next search result
Select the previous search result
Enter Open the selected search result
cmdEnter Ctrl+Enter Open the selected search result in a new tab