T430上尝试了Ubuntu 12.04 和fedora 17,19, 大问题没有, 小问题不少, 比如耗电, 双显卡, hda声卡问题,
最终回到了Fedora 17这个EOL版本, 原因是"没更新不折腾"
------------------ yum installation ------------------
sudo yum install yum-plugin-fastestmirror
sudo yum update
等待升级完成,
安装必要的软件:
词典:
sudo yum install sdcv
十六进制编辑:
sudo yum install ghex
压缩解压缩:
sudo yum install p7zip p7zip-plugins unrar
系统工具
sudo yum install dconf-tools
sudo yum install gconf-editor
sudo yum install gnome-tweak-tool
安装GNOME2, Fedora19没有fallback模式
sudo yum install gnome-classic-session
sudo yum install nautilus-open-terminal
右键+终端打开
yum install systemd-ui
图形化服务管理工具
sudo yum install ibus ibus-pinyin
词库位置/usr/share/ibus-pinyin/db/android.db, 需要卸载ibus-libpinyin
开发工具:
sudo yum install gcc gcc-c++
- 包含 GNU C 编译器
sudo yum install autoconf automake
- 包含 make 命令,用于通过 makefiles 制作二进制文件
sudo yum install ckermit
sudo yum install ncurses-devel
sudo yum install subversion
sudo yum install glibc-headers
- 包含一些重要的函数库
sudo yum install glibc-devel
- 包含制作可执行程序所需要的标准头文件
sudo yum install binutils binutils-devel
- 包含编译程序所需要的一些工具
sudo yum install kernel-devel
- 包含 Linux 内核(Kernel) 的原文件,它在需要重建内核时会被用到
yum install rpmdevtools
yum install yum-utils
其他:
sudo yum install meld
文件比较工具
sudo yum install wget 下载工具
sudo yum install uget
sudo yum install filezilla
sudo yum install guake 下拉式终端
增加rpmfusion源:
sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1..org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
安装Flash 插件:
sudo yum install http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm -y
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
sudo yum install flash-plugin -y
安装解码器
su -c 'yum localinstall --nogpgcheck http://mirrors.163.com/rpmfusion/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://mirrors.163.com/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
安装 mp3 和其它音频支持:
sudo yum install gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly libtunepimp-extras-freeworld xine-lib-extras-freeworld
视频解码库
sudo yum install ffmpeg ffmpeg-libs gstreamer-ffmpeg libmatroska xvidcore
Chrome 浏览器:
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
su -c 'yum -y localinstall https://dl.google.com/linux/direct/google-chrome-stable_current_i386.rpm'
如果你用罗技的无线鼠标(For Logitech Device)
yum install http://sourceforge.net/projects/postinstaller/files/fedora/releases/19/x86_64/updates/solaar-0.9.2-1.fc19.noarch.rpm
JAVA Plugin
下载页面: http://java.com/zh_CN/download/manual.jsp?locale=zh_CN
安装as root:
cd /usr/java
rpm -ivh jre-7u7-linux-i586.rpm
rm *.rpm
cd /usr/lib/mozilla/plugins
ln -s /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so
------------------- system setting -------------------
删除grub.conf的rhgb参数
rhgb:
删除该参数将会以非图形界面启动.
quiet:
硬件自检类消息不提示.
设置终端提示符:
gvim ~/.bashrc
++export PS1='\[\e]0;\w\a\]\n\[\e[36m\]\u@fedora \[\e[32m\]\w\[\e[0m\]\n\$ '
powertop电源优化:
http://wiki.manjaro.org/index.php?title=PowerTOP_to_Optimise_Laptop_Power_Consumption
sudo yum install powertop
sudo powertop --html=t430-f17-powertop-report.html #生成报告
将报告中tuning中的{Software Settings in need of Tuning}命令加入到 /usr/local/bin/powersave.sh
/etc/rc.local加入一行: sh /usr/local/bin/powersave.sh
开机自启动, 亮度调节, 编辑/etc/rc.local :
#!/bin/bash
# adjust brightness for Discrete NVDIA
#echo 50 > /sys/class/backlight/acpi_video1/brightness
# adjust brightness for Integrated
echo 55 > /sys/class/backlight/acpi_video0/brightness
sh /usr/local/bin/powersave.sh
exit
编辑完成..
chmod a+x /etc/rc.d/rc.local
ln -s /etc/rc.d/rc.local /etc
systemctl status rc-local.service
检查服务是否启动
systemctl start rc-local.service
如果服务没有启动,执行命令启动
systemctl enable rc-local.service
开启服务
systemctl list-unit-files
查看所有服务信息
查看启动消耗时间:
systemd-analyze
查看各个服务启动花费的时间:
systemd-analyze blame
停止的服务 :
systemctl disable bluetooth.service
systemctl disable sendmail.service
systemctl disable sm-client.service
systemctl disable abrtd.service
systemctl disable abrt-ccpp.service
systemctl disable abrtd.service
systemctl disable abrt-oops.service
systemctl disable abrt-vmcore.service
systemctl disable abrt-xorg.service
chkconfig livesys-late off
chkconfig livesys off
安装 windows 字体 :
复制 windows 系统内的字体到 /usr/share/fonts/winfonts(目录 winfonts 可自由创建)
sudo mkdir /usr/share/fonts/simsum
sudo chmod 755 /usr/share/fonts/simsum
*.ttf 拷贝至 /usr/share/fonts/truetype/simsum
更新字体缓存
sudo mkfontscale
sudo mkfontdir
sudo fc-cache -fv
Win + Fedora 18 双系统 时差
$ sudo system-config-date
然后切换到 Time Zone 选项卡,然后把最底下的“System clock use UTC”前的勾取消,再确定即可。
关闭SELinux:
/etc/selinux/config文件中的SELINUX="" 为 disabled
自定义Shell(0):
/usr/bin/xgoagent
#!/bin/sh
python /opt/goagent-2.0.5-3/local/proxy.py > /dev/null 2>&1 &
开机启动g~a~e~代理,
自定义Shell(5):
vim /usr/bin/xpoint
启用Thinkpad的TrackPoint
#!/bin/bash
# for thinkpad trackpoint, middle key scroll screen
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
或者
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200
或者:
yum install gpointing-device-settings
运行 gpointing-device-settings
选者 TPPS/2 IBM TrackPoint
选择 Use Wheel emulation,把 button 修改为 2
自定义Shell(6):
vim /usr/bin/xvga
#!/bin/sh
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
example: sudo xvga
自定义Shell(7):
/usr/bin/re-ibus : 重启ibus
#!/bin/sh
killall ibus-daemon
ibus-daemon -d
example : #/usr/bin/re-ibus
清理gnome缓存shell
$ cat clean-cache.sh
#!/bin/sh
echo "clean ~/.thumbnails..."
rm -fr /home/chen/.thumbnails/normal/*
rm -fr /home/chen/.thumbnails/fail/gnome-thumbnail-factory/*
echo "clean .shotwell..."
rm -fr /home/chen/.shotwell/thumbs/*
echo "clean recently-used..."
rm -fr /home/chen/.local/share/recently-used.xbel
echo "clean cache done!"
终端执行gnome-session-properties 管理开机自运行程序:
可以关闭的: ABRT / Orca / SELinux/ Caribou,
自启动程序参考 http://gnomeshell.wordpress.com/2011/08/28/manage-the-startup-applications/
或者直接到/etc/xdg/autostart 删除对应的自启动文件:
禁止update:
edit(you editor of choice) /etc/yum/pluginconf.d/refresh-packagekit.conf
modified enabled=0
edit /etc/yum.repos.d/fedora-updates.repo
find [updates], and modified enabled=0
yum update 不升级kernel:
vim /etc/yum.conf,在[main]的最后添加exclude=kernel*
GEdit 中文乱码:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030', 'UTF-8', 'GB2312', 'GBK', 'BIG5', 'CURRENT', 'UTF-16']"
VirualBox 添加usb用户:
sudo usermod -aG vboxusers <my username>
开机时GRUB报错:
(错误1)“Cannot open font file True” in Fedora
Edit /etc/default/grub
vi /etc/default/grub. After that, change SYSFONT=True to SYSFONT=latarcyrheb-sun16
Edit /etc/sysconfig/i18n. Same, change SYSFONT=True to SYSFONT=latarcyrheb-sun16
Rebuild Grub2 with the command : grub2-mkconfig -o /boot/grub2/grub.cfg
(错误2) GRUB2 error: file ‘/boot/grub2/locale/en.mo.gz’ not found
解决方法
# cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo /boot/grub2/locale/en.mo
# gzip /boot/grub2/locale/en.mo # 可以省略
-------------------- gnome 3 setting --------------------
修改标题栏 gnome3 title-bar 透明度
vi /usr/share/gnome-shell/theme/gnome-shell.css
找到:
#panel {
/*background-color: black; 注释掉*/
background-color: rgba(0, 0, 0, 0.4);
//将透明度调到0.4
font-weight: bold;
height: 1.86em;
}
按Alt+F2,输入r
gnome-shell最大化时隐藏标题栏 http://www.cnblogs.com/ishiiwa/archive/2012/10/28/2743105.html
1、vim /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
2、找到 <frame_geometry name="max" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false">
改为 <frame_geometry name="max" title_scale="medium" parent="normal" rounded_top_left="false" rounded_top_right="false" has_title="false">
改为 <distance name="title_vertical_pad" value="0"/> <!--
改为 <border name="title_border" left="10" right="10" top="0" bottom="0"/>
改为 <border name="button_border" left="0" right="0" top="0" bottom="0"/>
3、保存alt+f2, r
zip 中文解压乱码:
在/usr/local/bin新建以下两个文件, 如果解压中文文件, 则在终端执行 uzip "文件名.zip"
$ gvim /usr/local/bin/unzip2.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import zipfile
print "Processing File " + sys.argv[1]
file=zipfile.ZipFile(sys.argv[1],"r");
for name in file.namelist():
utf8name=name.decode('gbk')
print "Extracting " + utf8name
pathname = os.path.dirname(utf8name)
if not os.path.exists(pathname) and pathname!= "":
os.makedirs(pathname)
data = file.read(name)
if not os.path.exists(utf8name):
fo = open(utf8name, "w")
fo.write(data)
fo.close
file.close()
$ gvim /usr/local/bin/uzip
#!/bin/sh
echo "Created by Chen @2013-08-09"
echo "usage: uzip xxx.zip"
echo "-------------------"
echo "decompress '$1'...."
python /usr/local/bin/unzip2.py "$1"
N+I双显卡:
http://bumblebee-project.org/install.html#Fedora