Sublime text 2 is the best code editor I have ever used. It provides great UI and plug-in management, and is now available for free trial for an indefinite period of time. Ubuntu is also my favorite Linux operating system. Because sublime text does not need to be installed, some basic configurations for running Ubuntu Desktop are missing, for example, it cannot be added to the initiator on the desktop side.
There is no shortcut in Ubuntu, but the software installed in the Software Center has icons and can be added to the starter, because they have a desktop configuration file. These configuration files are/usr/share/applications
In this case, you can open a configuration file and write a sublime text desktop file based on Huludao:
#!/usr/bin/env xdg-open [Desktop Entry] Name=Sublime Text 2 Comment=Sublime Text 2 Exec=/home/serho/tools/"Sublime Text 2"/sublime_text Icon=/home/serho/tools/Sublime Text 2/Icon/48x48/sublime_text.png Terminal=false Type=Application Categories=Application;Development; StartupNotify=true
There are only a few changes:
- Name: the name.
- Comment: equivalent to comments
- Exec: Path of the executable file
- Icon: icon path. By default, sublime text contains icons of various models.
The other settings mainly include categories. If you put this configuration file in/usr/share/applications
Folder, you can find the software under the corresponding category through the software management of ubuntu. Save the above file, suchsublime-text.desktop
And give the executable permission, and double-click it to open sublime text, and the icons on the starter can also be fixed.
Of course, the above is just an example. Any similar software can add shortcuts like this. For the configuration parameters and implementation methods of the Linux Desktop entry file, see this article from IBM.
Source: http://serholiu.com/sublime-text-2-ubuntu