
Archlinux Logo
Arch Linux is a light and fast distro. I run my arch linux inside Virtual Box VM on a Dell D630 (T7250 @ 2.0GHz + 4G memory). Desktop environment is XFCE4 which is also light and fast.
Here are my notes of configure the ArchLinux virtual machine in Virtualbox.
On 4/21/2010, I made a dual boot (Windows XP and archlinux) on the Dell D630, this note was updated accordingly.
VirtualBox Guest Addition
See http://wiki.archlinux.org/index.php/VirtualBox#Installing_Guest_Additions
# pacman -S virtualbox-additions
# modprobe loop # mount /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso /media/cdrom -o loop
Run install script then reboot.
Xorg and Xfce4
Install xorg:
$ pacman -S xorg mesa xf86-input-keyboard xf86-input-mouse hal dbus xf86-input-evdev xf86-input-synaptics
Generate xorg config:
$ xorg -configure
$ cp /root/xorg.conf.new /etc/X11/xorg.conf
Add default depth, screen resolutions and enable composite in xorg.conf
Add ‘hal’ to rc.conf DAEMONS section. Add @ in front of network, netfs, cpufreq, alsa, syslog-ng.
Start hal:
$ /etc/rc.d/hal start
Install xfce4:
pacman -S xfce4 xfce4-goodies fortune-mod ttf-ms-fonts ttf-dejavu ttf-bitstream-vera
See also: Archlinux Wiki “xfce4″, “xorg” and “Beginner’s Guide”.
Create .xinitrc and .xprofile:
$ cat .xinitrc
$ cat .xprofile
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
ibus-daemon –xim -d &
Slim
$ pacman -S slim slim-themes archlinux-themes-slim
Add ‘slim to rc.conf DAEMONS section.
Add ‘current_theme archlinux-simplyblack’ to /etc/slim.conf
Chinese
Reference: http://wiki.archlinux.org/index.php/Arch_Linux_中文化_(简体中文)
Font
See wiki ‘Fonts’.
$ pacman -S wqy-zenhei wqy-bitmapfont ttf-arphic-ukai ttf-arphic-uming ttf-fireflysung
To modify font settings, see /etc/fonts/conf.d
For fixing Chinese font display problem under Chromium: go to /etc/fonts/conf.avail/66-wqy-zenhei-sharp.conf, enable antialias.
My .fonts.conf:
cat .fonts.conf
<?xml version=’1.0′?>
<!DOCTYPE fontconfig SYSTEM ‘fonts.dtd’>
<fontconfig>
<match target=”font” >
<edit mode=”assign” name=”rgba” >
<const>rgb</const>
</edit>
</match>
<match target=”font” >
<edit mode=”assign” name=”hinting” >
<bool>true</bool>
</edit>
</match>
<match target=”font” >
<edit mode=”assign” name=”hintstyle” >
<const>hintslight</const>
</edit>
</match>
<match target=”font” >
<edit mode=”assign” name=”antialias” >
<bool>true</bool>
</edit>
</match>
</fontconfig>
Config SCIM for chinese
Following from: http://verbatim.72pines.com/category/arch-linux/
配置用户的输入法设置:
使用新用户登录,在用户家目录下建立.xinitrc和.xprofile两个文件,内容如前面一样,如下:
[lee@myhost ~]$ cat .xinitrc
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
scim -d
[lee@myhost ~]$ cat .xprofile
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
scim –d
Config ibus for Chinese input
$ sudo pacman -S ibus-sunpinyin
$ sudo pacman -S ibus-sogoupycc
Add export LC_CTYPE=”zh_CN.UTF-8″ to .xinitrc and .xprofile
Add following to /etc/environmentLC_CTYPE=”zh_CN.UTF-8″, so emacs can use Chinese IME
Set IME switch key to Alt_R to avoid conflict with emacs.
Laptop
See wiki “laptop”.
cpufreq
$ pacman -S acpi cpufrequtils
Add ‘acpi-cpufreq’ and ‘cpufreq_ondemand’ to MODULES section of /etc/rc.conf.
Edit /etc/conf.d/cpufreq:
#configuration for cpufreq control
# valid governors:
# ondemand, performance, powersave,
# conservative, userspace
governor=”ondemand”
# limit frequency range (optional)
# valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq=”0.8GHz”
max_freq=”2GHz”
Dual Screen
TBD
Wireless Device Drive
$ pacman -S iwlwifi-3945-ucode wireless_tools wpa_supplicant
$ modprobe iwl3945
Add ‘iwl3945′ to MODULES section of /etc/rc.conf
To test wireless device:
$ iwconfig
Network Manager
$ pacman -S networkmanager network-manager-applet xfce4-xfapplet-plugin
Add
”
[keyfile]
hostname= “yourhostnamehere”
”
to /etc/NetworkManager/nm-system-settings.conf
Then stop network service:
$ /etc/rc.d/network stop
$ ifconfig eth0 down
$ ifconfig wlan0 down
Comment out all network interface in /etc/rc.conf:
#eth0
#wlan0
INTERFACES = (!eth0 !wlan0)
and modify DAEMONS section:
DAEMONS =(… !newwork hal networkmanager…)
Make sure your account can manager network settings:
$ gpasswd -a yourusername network
Reboot.
But how to save wpa password in nm?
Sound
$ pacman -S alsa-utils gstream0.10-base-plugins
In rc.conf, add ‘alsa’ to DAEMONS and disable pc speaker like:
MODULES=(… !pcspkr !snd-pcsp …)
To test sound:
$ aplay /usr/share/sounds/alsa/Front_Center.wav
fstab
Add noatime option to / and /home.
Mount NTFS
$ pacman -S ntfs-3g
Add following line to /etc/fstab:
/dev/sda1 /mnt/c ntfs-3g defaults,ro 0 0
Cups
$ pacman -S cups ghostscript gsfonts
Add cups to DAEMONS section of rc.conf.
$ pacman -S hplip cups-pdf sane python-imaging python-reportlab xsane
Add user to camera and scanner group.
Make sure dbus service is enabled.
Archlinux AUR
AUR是第三方包,不包含在官方source中。 安装过程需要编译,时间可能较长。
下面的例子是在archlinux上面安装mongodb的过程:
1. 在http://aur.archlinux.org/packages.php?ID=27971下载tarball
2. 解压缩: tar -xzvf mongodb.tar.gz
3. cd mongodb
4. makepkg -S
5.得到 mongodb-1.4.4-1-x86_64.pkg.tar.xz
6. sudo pacman -U mongodb-1.4.4-1-x86_64.pkg.tar.xz
Software
Guake – A dropdown term software
Slim – Login Mgr, see http://wiki.archlinux.org/index.php/SLiM
MongoDB – There is an AUR package of MongoDB
DocUtil – $ sudo pacman -U docutils
Launchy – $ sudo pacman -S launchy This brought too many QT stuffs.
Tomboy – A note application powered by Mono.
Words – Words file to /usr/share/dict.
Cherokee – pacman -S cherokee
vlock – A terminal lock to lock the work station.
evince – Document viewer.
Other software
pacman -S firefox chromium guake python emacs
Blender
AUR libjpeg6 and blender-bin.
Emacs
using Aspell:
adding the line below to .emacs:
(setq-default ispell-program-name “aspell”)
W3M
$ sudo pacman -S emacs-w3m-cvs
Config:
Put this line into your ~/.emacs file:
(require 'w3m-load)
Just type M-x w3m, and you can use emacs-w3m.
In order to handle text/html part with emacs-w3m under SEMI MUAs such as Wanderlust, you have to put the following line in your ~/.emacs file:
(require 'mime-w3m)
REST-MODE
Download rst.el, save to /usr/share/emacs/site-lisp, chmod to 622, chown to root:root.
Add (require ‘rst) to ~/.emacs.
Trigger to rest-mode: M-x rest-mode.
msmtp
See: http://wiki.archlinux.org/index.php/Msmtp
$ sudo pacman –S msmtp
Add following to ./msmtprc:
account default host smtp.gmail.com port 587 protocol smtp auth on from username@gmail.com user username@gmail.com password xxxxx tls on tls_starttls on tls_trust_file /usr/share/ca-certificates/mozilla/Thawte_Premium_Server_CA.crt
Chmod 600 to ./msmtprc.
Testing:
$ echo “testing msmtp via gmail” | msmtp -a gmail <username>@gmail.com
Mutt
See: http://wiki.archlinux.org/index.php/Mutt
$ sudo pacman -S mutt
if you are using Gmail as your smtp server, you may need to install the package cyrus-sasl.
Setting mutt with Gmail:
Set .muttrc to:
set sendmail = “/usr/bin/msmtp”
set use_from = yes
set realname = “user”
set use_from = yes
set envelope_from = “yes”
set editor = /usr/bin/emacs
set edit_headers=yes
set imap_user = “user@gmail.com”
set imap_pass = “”
#set smtp_url = “smtp://user@smtp.gmail.com:587/”
#set smtp_pass = “”
#set from = “username@gmail.com”
#set realname = “Your Real Name”
set folder = “imaps://imap.gmail.com:993″
set spoolfile = “+INBOX”
set postponed=”+[Gmail]/Drafts”
set trash = “imaps://imap.gmail.com/[Gmail]/Trash”
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set imap_keepalive = 900
set sort = ‘threads’
set sort_aux = ‘last-date-received’
set imap_check_subscribed
#Header
ignore “Authentication-Results:”
ignore “DomainKey-Signature:”
ignore “DKIM-Signature:”
hdr_order Date From To Cc
See:
http://crunchbanglinux.org/wiki/howto/howto_setup_mutt_with_gmail_imap
and
http://shreevatsa.wordpress.com/2007/07/31/using-gmail-with-mutt-the-minimal-way/
$ mkdir .mutt $ mkdir .mutt/cache
$ chmod 600 .muttrc
Fetchmail
$ sudo pacman –S fetchmail
if run fetchmail as deamon not cron job, then run ‘chown fetchmail /etc/fetchmailrc’.
$ chmod 600 .fetchmailrc
$ sudo chown fetchmail .fetchmailrc
Test:
$ fetchmail –c
$ fetchmail –d0 –v
I decided using mutt to receive mail directly from gmail, so no fetchmail at this time.