This article mainly introduces how to fix SublimeText2 to the Ubuntu starter. if you need it, refer to the following tag: Ubuntu
Sublime Text 2It is the best code editor I have ever used. the UI and plug-in management are great, and I can try it for free 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 in the/usr/share/applications folder. in this case, you can open a configuration file and write a Sublime Text desktop file based on Huludao:
Copy codeThe code is as follows:
#! /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:
Copy codeThe code is as follows:
• Name: the Name.
• Comment: equivalent to comments
• Exec: Path of the executable file
• Icon: Icon path. by default, Sublime Text contains icons of various types.
The other settings include categories. if you put this configuration file in the/usr/share/applications folder, you can find the software under the corresponding category through Ubuntu software management. Save the above file, such as the sublime-text.desktop, and give executable permissions, and then double-click to open Sublime Text, at the same time the icon on the starter can also be fixed.