Archlinux quick install guide

2016-01-14    Filed under linux, Tags linux archlinux

Archlinux logo

This is just a brief description of the steps to perform after an Archlinux install to get a fully functional Gnome desktop. These are very specific for my usual setup. for a general discussion see the Beginners' guide or the Installation guide

Base install

The following steps are to be done inside the initial chroot during install.

Initramfs creation

Before creating the initramfs, edit /etc/mkinitcpio.conf to add the necessary modules for KMS (depending on graphics adapter of the systems). Use lspci to know which one applies. For example nouveau, i915 or radeon. Also include the 'resume' hook to be able to boot from hibernate.

HOOKS="base udev resume autodetect modconf block filesystems keyboard fsck"

Then build the initramfs:

sudo mkinitcpio -p linux

See Power management and mkinitcpio in archwiki.

Install bootloader (GRUB)

To install GRUB for BIOS boot in MBR disk:

pacman -S grub
grub-install --recheck /dev/sda

Then edit /etc/default/grub to add support to resume from hibernation (suspend to disk). Also change the GRUB_TIMEOUT to reduce boot time:


Finally build the Grub configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

For other setups (UEFI, etc) see grub.

Network Manager

Install NetworkManager before reboot. This way network is available after reboot without needing to use dhclient and you can go on installing the rest of the packages:

pacman -S networkmanager
systemctl enable networkmanager

Create your user account

I prefer Zsh to Bash. For administration I like sudo.

pacman -S sudo zsh

Configure sudo so that wheel group can execute commands. Edit /etc/sudoers and uncomment this line:

%wheel ALL=(ALL) ALL

Add user:

useradd -s /bin/zsh -G wheel <myusername>
passwd <myusername>

Disable PC speaker beep

PC speaker beep is annoying, so disable it. Create file /etc/modprobe.d/nobeep.conf with content:

blacklist pcspkr

See Disable PC speaker beep.

Finish base install and reboot

Exit the chroot, umount root and home partitions:

umount /mnt/home
umount /mnt

After rebooting, login to your account and try to use sudo to check that everything is properly configured.

Some basic utilities

If you didn't install NetworkManager you will need to know your network interface (assuming ethernet) to activate it. Use ip l to kget the name:

ip l
sudo dhclient <interface>
sudo dhclient enp4s0

Before installing the desktop, I like to setup some basic utilities. The vim package can be later changed to gvim when a desktop is available.

sudo pacman -S vim ctags htop strace lsof git
sudo pacman -S unrar unzip zip
sudo pacman -S python-virtualenvwrapper keychain

If you have a VPN you can install networkmanager-openvpn and edit /etc/hosts.


To install packages from the AUR yaourt is very useful. Download yaourt and package-query from AUR to install them manually:

cd /tmp
curl -O
curl -O
tar xzvf package-query.tar.gz
tar xzvf yaourt.tar.gz

Install the compiler tools:

sudo pacman -S base-devel

Edit /etc/makepkg.conf:

PACKAGER="User Name <>"

Compile the package-query and yaourt packages:

cd package-query
makepkg -s
sudo pacman -U package-query*.xz
cd ../yaourt
makepkg -s
sudo pacman -U yaourt*.xz


SSH and firewall

sudo pacman -S openssh ufw
sudoedit /etc/ssh/sshd_config
    (habilitar RSA authentication)
sudo systemctl enable sshd
sudo systemctl start sshd
sudo ufw enable
sudo ufw allow ssh
sudo ufw limit ssh


Install NTP:

sudo pacman -S ntp

Setup the server in /etc/ntp.conf, for example:


Start the server, wait some seconds and check it is running:

sudo systemctl enable ntpd
sudo systemctl start ntpd
ntpq -p

NFS client + autofs

For ethernet gigabit networks I like to use NFS and autofs. Add the hostname and IP of your NFS server to /etc/hosts.

sudo pacman -S nfs-utils
sudo systemctl enable rpcbind.service
sudo systemctl enable
sudo systemctl enable
sudo systemctl start rpcbind.service
sudo systemctl start
sudo systemctl start
sudo pacman -S autofs
sudo systemctl start autofs
sudo systemctl enable autofs

Edit /etc/autofs/auto.master to uncomment the line starting with "/net". This way you can find your NFS exports in /net//.


Install CUPS and Avahi (to be able to automatically detect new printers).

