Arch Linux Installation – Part 2

In the previous article I showed you how to install Arch Linux, but wouldn’t it be nice to give that install some functionality? In part 2 we configure a working desktop with some basic software. Namely dwm as our window manager, surf for web-browsing and st as our terminal emulator of choice. Boot up Arch and let’s get going.

The basics

Log in as the user you created in part 1.

Arch Linux 3.6.10-1-ARCH (tty1)

vesuvius login: tony

Become a super user

[tony@vesuvius ~]$ su
[root@vesuvius tony]#

Now you’re powerful!


I want to get the boring stuff out-of-the-way real quick so let’s go back to setting the clock. Network Time Protocol will keep Arch synced up with a time-server so we don’t have to worry about clock skew, which can really mess with certain pieces of software.

# pacman -Syu ntp

Edit /etc/ntp.conf with your NTP servers. You can find a server near you here:

# vi /etc/ntp.conf

server iburst
server iburst
server iburst
server iburst

Start ntpd

# systemctl start ntpd

Enable ntpd to start at boot

# systemctl enable ntpd

Typing date at this point should show the correct date and time.

X Window System

Xorg is the backbone to our GUI and essential to our desktop in the way most of us think about it. It is currently the only viable choice to get a windowed environment running under Linux. However this may soon change as Wayland is picking up steam and is planned to be used by popular distributions such as Ubuntu.

X should take a couple of minutes to download and will eat up around 100Mb of space after install. This is our second largest install of the guide.

# pacman -S xorg-server xorg-xinit xorg-server-utils mesa


Check to see what chipset you have and install a video driver.

# lspci | grep VGA


# pacman -S xf86-video-vesa

Intel Users

# pacman -S xf86-video-intel

Nvidia users

# pacman -S xf86-video-nouveau nouveau-dri

ATI users

# pacman -S xf86-video-ati

Building the desktop


The source for our window manager, browser and terminal are all provided via git so let’s pull that in real quick.

# pacman -S git

Grabbing the source

Grab the source for the software we need, as well as wget to pull in dmenu. If you’re feeling brave try compiling web-kit from source to cut down on your dependencies. I recommend just using the supplied package for now. By far the largest piece of software on our system, Web-Kit weighs in at about 210Mb. This is because of the huge amount of deps required by the default configuration.

# cd /usr/src
# git clone
# git clone
# git clone
# pacman -S webkitgtk2
# pacman -S wget
# wget
# tar xvf dmenu-4.5.tar.gz
# rm dmenu-4.5.tar.gz

Building the source

I like editing with Vim, you may prefer Vi or nano.

# pacman -S vim
# cd dwm/
# vim

Change the path of X11INC and X11LIB to:

X11INC = /usr/include/X11
X11LIB = /usr/lib/X11

Save and compile

# make clean install
# cd ../st/

Make the same changes to for st, surf and dmenu. Compile after each change:

Making st play nicely with dwm

St needs to open when dwm calls for a terminal, so we need to edit the source and compile. Everytime you want to make a change to dwm you must repeat this process.

# vim /usr/src/dwm/config.h

Edit the line
static const char *termcmd[]  = { "uxterm", NULL };

To look like
static const char *termcmd[]  = { "st", NULL };

If you want the Windows key to function as your Meta key instead of Alt make this change. Highly recommended as software such as Gimp need access to this key-binding.

#define MODKEY Mod1Mask


#define MODKEY Mod4Mask

Save and compile.

# make clean install
# exit

I noticed that surf doesn’t depend on xorg-xprop but needs it for full functionality with dmenu.

# pacman -S xorg-xprop


Xorg needs some instruction when you launch it, otherwise it will just leave you at a blank screen or crash. After all this compiling we probably want to see dwm launch. .xinitrc is the config we will use to give these instructions.

Make sure you’re logged in as your normal user.

$ vim ~/.xinitrc

add this line and save it to your home directory

exec /usr/local/bin/dwm

Launch Xorg

Try it out, xinit will launch Xorg and you will see your new desktop!

$ xinit

dwmMeta-shift-enter will open a terminal, Meta-p will open dmenu and give you a list of installed tools, typing surf, followed by enter will open your web browser. The man pages cover all the hot-keys.

$ man dwm
$ man surf
$ man st

Starting dwm at log in

I want dwm to start whenever I log in to this user as well as log errors.

$ vim ~/.bash_profile

exec xinit & > x.log


The final touches


You probably noticed how ugly the fonts in the screen shot were. Seems we are lacking any descent fonts.

$ sudo pacman -S ttf-bitstream-vera ttf-dejavu ttf-liberation terminus-font


$ xinit

Much better with the new fonts.

dwm w/ better fonts


Having audio would be pretty nice, so install Alsa and unmute.

$ sudo pacman -S alsa-utils alsa-plugins
$ alsamixer
$ sudo alsactl store


Mplayer2 is a fork of the original mplayer project, it has been developed further than the latter and is maintained by the original team of developers. Basically, it rocks for media playback. The package will pull in all the necessary media codecs allowing it to handle almost anything you can throw at it, even DVDs.

$ sudo pacman -S mplayer2

Flash Player

Most of us visit youtube or some other flash-based site, flash player is an unfortunate dependency that is hard to avoid on the modern web. Should you choose to install it here is the command.

$ sudo pacman -S flashplugin

Flash PlaybackAs you can see, flash playback works as it should.


There is a lot more you can do with your shiny new Arch install but building a solid foundation is the most important. Play around and enjoy your productive new work space.


Tony is a system administrator from Seattle, WA. He specializes in secure, minimal, Linux installations.

Posted in Linux Tagged with: , , , , , , , , , , , , , ,
One comment on “Arch Linux Installation – Part 2
  1. Hoang Nguyen says:

    I am trying archlinux with dwm from debian. Thanks for your helpful installation guild. It like st because it’s simple. But in some programs like mc, w3c, i can not use mouse.

What did you think?


Enjoy what we do? Want to stay updated? Enter a valid E-mail address, and never miss a thing.

%d bloggers like this: