Welcome to the first part of my mini-guide for creating a killer KDE4 desktop with Arch Linux. In this multi-part article, I’ll first give you a general overview of installing this awesome distribution, and then in subsequent parts I’ll kick it up a notch and walk you through installing the best KDE features out there and even clone some features of other KDE distro’s while we’re at it.
Many of you may remember my “Arch Linux Experiment” series, where I evaulated the Arch Linux distribution and found it to be outstanding. However, I learned that many of you were following along with me, and I feel that I’ve let you down. That series didn’t really contain too many helpful tips as far as installing Arch, so to anyone that was following along with me or just wants to set up Arch, this series is for you! Anyway, let’s get started.
First, Some General Information
First things first. What is Arch Linux? Arch is a Linux distribution that leaves the majority of the set up and configuration up to you, the user. Nothing is assumed and everything is up to your discretion. Once you have it installed, it will last as long as your hard drive, since it will pull in the latest software with each update so you won’t have to install a new distribution release every six months like other distro’s. This is known as a “rolling release” methodology, and it’s VERY rewarding. The downside is that it can be difficult to set up, but no worries – this series is intended to ease your pain.
The most important lesson to learn is to consult the manual whenever you get stuck, because Arch Linux has an amazing “Beginners Guide” that will help a great deal. It’s very good, and (along with the comments at this site) it’s where I learned everything I know about setting up Arch. Feel free to consult the Beginners Guide as we go along, and also feel free to deviate from my instructions as you wish since exploration and learning is the entire point. In fact, follow along with my instructions and the Beginners Guide, hopefully both sets of instructions will compliment each other.
Getting Started
Let’s get started. First of all, download the Arch Linux net install CD, whichever one happens to be the newest. Burn the ISO image to a CD (choose the option to “burn an image” in your burning program, not simply saving the file to a CD) and boot your computer from your newly created Arch disc. Make sure you back up your data before we continue if you have anything important on your hard drive, as it can be very easy during the install of Arch to overwrite something you didn’t intend to.
For the actual installation process, follow through with steps 1 and 2 of the Beginners Guide, as it does a better job than I could do explaining things. For the sake of comparison, on my install I chose the option to automatically partition my drive. (Which may be a misleading title since it still asks you to set the sizes for each partition). I gave 30GB to my root partition (you probably want at least 10GB there), 256MB for my Swap (I have 6GB of RAM and I don’t hibernate so Swap isn’t important to me) and I gave the rest to /home. If you have a laptop or use hibernation I recommend that you set out 2.5 times the amount of your RAM to be safe.
During the installation, make sure you look out for the option to set a password for root. It’s on the same menu that has a list of all the config files for you to edit, down toward the bottom. (It’s easy to miss). Also, if you dual boot with Windows, make sure that you pay attention to the grub.conf portion and uncomment any lines in the Grub config file pertaining to Windows (remove any # symbols in front of the Windows boot option in the file). Finally, when it comes time to install Grub, ensure you’re installing it on the root of the drive. (Ex. sda instead of sda1).
Setting Up X
If you want to have a graphical user interface (as I’m sure you do, otherwise you wouldn’t be reading this) there are some required packages that you’ll need. First, familiarize yourself with the Pacman command, which you’ll use to install packages with. See below for some examples of common functionality:
pacman -Sy (Refresh repositories)
pacman -Syu (Update all packages)
pacman -S packagename (Install a package)
pacman -Ss keyword (Search for packages matching keyword)
Now it’s time to install the packages required for an xserver. After logging on to your new system, run “pacman -Sy” to update the repositories, and then run the command listed below to install the basic X packages:
pacman -S xorg libgl xf86-input-evdev mesa xf86-input-keyboard xf86-input-mouse ttf-ms-fonts ttf-dejavu ttf-bitstream-vera hal dbus vim
Note: Add xf86-input-synaptics to that list if you use a laptop.
Some of those packages are required, and others are some I recommend. For example, you don’t need “vim” but it’s the text editor I find myself referring to several times throughout this article so you may as well install it unless you use something else. After that is all done, go ahead and refer to the section in the Beginners Guide that goes over selecting the proper video card driver and creating your Xorg.conf file. The information regarding that is too extensive for me to re-post here, and the beginners guide does a wonderful job.
Important: Make sure you add “hal” to your Daemons list in /etc/rc.conf or else you won’t be able to use your mouse or keyboard in KDE. See the Beginners Guide for more info.
Installing KDE
Installing KDE is easy, and I usually go with the packages contained in the following command to start things off:
pacman -S kdebase-workspace kdebase-konsole kdemultimedia-kmix kdesdk-kate kdebase-konqueror kdebase-dolphin kdebase-kfind kdebase-kappfinder
That command will install a BUNCH of packages. While it’s running, go and get something to eat, play videogames, or if it’s warm, go outside. Depending on your connection to the internet, it may take a while. When done, the basic packages for KDE, a text editor, terminal emulator, application menu, volume control and file search will be installed.
Create Your User Account
You could have done this part any time after installation. You should do it before you go any further in this guide though. Run the command (as root) adduser. Accept the default options. When it asks for which groups you want after the initial group (users) add yourself to the following groups (commas without spaces separate each one):
audio,lp,optical,storage,video,wheel,power
You may want to install sudo:
pacman -S sudo
Depending on your style of use and ideals about security, sudo will allow you to elevate commands to root level as required without actually logging in as root. After installing sudo, add your newly created user name to the /etc/sudoers file with the visudo command. (Don’t just edit the sudoers file by itself, or you may mess up the permissions). If you’d rather use vim to edit the file, try the command EDITOR=vim visudo to use that instead. (That’s actually what I do). See the beginners guide if you get hung up on the visudo command.
For the rest of this article and all others in this series, I will assume that you are logging in as yourself from now on and are using sudo to run commands as root. If not, adjust the commands accordingly.
Testing KDE
By now, you should have a working (yet very basic) KDE installation with a very minimal set of programs. Before we fire up X and get things going, there are some best practice checks we should do.
Let’s edit the .xinitrc file. First, let’s grab a copy and set it up in your home directory (make sure you are logged in as yourself and NOT root, “sudo” isn’t necessary here):
cp /etc/skel/.xinitrc ~/
Edit the file using your favorite text editor (I prefer vim personally) and change the file to look like this (sudo vim /etc/rc.conf):
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
# exec wmaker
# exec startkde
# exec icewm
# exec blackbox
# exec fluxbox
#
exec startkde
If you haven’t done so already, let’s add the daemons we need at startup by editing the /etc/rc.conf file with the command: vim /etc/rc.conf. Make the “daemons” line on the bottom look like this:
DAEMONS=(syslog-ng hal network netfs crond alsa)
Next, I recommend to reboot your machine with the “reboot” command, so we can make sure any daemons we’ve added will be ready. Then, after the reboot is complete enter the command “startx” as yourself. If KDE starts and you can control it with your mouse and keyboard, you’ve done it!
Wrapping Up
If everything has gone smoothly so far, let’s make X start on it’s own and present the KDE logon manager (KDM) when you start your machine. Edit the /etc/rc.conf file and make the daemons line look like the following:
DAEMONS=(syslog-ng hal network netfs crond alsa kdm)
In addition, you’ll want to ensure that KDM respawns when you log out. Edit your /etc/inittab file and make the end of the file look like this:
# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >& /dev/null
# End of file
That’s all for now. Stay tuned for the second part of this article in about a week or two, where we will get to do some really fun stuff and make your KDE desktop come to life. In fact, the second part should be way more exciting than this one was. See you then!
Note: If you notice any errors here let me know in the comments and I’ll correct it. Also, you can ask for help in the comments as well. I’m available to approve and answer comments each evening.
Arch “Ultimate KDE Desktop” Series History:
Click here to read part 1
Click here to read part 2

Your post is informative but one can download the excellent chakra distribution here: http://www.chakra-project.org/
I was going to suggest the same thing. Now, it is awesome to go through all the steps and really feel you “made” Arch work successfully. After doing it many times (I like to break my system) you find yourself wanting something you install and it’s ready to roll. Chakra kicks ass…and don’t feel you’re stuck with KDE. I have KDE on here, but I’m in XFCE right now. It’s awesome!
Chakra is pretty cool, but I like doing it all myself because I then would have a higher level of control over everything. Plus, you learn a lot going through the manual Arch install.
>since it will pull in the latest software with each update >so you won’t have to install a new distribution release >every six months like other distros.
Very often Ive had people ask me at our LUG’s installfests why Kubuntu (for example) has still version 0.99 of VLC instead of any of the three versions that have come out since or why Kpackagekit still shows Firefox v3.0 when 3.5 has been out for months?
This really has to be addressed by distros better.
If youre favorite program has a new version that came out, why shouldnt you be told and then guided through a simple process?
That will probably never happen with distros backed by a company, because they have to support the distro, and it’s hard when you have a “moving target” distro, as the company will never be sure which version of which packages are installed.
I used Kubuntu for years, but it’s sucking since kde 4.X, and I also wanted a rolling release distro. I’ve tried Arch, but didn’t like it. It was hours for every new thing I wish to do.
Then I tried sidux and loved it. It’s basically debian sid, which contains the latest version of packages (ubuntu is also based on sid, but freezes in a given period of time) plus it’s own repository, containing an optimized kernel plus other fixes for eventual broken packages.
I recommend sidux to everyone which was used to Kubuntu (sidux does not support gnome) and want a rolling release distro.
I’ve been playing with Sidux too. I will have an article about it posted at some point.
Why not just?
Pacman -Sy xorg kde alsa-lib alsa-utils alsa-oss fam
Add hal fam alsa kdm daemons to rc.conf
Install video driver if required and configure xorg
You are away
Glad to see another post promoting Arch!