sudo pacman -S avahi
sudo systemctl enable avahi-dnsconfd.service
sudo systemctl start avahi-dnsconfd.service
sudo pacman -S cups cups-filters ghostscript gsfonts gutenprint
sudo systemctl start cups-browsed.service
sudo systemctl enable cups-browsed.service
sudo systemctl enable org.cups.cupsd.service
sudo systemctl start org.cups.cupsd.service

To give permissions to an user to be able to add/remove and administer printers with CUPS and from the web http://localhost:631 interface:

sudo groupadd printadmin
sudo gpasswd -a <username> printadmin
sudo gpasswd -a <username> lp

Edit /etc/cups/cups-files.conf and add printadmin:

SystemGroup sys root printadmin

Then restart CUPS:

sudo systemctl restart org.cups.cupsd.service

Before adding printers, ensure you have the necessary drivers installed. See epson drivers and canon drivers.


sudo pacman -S samba

Desktop install


Install Xorg server:

sudo pacman -S xorg-server
sudo pacman -S mesa-vdpau libva-mesa-driver
sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol

Depending on your graphics hardware you will need any of these packages. For Nvidia:

sudo pacman -S xf86-video-nouveau

For ATI Radeon, although kernel module is called radeon, the package containing the driver is called 'ati':

sudo pacman -S xf86-video-ati

For Intel (i.e. i915):

sudo pacman -S xf86-video-intel

Additionally, if your laptop has a touch pad:


Configure your locale for X11:

sudo localectl set-x11-keymap es

Add some fonts (can be improved with infinality, see later):

sudo pacman -S ttf-dejavu ttf-droid ttf-ubuntu-font-family ttf-liberation


To install Gnome Shell desktop with GDM display manager (necessary to be able to lock screen):

sudo pacman -S gnome gnome-extra
sudo pacman -S gdm
sudo systemctl enable gdm
sudo systemctl start gdm

The keyring isn't installed by default:

sudo pacman -S gnome-keyring seahorse

