做者:jostree 轉載請註明出處 http://www.cnblogs.com/jostree/p/4168168.html
1.Chromium 中的flash插件問題:
sudo apt-get install pepperflashplugin-nonfree sudo update-pepperflashplugin-nonfree --install
2.安裝zsh:
sudo apt-get install zsh git wget wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh chsh -s /bin/zsh
3.亮度保存:
sudo vim /etc/rc.local
在exit 0 前面添加:
echo 6 > /sys/class/backlight/acpi_video0/brightness
4.vim: "+p 粘貼問題
sudo apt-get install vim-gnome
5.擁有gonme 開始菜單
sudo apt-get install gnome-session-flashback
6.Dia 軟件 輸入中文
修改文件:/usr/bin/dia
#dia-normal --integrated 「$@」
dia-normal 「$@」
7.命令行中python的自動補全html
,在~/目錄下創建.pythonstartup.py文件,內容以下:java
#!/usr/bin/python # python startup file import sys import readline import rlcompleter import atexit import os # tab completion readline.parse_and_bind('tab: complete') # history file histfile = os.path.join(os.environ['HOME'], '.pythonhistory') try: readline.read_history_file(histfile) except IOError: pass atexit.register(readline.write_history_file, histfile) del os, histfile, readline, rlcompleter
而後在~/.bashrc中添加:python
export PYTHONSTARTUP="/home/liuyi/.pythonstartup.py"
8.搜狗輸入法安裝:linux
登錄網址下載:http://pinyin.sogou.com/linux/git
直接雙擊安裝,而後在系統設置-》語言支持-》鍵盤輸入方式系統-》fcitx-》應用到整個系統-》從新啓動github
便可!vim
9.搜狗輸入法黑框:windows
a.安裝xcompmgr ruby
sudo apt-get install xcompmgr
b.設置xcompmgr自動啓動bash
mkdir ~/.config/autostart cd ~/.config/autostart vim xcompmgr.desktop
c.將以下內容複製到xcompmgr.desktop文件,保存便可
[Desktop Entry] Type=Application Encodeing=UTF-8 Name="xcompmgr" Comment="" Exec="xcompmgr" hidden=false NoDisplay=false Terminal=false
10.vim-latex suite 中使用xelatex編譯,生成pdf
#第88到92行,我進行了以下修改,就是讓tex老是被編譯成pdf 88 if has('macunix') 89 TexLet g:Tex_DefaultTargetFormat = 'pdf' 90 else 91 TexLet g:Tex_DefaultTargetFormat = 'pdf' 92 endif #第117行修改,使用xelatex完成 tex -> pdf 的編譯 114 " ways to generate pdf files. there are soo many... 115 " NOTE: pdflatex generates the same output as latex. therefore quickfix is 116 " possible. 117 TexLet g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*' 修改147行,指定用evince程序打開pdf文檔 144 elseif has('macunix') 145 " Let the system pick. If you want, you can override the choice here. 146 TexLet g:Tex_ViewRule_ps = '' 147 TexLet g:Tex_ViewRule_pdf = 'evince
11.texlive 2013支持中文
安裝texlive:
sudo apt-get install texlive-full
把windows的sim字體拷貝到WinFonts文件夾下:
cd /usr/share/fonts sudo mkdir WinFonts sudo cp simfang.ttf simhei.ttf simkai.ttf simpbdo.ttf simpfxo.ttf simpo.ttf simsunb.ttf simsun.ttc /usr/share/fonts/WinFonts
使字體生效:
cd /usr/share/fonts/WinFonts sudo chmod 755 *sudo mkfontscale sudo mkfontdir sudo fc-cache -fsv
此處必定要使的文件夾具備可執行權限,而後修改配置文件:
cd /usr/share/texlive/texmf-dist/tex/latex/ctex/fontset
vim ctex-xecjk-winfonts.def
把其內部的SimKai和SimFang進行修改
修改內容可參考執行:
fc-list :lang=zh-cn
後的結果,這是我執行後的結果,把相應的內容改成KaiTi和FangSong
/usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW MBE:style=Light /usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai CN:style=Book /usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai HK:style=Book /usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai TW:style=Book /usr/share/fonts/WinFonts/simsun.ttc: 宋體,SimSun:style=常規,Regular /usr/share/fonts/WinFonts/simkai.ttf: 楷體,KaiTi:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta /usr/share/fonts/WinFonts/simfang.ttf: 仿宋,FangSong:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: Droid Sans Fallback:style=Regular /usr/share/fonts/WinFonts/simhei.ttf: 黑體,SimHei:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta /usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai TW MBE:style=Book /usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW:style=Light /usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing CN:style=Light /usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing HK:style=Light /usr/share/fonts/WinFonts/simsun.ttc: 新宋體,NSimSun:style=常規,Regular
這是我最終修改後的文件:
% ctex-xecjk-winfonts.def: Windows 的 xeCJK 字體設置,默認爲六種中易字體 % vim:ft=tex %\setCJKmainfont[BoldFont={SimHei},ItalicFont={[SIMKAI.TTF]}] \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}] {SimSun} \setCJKsansfont{SimHei} %\setCJKmonofont{[SIMFANG.TTF]} \setCJKmonofont{FangSong} \setCJKfamilyfont{zhsong}{SimSun} \setCJKfamilyfont{zhhei}{SimHei} %\setCJKfamilyfont{zhkai}{[SIMKAI.TTF]} \setCJKfamilyfont{zhkai}{KaiTi} %\setCJKfamilyfont{zhfs}{[SIMFANG.TTF]} \setCJKfamilyfont{zhfs}{FangSong} % \setCJKfamilyfont{zhli}{LiSu} % \setCJKfamilyfont{zhyou}{YouYuan} \newcommand*{\songti}{\CJKfamily{zhsong}} % 宋體 \newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑體 \newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷書 \newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋
而後就能夠了。
12.安裝Eclipse
官網下載eclipse後解壓到/opt/eclipse
而後建立桌面圖標:
sudo vim /usr/share/applications/eclipse.desktop
粘貼並保存以下內容
[Desktop Entry]
Name=Eclipse 4
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
發現能夠在終端順利啓動Eclipse,可是鼠標雙擊,或者用起動器啓動就會出現以下的內容:
A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching the following locations:…
解決辦法是在終端進入你的eclipse目錄,而後輸入:
mkdir jre
cd jre
ln -s 你的JDK目錄/bin bin
完成。