ububtu 14.04 问题集合

作者: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的自动补全

,在~/目录下建立.pythonstartup.py文件,内容如下:

#!/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中添加:

export PYTHONSTARTUP="/home/liuyi/.pythonstartup.py"

 

8.搜狗输入法安装:

登陆网址下载:http://pinyin.sogou.com/linux/

直接双击安装,然后在系统设置-》语言支持-》键盘输入方式系统-》fcitx-》应用到整个系统-》重新启动

即可!

 

9.搜狗输入法黑框:

a.安装xcompmgr 

sudo apt-get install xcompmgr

b.设置xcompmgr自动启动

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

完成。

posted @ 2014-12-17 01:35  jostree  阅读(1095)  评论(0编辑  收藏  举报