archlinux安装及配置


安装

配置

网络 wicd

参考arch的wiki

  1. pacman -S wicd
  2. pacman -S dhclient wpa_supplicant hicolor-icon-theme
  3. 编辑/etc/rc.conf, 在network前加! 并添加wicd 
    在~/.xinitrc 添加启动wicd客户端 
    wicd-client &
    重启X 如 # rc.d restart slim
    

电源管理

sudo pacman -S gnome-power-manager
sudo pacman -S gnome-control-center
在~/.xinitrc 添加启动
gnome-power-manager &

安装挂起

sudo pacman -S pm-utils
在/etc/sudoers加入:
%wheel ALL = (ALL) NOPASSWD: /usr/sbin/pm-suspend

普通用户使用关机重启支持

在/etc/sudoers加入:
%wheel ALL = (ALL) NOPASSWD: /sbin/reboot
%wheel ALL = (ALL) NOPASSWD: /sbin/halt

加入awesome菜单

mysysmenu = {
   { "suspend", terminal .. " -e sudo pm-suspend" },
   { "reboot", terminal .. " -e sudo reboot" },
   { "halt", terminal .. " -e sudo halt" },
}

输入法 ibus

参考arch的wiki

  1. pacman -S ibus ibus-pinyin ibus-anthy
  2. 在~/.xinitrc 添加启动wicd客户端
    export LANG=zh_CN.UTF-8
    export LC_ALL="zh_CN.UTF-8"
    ibus-daemon -d -x -r -n awesome
    
  3. urxvt下使用ibus:
    在 .Xdefaults 添加
      URxvt.inputMethod: ibus
      URxvt.preeditType: OnTheSpot,None 
    

各种乱码

参考arch的wiki

技巧

更改slim主题

查看窗口CLASS等信息

yaourt xprop,运行xprop,点击需要查看的窗口

截屏

在rc.lua的"Key bindings"处添加 awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/pic/shot/ 2>/dev/null'") end),

安装 Virtualbox

安装对应的kernel headers 如提示没有libGLU.so,安装 freeglut Virtualbox-管理-设定-Extensions里安装extension

flash

  1. pacman -Sy flashplugin
  2. 开启/etc/adobe/mms.cfg里的EnableLinuxHWVideoDecode=1

获取最快源

cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak2
pacman -S reflector
reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist