Saltar al contenido principal

Acciones de Launcher de Escritorio

Descripción general​

En muchos entornos Linux, puede agregar entradas personalizadas al lanzador del sistema modificando el archivo .desktop. For details, see the freedesktop.org Desktop Entry Specification.

Para crear un atajo, necesita proveer las propiedades Name y Exec para la entrada que quieres agregar al atajo del menú. The desktop will execute the command defined in the Exec field after the user clicks the shortcut menu item. Un ejemplo del archivo .desktop puede lucir de la siguiente manera:

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.