Ubunt 14.10 Installation Sublime Text 3, registration code, Chinese Input method

Source: Internet
Author: User
Tags gtk sublime text

1 Downloads Sublime Text 3, url Http://www.sublimetext.com/3

2 Double-click the Deb installation

3 because need to pay, enter the following registration code, the following registration code, from Baidu, pro-test feasible

Sublime Text Build3065License Key Copy any of the following genuine registration code can be-----BEGIN LICENSE-----K- -Single User licenseea7e-9401293a099ec1 c0b5c7c5 33ebf0cf be82fe3beac2164a 4f8ec954 4e87f1e5 7e4e85d6c5605de6 dab003b4 D60CA4D0 77CB15333C47F579 fb3e8476 eb3aa9a7 68c43cd98c60b563 80fe367d 8cad14b3 54fb7a9f4123ffc4 d63312ba 141af702 F6BBA254B094B9C0 FAA4B04C 06CC9AFC fd41267182e3aee0 0f0faaa7 8fa773c9 383a9e18------END LICENSE-----------BEGIN LICENSE-----J2team2User licenseea7e-94028245cb0d8f091000377d1056eb a1ddc1a239c102c5 df8d0bf0 fc3b1a94 4f2892b40aee61ba 65758d3b 2eed551f a3e3478cc1c0e04e CA4E4541 1FC1A2C1 3F 5fb6dbcfda1551 51b05b5d 2d3c8cfe fa8b4285051750e3 22d1422a 7ae3a8a1 3b4188ac346372da 37AA8ABA 6EB30E41 781BC81FB5CA66E3 A09DBD3A 3FE85BBD 69893DBD------END LICENSE------

4 Terminal input SUBL, open sublime, found unable to input Chinese, so need to continue to configure

5 Save the following code to file sublime_imfix.c (any directory)

#include <gtk/gtkimcontext.h>voidGtk_im_context_set_client_window (Gtkimcontext *context, Gdkwindow*window) {Gtkimcontextclass*Klass; G_return_if_fail (Gtk_is_im_context (CONTEXT)); Klass=Gtk_im_context_get_class (CONTEXT);if(klass->Set_client_window) Klass-Set_client_window (context, window); G_object_set_data (G_object (context),"window", window); if(!Gdk_is_window (WINDOW))return; intwidth =gdk_window_get_width (window);intHeight =gdk_window_get_height (window);if(Width! =0&& Height! =0) gtk_im_context_focus_in (context);}

6 Compile the code from the previous step into a shared library libsublime-imfix.so, command

Gcc-shared-o libsublime-imfix.so sublime_imfix.c  ' pkg-config--libs--cflags gtk+-2.0'-fPIC

7 If the error indicates that no dependent software is installed, the installation

sudo apt-get install build-essential libgtk2. 0-dev

8 then copy the libsublime-imfix.so to the folder where Sublime_text is located

sudo mv libsublime-imfix.so/opt/sublime_text/

9 Modifying the contents of a file/usr/bin/subl

sudo gedit/usr/bin/subl

Will

#!/bin/sh

Exec/opt/sublime_text/sublime_text "[Email protected]"

Revision changed to

#!/bin/sh

ld_preload=/opt/sublime_text/libsublime-imfix.so exec/opt/sublime_text/sublime_text "[Email protected]"

At this point, executing subl in the command will be able to use Sogou for Linux Chinese input

10 in order to use the right mouse button to open the file can use Chinese input, also need to modify the contents of the file Sublime_text.desktop. Enter sublime_text.desktop

sudo gedit/usr/share/applications/sublime_text.desktop

Set the string in [Desktop Entry]

Exec=/opt/sublime_text/sublime_text%F

Revision changed to

Exec=bash-c "ld_preload=/opt/sublime_text/libsublime-imfix.so exec/opt/sublime_text/sublime_text%F"

string in [Desktop Action Window]

Exec=/opt/sublime_text/sublime_text-n

Revision changed to

Exec=bash-c "Ld_preload=/opt/sublime_text/libsublime-imfix.so exec/opt/sublime_text/sublime_text-n"

string in [Desktop Action Document]

Exec=/opt/sublime_text/sublime_text--command New_file

Revision changed to

Exec=bash-c "ld_preload=/opt/sublime_text/libsublime-imfix.so exec/opt/sublime_text/sublime_text--command New_ File

Reference documents:

Http://jingyan.baidu.com/article/f3ad7d0ff8731609c3345b3b.html

http://blog.csdn.net/cywosp/article/details/32350899

Http://zhidao.baidu.com/link?url=7XSNw5qciCh8rzvJArYFTBuaWKbD3DEMobp5j7F8PS4oiU4lV7E3VzMTBoRt_R4VnBt2VJGM3INk_ Optmu2dlbuuojxqupwbo9cuzlp6n3s

Ubunt 14.10 Installation Sublime Text 3, registration code, Chinese Input Method

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.