Install and configure xorg and dwm on arch linux

by Tonylog

This is a tutorial on how to install and configure dwm on arch linux. Given that dwm runs on X, as most window managers do, there is a guide on how to install Xorg on arch as well. Both, will guide you through step by step in an hopefully easy way.

Installing all packages myself on arch linux I thought i might as well try something new and adventurous. Looking around the web I found a few enthustiac programmers that use tiled window managers. Researching i found that the one for me is dwm.

Main characteristics of dwm are size, it weighs less than 10 MB dependencies included, and possibility of customisation, given that it is written in C and that its code its very readable. Going to the official website of dwm I found this description:

dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. Either layout can be applied dynamically, optimising the environment for the application in use and the task performed.

So far it sounds very good! Light, fast, few dependencies. Regarding the customisation bit……every time a change is made you need to recompile and reinstall. It may seem a bit crazy, however, thinking about it:

Ok let me take dwm for a spin.

When installing arch linux, no Xorg is shipped with it so before installing dwm, Xorg has to be installed and configured. Fairly straight forward….

pacman -Sy xorg

Once xorg is downloaded and installed we need to configure it. There are many tools around but the favourite one  in the arch community is hwd

pacman -S hwd

hwd is a program that automates the production of the xorg.conf file. This configuration file is the most important as it sets the drivers and paths for:

Once hwd is installed we need to create the xorg.conf file with:

hwd -xa

This command will create two xorg.conf files:

The moment of truth

To verify the xorg files we need to run X with a different xorg.conf, to achieve this we need to use the command:

X -config name_of_the_conf_file

So let’s do it!

cd /etc/X11

X -config xorg.conf.vesa

The TWM window manager should start up. To run your card’s specific conf use its xorg file, xorg.conf.ati, xorg.conf.nvidia or xorg.conf.trident (in my case :) ). Once, you are certain of having a working conf file rename it to xorg.conf (eg. mv xorg.conf.vesa xorg.conf) so that when you startx it is automatically loaded.

Xorg is now configured. Let’s install dwm

pacman -S dwm

When done we need to set dwm to startup when we invoke startx instead of TWM, to achieve this we need to edit the file xinitrc so from the home directory:

cd /etc/X11/xinit

vi xinitrc

Here we need to find the line that says:

#Start some nice programs
twm&
xclock …
xterm …
xterm …
exec xterm…

Comment the above lines and add:

exec dwm

Now the command startx will start dwm as your window manager.

Resources:

10 Comments

Send your comment for the article
  1. Great post! I’ve also noticed a huge craze in Facebook quotes, there were a few sites that would get millions of likes just on a single quote.

    Comment by Drake Quotes Windows XP Mozilla Firefox 3.0.14 — 20 August 2011 @ 00:29
  2. It’s a pity you don’t have a donate button! I’d definitely donate to this fantastic blog! I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this site with my Facebook group. Talk soon!

    Comment by Petrina Windows NT Internet Explorer 8.0 — 20 September 2011 @ 07:03
  3. excellent material from your site,,great stuff
    i will most certainly vist again..
    thankyou

    Comment by lol UNITED STATES Windows XP Mozilla Firefox 3.0.8 — 5 October 2011 @ 01:36
  4. Useful Site…

    [...]I read your post it had become very nice.[...]…

    Trackback by pacquiao vs marquez 2008 Windows XP Opera 9.64 — 5 November 2011 @ 07:58
  5. I’m a extended time watcher and I just considered I’d drop by and say howdy there for your quite 1st time.

    Comment by metal roofing ontario KAZAKHSTAN Windows NT Safari 532.2 — 1 March 2012 @ 23:55
  6. nice works

    Comment by hendra Series 60 Opera Mini 9.80 — 13 April 2012 @ 15:21
  7. where do i put my code???i have no idea how to do it

    Comment by Kamasutra Windows XP Mozilla Firefox 3.5.3 — 14 April 2012 @ 07:23
  8. Large cosmetic position websites are generally the varieties of web pages i liek you would like to look at. However, this is what web page is really reliable exceedingly. keep upt he awesome tasks! thanks again!

    Comment by Buy FFXI Account CHILE Windows NT Safari 532.2 — 8 May 2012 @ 01:06
  9. I simply want to tell you that I am all new to blogging and absolutely liked you’re web blog. Very likely I’m planning to bookmark your blog post . You absolutely have wonderful stories. Cheers for sharing your website.

    Comment by Samual Frutiger Windows XP Internet Explorer 7.0 — 27 April 2013 @ 20:03
  10. You are my inhalation, I possess few web logs and sometimes run out from brand :). “Actions lie louder than words.” by Carolyn Wells.

    Comment by Winfred Breuer FRANCE Windows XP Mozilla Firefox 3.5.3 — 6 May 2013 @ 06:28

Leave a comment