Fix sublime text 2 to the Ubuntu starter

Source: Internet
Author: User

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/applicationsIn 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/applicationsFolder, you can find the software under the corresponding category through the software management of ubuntu. Save the above file, suchsublime-text.desktopAnd 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.