最近手贱尝试了 Ubuntu 15.04,用了一阵没发现什么问题,就是 GTK 版本太高,很多地方主题太难看,想了想就滚回 LTS 了。

结合那个 PHA-2 的弱智问题,我又重做了两遍系统,所以把相关内容整理一下好了,方便以后手贱。

# 更新基本系统 我不建议开 backport
sudo apt-get update
sudo apt-get dist-upgrade

# 运行证书管理,删除CNNIC证书
sudo dpkg-reconfigure ca-certificates 

# 安装文泉驿系列字体 用微米黑代替默认的Fallback
sudo apt-get install wqy-* -y

# 禁用Ubuntu自带的各种广告搜索插件
V=`/usr/bin/lsb_release -rs`; if [ $V \< 12.10 ]; then echo "Good news! Your version of Ubuntu doesn't invade your privacy."; else gsettings set com.canonical.Unity.Lenses remote-content-search none; if [ $V \< 13.10 ]; then sudo apt-get remove -y unity-lens-shopping; else gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"; fi; if ! grep -q productsearch.ubuntu.com /etc/hosts; then echo -e "\n127.0.0.1 productsearch.ubuntu.com" | sudo tee -a /etc/hosts >/dev/null; fi; echo "All done. Enjoy your privacy."; fi

# 添加各种PPA,重要的我会注释,不知道是什么的可以搜索
sudo add-apt-repository ppa:nilarimogard/webupd8 -y

# 添加Pidgin修复PPA
sudo add-apt-repository ppa:c4pp4/pidgin -y

# 添加BTSync PPA
sudo add-apt-repository ppa:tuxpoldo/btsync -y

# 新版rhythmbox
sudo add-apt-repository ppa:fossfreedom/rhythmbox -y
sudo add-apt-repository ppa:jfi/ppa -y

# 咖啡因插件
sudo add-apt-repository ppa:caffeine-developers/ppa -y

# TLP 笔记本省电插件
sudo add-apt-repository ppa:linrunner/tlp -y

# Wine
sudo add-apt-repository ppa:ubuntu-wine/ppa -y
sudo add-apt-repository ppa:diesch/testing -y

# Numix主题
sudo apt-add-repository ppa:numix/ppa -y

# 囧脸输入法
sudo apt-add-repository ppa:fcitx-team/dailybuild-fcitx-master -y

# 工作区切换插件
sudo add-apt-repository ppa:vlijm/lswitcher -y
sudo add-apt-repository ppa:tsbarnes/indicator-keylock -y

# openjdk字体渲染优化
sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix -y
sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder  -y
sudo add-apt-repository ppa:shutter/ppa -y

# 新版VIM with Python 3 support
sudo add-apt-repository ppa:pi-rho/dev -y

# pidgin的QQ插件
sudo add-apt-repository ppa:lainme/pidgin-lwqq -y
sudo add-apt-repository ppa:yktooo/ppa -y

# jayatana,在JAVA程序里提供全局菜单支持
sudo add-apt-repository ppa:danjaredg/jayatana -y
sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix -y

# 一个优化新版的主题
sudo apt-add-repository ppa:bsundman/themes -y
sudo add-apt-repository ppa:noobslab/icons -y
sudo add-apt-repository ppa:starws-box/deadbeef-player -y

# Ubuntu Make,快速安装开发环境
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make -y

# Dnscrypt
sudo add-apt-repository ppa:anton+/dnscrypt -y

# 自动保存你笔记本亮度的sysvinit-backlight
sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight -y

# 更新添加PPA后的软件源
sudo apt-get update

# 安装软件
sudo apt-get install tlp tlp-rdw fcitx fcitx-sunpinyin fcitx-module-cloudpinyin gtk2-engines-murrine:i386 libudev1:i386 vlc i965-va-driver libva-intel-vaapi-driver vainfo gimp inkscape openshot shutter filezilla audacity thermald classicmenu-indicator numix-gtk-theme shimmer-themes numix-icon* caffeine leafpad git indicator-sound-switcher yosembiance-theme unity-tweak-tool pidgin-lwqq fcitx-mozc ibus-qt4 deadbeef ultra-flat-icons-* ultra-flat-icons curl ctags vim-doc vim-scripts cscope fonts-dejavu indent vim vim-gnome exuberant-ctags indicator-keylock pidgin pidgin-lwqq psensor syspeek blueman libluajit-5.1-2 python3-pip dnscrypt-proxy unsettings ubuntu-make btsync-gui ppa-purge jayatana lswitcher -y

# 安装Python3的Jedi
sudo pip3 install jedi

# 安装Python3的pep8
sudo pip3 install pep8

# 配置DNSCrypt,默认是一个荷兰的DNS,可以手动取消上面OpenDNS的注释
sudo vim /etc/default/dnscrypt-proxy

# 将Home目录中的中文目录名变为英文
export LANG=en_US
xdg-user-dirs-gtk-update
export LANG=zh_CN

# 在非点阵字体配置中手动添加WenQuanYi Micro Hei,设定优先级最高
sudo gedit /etc/fonts/conf.avail/69-language-selector-zh-cn.conf

# 我的存储硬盘挂载在/HDD/,所以部分目录我做了链接,链接之前记得手动删除这些
ln -s /HDD/Documents/ ~/
ln -s /HDD/Downloads/ ~/
ln -s /HDD/Music/ ~/
ln -s /HDD/Pictures/ ~/
ln -s /HDD/Videos/ ~/
ln -s /HDD/Dropbox/ ~/
ln -s /HDD/Software/ ~/

# 设定终端背景颜色为 solarized dark
export TERM=xterm-256color
git clone git://github.com/seebi/dircolors-solarized.git
cp ~/dircolors-solarized/dircolors.256dark ~/.dircolors
eval 'dircolors .dircolors'
ls
git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh

# 安装科学上网
wget plumz.me/ss214.deb
sudo dpkg -i ss214.deb 

# 修正Fcitx-sunpinyin打不出“囧脸”的“囧”字的bug
wget http://ftp.hk.debian.org/debian/pool/main/o/open-gram/sunpinyin-data_0.1.22+20131212-1_amd64.deb
sudo dpkg -i sunpinyin-data_0.1.22+20131212-1_amd64.deb

# 修改科学上网配置
sudo vim /etc/shadowsocks-libev/config.json 

# 将科学上网启动脚本里的 ss-server 替换为 ss-local
sudo vim /etc/init.d/shadowsocks-libev 

# 重启生效,然后记得配合pac文件
sudo service shadowsocks-libev restart

# 删除默认电源管理,修改grub启用pstate省电,配置修改因人而异
sudo update-rc.d -f ondemand remove 
sudo vim /etc/default/grub
sudo update-grub

# 安装支付宝插件
./aliedit.sh 

# 打开Ubuntu软件中心直接手动安装“Ubuntu 额外的版权受限程序”

# 清除不需要的软件包
sudo apt-get autoremove
sudo apt-get clean

# 重启生效
sudo reboot

重启后就剩下一些主题和细节的微调了。