Linux Unity launcher shortcuts

Unity launchers are actually files stored in your computer with a .desktop extension. In order to add the launcher shortcut menu on a Linux machine, you need to create a proper .desktop file. The .desktop file contains configurations that describe how an application is launched and which type of application it can handle. However, unlike other platforms for Linux, we can't add any shortcut from the code itself. You can read about this configuration page on Linux main pages and for Ubuntu, you can visit https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles#Adding_shortcuts_to_a_launcher.

Here is a sample .desktop file that adds three shortcut menus into the Unity launcher:

[Desktop Entry]
Version=1.0
Type=Application
Name=ElectronApplication
GenericName=Electron Application
Comment=A sample comment
Icon=icon
Categories=AudioVideo;Audio;Player;GTK;

Exec=electronapp %U

TryExec=audacious

Terminal=false

MimeType=audio/mp3
Actions=ActionOne;ActionTwo;ActionThree

[Desktop Action ActionOne]
Name=Action-One
Exec=electronapp -t
OnlyShowIn=Unity;

[Desktop Action ActionTwo]
Name=ActionTwo
Exec=electronapp -f
OnlyShowIn=Unity;

[Desktop Action ActionThree]
Name=ActionThree
Exec=electronapp -r
OnlyShowIn=Unity;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.240.75