Some applications do not have a desktop file at all. How can I create an initiator on unitylauncher? Some applications have already created desktop files after installation, but do not create icons on launcher after startup. They cannot be the same as general applications (such as googlechrome, right-click the launcher icon and select "lock to starter" to create the starter. What should I do? In fact, this solution is very easy. Case 1 Implementation
Some applications do not haveDesktopFile, howUnity launcherCreate a starter on?
Some applications have been created after installation.DesktopFile, but it will notLauncherAn icon cannot be created on an application (for exampleGoogle chrome) InLauncherRight-click the icon and select "lock to starter" to create the starter. What should I do?
In fact, this solution is very easy.
Scenario 1
Implementation goal: I hopeUnity launcherCreate a starter and click it to startGnome-terminalProgram andGnome-terminalExecute commandsGlxgears.
Solution:
- Execute CommandVi ~ /Glxgears. desktopCreateDesktopFile:
| 12345 |
[Desktop Entry] Exec=glxgears Type=Application Terminal=trueName=glxgears |
- Run the following command to grantDesktopFile executable permissions
| 1 |
chmod u+x ~/glxgears.desktop |
- Set~ /Glxgears. desktopFile fromNautilusDrag the File ManagerUnity launcherUpper
Case 2
Goals:OsdlyricsAfter startup, only icons in the top panel are displayedUnity launcherNo, I wantUnity launcherCreate a starter.
Solution:
- Run the following command to findDesktopFile, usually in/Usr/share/applications/Or~ /. Local/share/applications/
| 1 |
dpkg -L osdlyrics|grep desktop |
- SetOsdlyrics. desktopFile fromNautilusDrag the File ManagerUnity launcherUpper
Summary
- The format is correct.DesktopFile
- IfDesktopFiles placed in the Division/Usr/share/applications/Other than any other directory, You need to grant the executable permission
- SetDesktopFile fromNautilusDragUnity launcherAbove