I installed a Sublime Text 2 on ubuntu, and wanted to create a shortcut for it to the desktop to find it could not work, or else there would be no icon, which is very ugly
As a result, I suddenly remembered that when I deleted files, I often saw files like xxx. desktop...
# Open the terminal first
| The code is as follows: |
Copy code |
|
Ctrl + alt + t
Cd desktop
Touch Sublime_Text_2.desktop
Vi Sublime_Text_2.desktop
# Write the following code
[Desktop Entry]
Encoding = UTF-8
Name = Sublime Text
Comment = The Smarter Way to Code
Exec =/home/zzs/ubuntu_soft/Sublime Text 2/sublime_text
Icon =/home/zzs/ubuntu_soft/Sublime Text 2/Icon/32x32/sublime_text.png
Categories = Application; Development; IDE
Version = 1.0
Type = Application
Terminal = 0
# Save and exit
Shift zz |
# Give an execution permission
Chmod + Sublime_Text_2.desktop
# Go back to the desktop and check if there is already an icon. Click it to use it. You can also drag it to other places (including unity)
Note: zzs/ubuntu_soft/is the directory where my files are stored. Modify it as appropriate.