最終回到了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-toolssudo yum install gconf-editor
sudo yum install gnome-tweak-tool
安裝GNOME2, Fedora19沒有fallback模式
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
刪除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/grubvi /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