Synchronize date and time

ntpdate -v -b

Install patches

freebsd-update fetch
freebsd-update install

Update portsnap

portsnap fetch
portsnap extract

Install X11 and configure it

pkg_add -r xorg
Xorg -configure
mv /etc/X11/xorg.conf

Start hald and dbus at boot time

echo 'hald_enable="YES"' >> /etc/rc.conf
echo 'dbug_enable="YES"' >> /etc/rc.conf

Reboot and then test X11


Install Slim to replace xdm

pkg_add -r slim

Start Slim at boot time

echo 'slim_enable="YES"' >> /etc/rc.conf

Enable auto login by change the following

default_user    simone
auto_login      no


default_user    {username}
auto_login      yes

Install Xfce4

pkg_add -r xfce4

allow user to reboot or shutdown in xfce4

add the following lines into /usr/local/etc/PolicyKit/PolicyKit.conf IN BETWEEN <config> and </config>

<match action="org.freedesktop.hal.power-management.shutdown">
    <return result="yes"/>
<match action="org.freedesktop.hal.power-management.reboot">
    <return result="yes"/>

Start xfce4 at boot time

echo "/usr/local/bin/startxfce4" > ~/.xinitrc

Install portmaster

cd /usr/ports/ports-mgmt/portmaster/
make install clean

Install sudo and uncomment wheel group

pkg_add -r sudo

Install zsh

portmaster shells/zsh
chsh -s /usr/loca/bin/zsh

Add Chinese support

pkg_add -r wqy-fonts

Add the following lines into /etc/X11/xorg.conf

Section "Files"
    FontPath    "/usr/local/lib/X11/fonts/wqy"
Section "Module"
    Load    "freetype"

Install Linuxulator

# load the module
kldload linux
# enable the module at boot time
echo 'linux_enable="YES"' >> /etc/rc.conf
# install linuxulator
pkg_add -r linux_base-f10

Linuxulator requires procfs. Add the following line into /etc/fstab

linprocfs    /compat/linux/proc    linprocfs    rw    0    0

Enable sound

echo 'snd_driver_load="YES"' >> /boot/loader.conf

Enable SMART

cp /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf
echo 'smartd_enable="YES"' >> /etc/rc.conf
service smartd start

Install chinese IMP

sudo pkg_add -r zh-ibus-pinyin

Set the env var for IBUS

XIM_ARGS="--daemonize --xim"


pkg_add -r chromium

Java applets in browser

portmaster java/icedtea-web

Adobe flash plugin

pkg_add -r nspluginwrapper
portmaster www/linux-f10-flashplugin11
ln -s /usr/local/lib/npapi/linux-f10-flashplugin/ /usr/local/lib/browser_plugins/
nspluginwrapper -v -a -i

PDF viewer

sudo pkg_add -r epdfview

Image viewer

sudo pkg_add -r ristretto