Installing Xorg and KDE on Arch Linux

10 Jan

As I promised in an earlier blog entry, here are the steps to installing Xorg and KDE on Arch Linux.

I am making the assumption that you have just completed your installation of Arch Linux

When you boot up your machine, you’ll be brought into the login screen. Login as root.

The first thing you should do is sync all your pacman software lists. This is accomplished by running

pacman -Syy

Here’s what it’ll look like when it’s completed

Now lets install Xorg, which is simply done by doing

pacman -S xorg
, which is choosing to instal the xorg group.

It’ll list the packages of the xorg group, and as if you want to install all the content (just say Y)

Now it’ll list all the packages being installed, and you’ll say Y to proceed with the installation.

Yawn.. It’s installing:

Yay, back at the prompt after everything installed.

Now lets install the KDE group of packages, which is easily done by running

pacman -S kde

We’ll again be given a list of everything in the group, where you’ll put Y to install.

You’ll then be asked if you want to proceed with the installation, where you’ll happily type Y.

Awesome, it all installed (but wait, there’s more). Back at the prompt now.

We’ll have to configure our default runlevel to boot to init 5, and also configure our default login manager to KDM instead of xdm. This is done by editing /etc/inittab with

vi /etc/inittab

Scroll down using your down key (or your j key since we’re using vi) until you’re on the i in the line id:3:initdefault:, you’ll then press i, and put in a # to comment out the line. Now press the esc key, and go down to the # in front of the i in the id:5:initdefault: line, and press the x key. This should remove the # from that line. Here is a before and after of what it should look like:

Now press the down arrow, or the j key until you’re on the x in the line, x:5:respawn:/usr/bin/xdm -nodaemon. Press the i key, and enter in a # to comment out the line. Now go down to # in front of the x in the line #x:5:respawn:/usr/bin/kdm -nodaemon and press your x key, which should remove the # thus uncommenting the line. Here’s a before and after:

Now hold the Shift key, and press ZZ. This will save and close the vi editor.

We’ll now edit the starting daemons in /etc/rc.conf to add the hal daemon. We’ll using

vi /etc/rc.conf
like below

When in the vi editor go down using the down arrow, or j key until you’re on the line that starts with DAEMONS=. Now navigate to the blank space after syslog-ng using your right arrow key, or your l (small L) key. Press i (to enter insert mod) and type in hal (hal plus a space afterwards) so your modifications look like this before and after:

Note: This is important as if you don’t start the hal daemon you’ll most likely not have any Keyboard or Mouse when your Xorg launches when you boot into runlvl 5.

Now press the esc key (to get out of insert mode) and hold the shift key, and press ZZ to save and exit.

Now we’re going to create a user (since by default you cannot log into your KDE installation with the root account).

This is accomplished by running the following commands:

useradd (username) -d /home/(username) (adds the username, and sets home directory to /home/username)
passwd (username) (change password for newly addded user)
mkdir /home/(username) (creates the home directory for newly added user)
chown (username):(username) /home/(username) (sets the proper permissions for the newly created home directory).
Please see example below.

Now reboot your machine, and you’ll be booted into a very nice KDM screen where you’ll put in your new users name, and password.

And you’l then be rewarded with an awesome KDE Installation.

If you have any questions or problems please let me know, and I’ll help you out.

If you want one for GNOME, Enlightenment or another DE, please feel free to comment (they are quite alike, with only a few modifications).


I am ben kevan.. Well yeah. .that's about it.

