• 应用程序启动器 “sublime_text.desktop“ 还没有被标记为 信任。如果您不知道这个文件的来源,那么启动它可能会不安全。解决sublime在ubuntu中不支持中文输入问题。


    1.下载

    git clone https://github.com/lyfeyaj/sublime-text-imfix.git
    

    2.进行一些处理

    cd ~/sublime-text-imfix
    sudo cp ./lib/libsublime-imfix.so /opt/sublime_text/
    sudo cp ./src/subl /usr/bin/
    

    这样每次都要输入subl才能打开,很不友好。

    对Desktop文件进行改造,可以完美解决中文输入。

    原来的

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Sublime Text
    GenericName=Text Editor
    Comment=Sophisticated text editor for code, markup and prose
    Exec=/opt/sublime_text/sublime_text %F
    Terminal=false
    MimeType=text/plain;
    Icon=sublime-text
    Categories=TextEditor;Development;
    StartupNotify=true
    Actions=Window;Document;
    
    [Desktop Action Window]
    Name=New Window
    Exec=/opt/sublime_text/sublime_text -n
    OnlyShowIn=Unity;
    
    [Desktop Action Document]
    Name=New File
    Exec=/opt/sublime_text/sublime_text --command new_file
    OnlyShowIn=Unity;
    
    

    改造后的

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Sublime Text
    GenericName=Text Editor
    Comment=Sophisticated text editor for code, markup and prose
    Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text %F"
    Terminal=false
    MimeType=text/plain;
    Icon=sublime-text
    Categories=TextEditor;Development;
    StartupNotify=true
    Actions=Window;Document;
    
    [Desktop Action Window]
    Name=New Window
    Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text -n"
    OnlyShowIn=Unity;
    
    [Desktop Action Document]
    Name=New File
    Exec=bash -c "LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text --command new_file"
    OnlyShowIn=Unity;
    
    

  • 相关阅读:
    页面引入js问题
    python之循环语句与注释
    python之字符串格式化方法
    python之对象的方法
    python之函数
    python之条件判断
    python之布尔表达式
    python之列表与元组
    python之字符串
    搞不明白的recycling process 和 finalization process
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/9217554.html
Copyright © 2020-2023  润新知