Fedora 23安装sublime text,添加搜狗中文输入法

2016-02-15 18:26  2428人阅读  评论 (0)
Tags: fedora

安装chrome依赖

sudo dnf install -y vim lsb

下载chrome安装

http://www.google.cn/chrome/?dotcoo
双击google-chrome-stable_current_x86_64.rpm安装

安装搜狗输入法

sudo dnf config-manager --add-repo=http://repo.fdzh.org/FZUG/FZUG.repo
sudo dnf install fzug-release -y
sudo dnf install sogoupinyin sogoupinyin-selinux -y
reboot

安装sublime

下载ubuntu的压缩包版本,解压到/opt/sublime_text
sudo tar -C /opt -xjf sublime_text_3_build_3103_x64.tar.bz2
sudo mv /opt/sublime_text_3 /opt/sublime_text

下载sublime的libsublime-imfix.so

http://pan.baidu.com/s/1i4e20JV
sudo mv '/home/dotcoo/下载/libsublime-imfix.so' /opt/sublime_text/

添加LD_PRELOAD环境变量

vim /etc/profile
export LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so

添加subl

sudo vim /usr/bin/subl

#!/bin/sh
LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so exec /opt/sublime_text/sublime_text "$@"

sudo chmod +x /usr/bin/subl

添加快捷方式

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

[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, dotcoo 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=/opt/sublime_text/Icon/128x128/sublime-text.png
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;

重启

reboot