15 thoughts on “Installing Xorg and KDE on Arch Linux

  1. I prefer nano instead of vi. It’s really simplier, because you can simply type and navigate like in a graphical editor.
    Second, a pacman -Su should be used to update all packeges, when Arch wasn’t installed through a net install.


  2. Pingback: Links 12/1/2010: Arch Linux Highlighted, Many New GNU/Linux Devices | Boycott Novell

  3. Ben, it is great seeing an Arch linux tutorial here :)

    I switched 2 days ago from openSUSE to Arch linux and i will be staying with that distro for as long as possible, fast, eats less memory than the same setup of running applications in openSUSE 11.2, i got plymouth at bootup with nvidia proprietary drivers, and the pacman, one of the greatest package managers out there.

    I recommend arch to everyone except newbies since there is some setting up at the beginning.

  4. Hey Bender,

    Awesome news. Although I run Arch Linux on a computer at home my primary work computer is still openSUSE, although I’ve considered switching just the fun of it.

    Biggest thing is the rolling updates.. I haven’t yet used Arch long enough at home to convince me to run my daily used machine at work that the rolling updates won’t break my machine.

    Although.. On my daily use work machine with openSUSE, I use the Factory KDE Repositories :o)

    I’m interested in knowing what DE you’re using on your Arch Linux installation.

  5. THANK YOU SO MUCH, I’ve tried installing Arch bout 10x over the past 2 months, even printed out the 80+ page install manual, beginners guide and some “tips and tricks” from other sites.. and still had SOOOOOOO many problems.. at various times, either something was “missing”, my typing was wrong, syntax, missed something small, whatever it was, (of course i’m sure it’s NOT arch’s fault) but your post here, got me thru to installing a complete arch system.. but.. it was a LONG TIME (*HOURS) and i have broadband, triplecore 2.1ghz, 4gigs ram, 500gig hd, etc. and it was alot more “work” to get everythign the way I like it.. and in my opinion (ill get flamed for this) Kubuntu 9.10 w/lotsa tweaks (from other sites ive found) FLIES on this machine, while Arch was just “responsive” so after all these tries , lots of cursing, etc, I finally got arch on here, read the wikis, forums, etc.. and was not impressed as I thought it would be.. (kinda a let down really, kind of like the movie “the Knowing” when i got to the ending, i was what the heck? give me my time back) so back to kubuntu 9.10 (made a remastersys dvd user backup) and voila here I am.. I’m sure its an amazing distro, maybe I needed to read more, or dig deeper into tweaks, speed optimizing, etc.. Thanks for your post, its the ONLY advice that EVER worked (beats “you arent ready for arch, you don’t deserve arch, go back to ubuntu, read the manual, read the wiki, use google and the tirade of other elitist remarks I’ve received in the forums, IRC etc)Thanks again!!!

  6. Pingback: Installing Arch Linux on an Existing LVM Partition | Ben Kevan's Blog

  7. In Arch Linux instead of editing /etc/inittab simply add kdm to DAEMONS in /etc/rc.conf:

    DAEMONS=(syslog-ng network netfs crond hal kdm)

    This solution is much better…

  8. I am using plain KDE, i used KDEMOD for a while but found not much difference (maybe it ate even less memory? ). For now it is quite stable but i get the bug with dolphin where it stalls for couple of seconds.
    Had some problems with shaman from kdemod repo but i went back to plain KDE from official Arch repo since KDE 4.4 is so near :)

  9. I was having a hard time deciding on whether to use group xorg. I solved that problem by following that particular step. On Daemon example you have a hypen and not an = sign, as I have on my archlinux example. But I used Nano editor, so maybe that is the reason for the difference. I thought, I had added a group during initial configuration, so I skipped that step too. Still I like the step by step breakdown. It makes it much easier for a newbie to arch linux.

  10. Vadim thanks for your comment also. I solved my no connection with the internet as soon as I followed your suggestion.

  11. We would like to thanks for the efforts you have put in writing this Homepage. I very hoping the same high-grade Homepage post from you in the upcoming also. Actually your creative writing abilities has inspireded me to get my own HP now. Actually the blogging is spreading its wings very rapidly. Your write up is a wonderfull example of it.Regards Tom

  12. Hi!

    Would you please make a tutorial that details how to get Gnome 3 installed and running from a plain, core installation of Arch? Thank you so much! :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>