Don't install keyring because gnome-keyring provides the same funcionality inside Gnome. With keyring the gnome-keyring can't work as expected (id_rsa ssh key isn't unlocked with login, for example).

To use the dark theme in gnome-terminal (it doesn't recognize GTK_THEME environment variable):

yaourt -S gnome-terminal-dark-variant

Install Nemo (for recursive searches in remote paths without requiring a previous index)

sudo pacman -S nemo

KDE Plasma 5

To install KDE Plasma 5 desktop with KDM display manager:

sudo pacman -S plasma kde-applications
sudo pacman -R kdegames
sudo systemctl enable kdm
sudo systemctl start kdm

If you don't want akonadi, this is a way to avoid loading it:

yaourt -S akonadi-fake

To integrate graphically the KDE4, GTK2 and GTK3 applications add:

sudo pacman -S breeze-kde4
yaourt -S gnome-breeze-git

LightDM display manager

With the GTK greeter:

sudo pacman -S lightdm-gtk-greeter

With the KDE greeter

sudo pacman -S lightdm-kde-greeter

Then edit /etc/lightdm/lightdm.conf:

# or for KDE

Enable and run it:

sudo systemctl start lightdm
sudo systemctl enable lightdm

To configure themes from KDE control panel use:

kcmshell4 kcm_lightdm

Infinality fonts

To install Infinality it is necessary to add the "bohoomil" repository:

sudo -i
    dirmngr < /dev/null
sudo pacman-key -r 962DDE58
sudo pacman-key --lsign-key 962DDE58

Edit /etc/pacman.conf and add the repository:

Server =$arch
Server =

Install Infinality (answer yes to the three questions to substitute packages):

sudo pacman -Sy
sudo pacman -S infinality-bundle

Install improved fonts for Infinality:

sudo pacman -S otf-cantarell-ib ttf-dejavu-ib \
    ttf-droid-ib ttf-ubuntu-font-family-ib


These are some of my favourite applications to install:

yaourt -S gnome-terminal-dark-variant
sudo pacman -S firefox firefox-i18n-es-es gst-libav
sudo pacman -S geary
sudo pacman -S libreoffice-fresh libreoffice-fresh-es
sudo pacman -S hunspell-en hunspell-es aspell-en aspell-es
sudo pacman -S gimp inkscape darktable hugin luminancehdr
sudo pacman -S vlc smplayer
sudo pacman -S gnome-maps
sudo pacman -S calibre fbreader
sudo pacman -S pavucontrol
sudo pacman -S quodlibet
sudo pacman -S libvirt ebtables dnsmasq bridge-utils qemu
sudo pacman -S gnome-boxes
sudo pacman -S virtualbox net-tools

To install Thunderbird with Enigmail support (GPG crytofraphy) :

sudo pacman -S thunderbird thunderbird-i18n-es-es
gpg --keyserver --recv-keys DB1187B9DD5F693B
yaourt -S thunderbird-enigmail

Drivers for Canon iR ADV C7055/7065

2016-01-13    Filed under linux, Tags linux printers

Printer drivers for Canon iR ADV C7055

read more

Epson WF-2530 drivers for Linux

2016-01-13    Filed under linux, Tags linux printers

Printer drivers for Epson WF-2530

read more

Configure PostgreSQL with PostGIS

2016-01-13    Filed under linux, Tags linux postgresql database

Configure PostgreSQL with PostGIS in Archlinux.

read more

Vim plugins the easy way

2014-08-29    Filed under linux, Tags vim

When Vim plugins are installed the standard way, all files that belong to different plugins get mixed together in the .vim directory. This makes very difficult to keep the system clean and updated, or to remove a given plugin.

There are various solutions to avoid this problem and keep each plugin's files in separated directories. The most popular are Pathogen and Vundle.

I like Pathogen more, because it allows to install a plugin from command line without editing any configuration file (no need to touch vimrc except for optional customization). To remove a plugin only takes to remove de ...

read more

Sieve Plugin for Roundcube

2014-01-31    Filed under linux, Tags server email

Roundcube allows the management of email filter rules through the managesieve plugin. This plugin connects with the dovecot-sieve server and update user filters using a standard protocol. This way the user doesn't have to edit the ~/.dovecot.sieve files directly in its home directory, avoiding possible syntax mistakes.

Filters can be managed throug Roundcube -> Configuration -> Server config -> Filters.

With my setup (Nginx, php5-fpm and Dovecot) these are the necessary steps to configure it.

Activate managesieve server

Install managesieve:

sudo apt-get install dovecot-managesieved

Edit file /etc/dovecot/conf.d/20-managesieve.conf:

service managesieve-login {
  inet_listener sieve {
    port = 4190
service managesieve {
protocol ...
read more

Installing linux in an ASUS X551CA

2014-01-23    Filed under linux, Tags linux

This laptop works great under linux. I installed Lubuntu on it and everything went right but two things: wifi and BIOS booting. Both can be solved so I am happy with the purchase. The only drawback i found is that ethernet adapter is only 100 MHz and not gigabit. Too slow nowadays and not what I expected. Nothing that can't be solved with a cheap USB3 to ethernet adapter.

I will describe how to overcome this "small" problems (It took me hours to find out how, searching forums and wikis... thanks to everybody).

Booting with UEFI BIOS

The first ...

read more

LXDE configuration

2013-03-06    Filed under linux, Tags lxde

Fine tuning the LXDE desktop in Archlinux.

Download and install lubuntu-artwork package from AUR. Then select controls "Lubuntu-default", icon theme "Lubuntu", window decorations "Lubuntu-default", and font anti aliasing with subpixel (light optimization):

yaourt -S lubuntu-artwork

Change menu from main menu to /usr/share/lubuntu/images/lubuntu-logo.png.

Install Openbox config utility. Enter the utility and select Lubuntu-default for the theme. Uncheck "animate windows on minimize" in appearance tab. Activate "switch desktops when moving a window past the screen edge". Set two desktops.:

pacman -S obconf

After installing Thunderbird, add FireTray extension to have a mail notification icon in the system ...

read more

Previewing restructuredtext documents

2013-03-06    Filed under linux, Tags markup web python

These are instructions to install restview, that is a software to quickly preview the restructuredText documents created with a text editor in a browser. My Linux distribution is Archlinux, so you may have to adapt some commands for yours.

Install docutils (it is the package that process the restructured text to convert it to html):

pacman -S python2-docutils

Install pygments:

pacman -S python2-pygments

Install the restview previewer:

yaourt -S restview

Now it is necessary to make docutils aware of a new directive (like a new command) that we will use to markup pieces of source code in the restructured text ...

read more

Pidgin with Sametime (meanwhile) protocol

2013-03-03    Filed under linux, Tags archlinux

These are brief instructions to make Pidgin messaging application to work with Lotus Sametime (also called Meanwhile) protocol under Archlinux.

There is a nice page about Pidgin in the Archlinux documentation, this is only a summary for the particular case that I face every time I update my Archlinux system. The Sametime protocol is not included in the Pidgin package that comes in the Archlinux distribution (I guest because license issues or something like that). I create a custom package that includes Sametime, but every time I update my system the pidgin package is updated with the one included in ...

read more