Archive for September, 2011

Installing XFCE 4.8 on Arch Linux

Posted in General on September 3rd, 2011 by Simon Connah – Be the first to comment

This article looks at how to install XFCE 4.8 on Arch Linux. I assume that you have a clean install of Arch Linux. If you do not you may already have some of the packages installed but it won’t hurt to follow the instructions exactly as shown.

The first task is to configure Arch Linux using the official installation manual which is excellent. I won’t be covering anything that is included in the installation guide as the provided documentation is already good enough.

Once you have finished with the initial configuration of Arch Linux we should move on to installing the requirements. We will be using SLiM as our login manager as that is nice and lightweight.

Run the following command to install all the requirements to get XFCE up and running:

pacman -S xfce4 ttf-liberation xorg-server dbus slim

you will also need to install the correct graphics drivers for your card. The following are the likely options:

xf86-video-ati
xf86-video-nvidia
xf86-video-intel

so install the correct one for your system like so:

pacman -S xf86-video-ati

now that is done you simply need to copy /etc/skel/.xinitrc to your home directory (and for all the other users you wish to be able to login using SLiM) like so:

cp /etc/skel/.xinitrc ~/.xinitrc

and uncomment the following line:

# exec startxfce4

so that it looks like this:

exec startxfce4

if the line does not exist in the file then simply add it to the bottom of the file and make sure that all other exec lines are commented out.

Now all you need to do is add dbus and slim to your list of daemons by editing /etc/rc.conf like so:

DAEMONS=(... dbus slim)

it is vital that dbus and slim are the last two entries in the daemons list. Simply restart your computer and you should be able to login to your new XFCE 4 desktop environment.

Configuring NTPd in Arch Linux

Posted in General on September 2nd, 2011 by Simon Connah – Be the first to comment

This tutorial deals with getting ntpd configured so that your system clock is set over the internet. So install ntpd like so:

pacman -S ntp

In order to get this working visit http://www.pool.ntp.org/ and select the correct region. Once you know which ntp servers you want to use add the servers to /etc/ntp.conf as shown below:

server 0.europe.pool.ntp.org iburst
server 1.europe.pool.ntp.org iburst
server 2.europe.pool.ntp.org iburst
server 3.europe.pool.ntp.org iburst

substitute the servers for the correct servers in your region. The iburst option is recommended. Then we need to make sure that ntpd runs automatically so we add it to our DAEMONS section of the /etc/rc.conf file like so:

DAEMONS=(... !hwclock ntpd ...)

this disables the hardware clock and makes sure that ntpd is used instead to keep the time in sync.

Now lets just finally make sure ntpd runs as a non-root user and in a chroot environment for added security:

groupadd ntp
useradd -r -d /var/lib/ntp -g ntp -s /bin/false ntp

then

chown -R ntp:ntp /var/lib/ntp

once you have created the user and group for ntpd and changed the permissions on the /var/lib/ntp directory you just need to edit /etc/conf.d/ntp-client.conf by editing the NTPD_ARGS line so it looks like this:

NTPD_ARGS="-g -i /var/lib/ntp -u ntp:ntp"

and edit /etc/ntp.conf so that the following line:

driftfile       /var/lib/ntp/ntp.drift

reads:

driftfile       /ntp.drift

then finally restart ntpd and it should work perfectly:

rc.d restart ntpd

Installing Gnome 3 on Arch Linux

Posted in General on September 2nd, 2011 by Simon Connah – 2 Comments

I have just spent the best part of my evening getting to grips with Arch Linux and I have to say it was an absolute pleasure. If you are interested in getting yourself a perfect Gnome 3 setup on your computer then hopefully this article will tell you all you need to know.

I first of all installed Arch Linux using the net install media so as to get the latest packages right from the get go. If you have a reasonable internet connection I highly recommend that you follow this path.

I won’t cover the initial installation as that is covered already by the excellent installation manual. The only thing I will say is that if you get errors about your locale you may need to add the following to your ~/.bashrc file:

export LANGUAGE=en_GB.UTF-8
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8

of course you’ll need to substitute the locale for the one that you want to use (the British one is used in the above example). This didn’t happen on my second install so it could be down to me getting something wrong on my first attempt.

Once you have completed the instructions in the installation guide we can move on to getting Gnome 3 installed and configured.

The first step is to create a non-root user for your own use and to also install the sudo command. The easiest way to create a new user is to use the adduser command.

adduser

Just follow through the commands choosing the default for all options other than the username, additional groups and your full name. For the additional groups section add the following exactly as shown:

audio,lp,optical,storage,video,wheel,games,power,scanner,floppy

this allows the user to use the specific software in each category. If you don’t have a floppy disk drive in your computer you can leave that group out.

I highly recommend that you follow my guide on getting ntpd installed before going further with this tutorial.

Now that we have ntpd properly configured we can move on to getting X11 and Gnome installed and working.

Installing X11 is a trivial process and simply consists of running the following command:

pacman -S xorg-server

you’ll also need to install the correct graphics drivers for your card. You have three options based on the type of graphics card that you have (there maybe more options but I doubt many people have a graphics card from a different manufacturer). These are listed below:

xf86-video-ati
xf86-video-nvidia
xf86-video-intel

pick the one that matches your card and install it using the following command:

pacman -S xf86-video-ati

obviously you’ll need to substitute the ATI drivers if you have a graphics card made by Intel or Nvidia.

Now that X11 is installed we can move straight on to getting Gnome 3 installed and configured. Install all the requirements as follows:

pacman -S gnome gdm dbus ttf-liberation

and when pacman asks you which packages to install just press return to select all of the options.

Now all you need to do is add dbus and gdm to your daemons configuration option in your rc.conf and away you go!

DAEMONS=(... dbus gdm)

Note: make sure dbus and gdm are the last two items in your DAEMONS list.

Congratulations, you should now have a fully working Gnome 3 install on your Arch Linux box. Any other customisation you wish to do is down to you.