x-dwm

How to install dwm in Arch Linux


I installed dwm 6.0 using the file provided here and then...

# make install
# dwm

But running "dwm" gives error: "dwm: cannot open display". I tried "exec dwm", but it starts a new login dialog, basically a new session.

Note: I installed a display manager, and I'm sure it's not a graphics card installation problem, because I tried the "awesome" window manager package and it worked.


Solution

  • First, you will need to install X server and Git (as root)

    pacman -S xorg-xinit xorg git
    

    Change directory to /usr/src because you want this to apply to all users:

    cd /usr/src
    

    As root, clone suckless software such as dwm (window manager), st (recommended terminal), and dmenu (simple application menu)

    git clone git://git.suckless.org/dwm
    git clone git://git.suckless.org/st
    git clone git://git.suckless.org/dmenu
    

    Change directory into each one, and compile them:

    cd dwm ## Do this step also with st and dmenu
    sudo make clean install
    

    Add a new user that is under the users group (as root):

    useradd -m -g users ari
    passwd ari
    

    Log out, log in as new user, and execute:

    <favorite text editor> .xinitrc
        from there, add "exec dwm" into the file, save, and exit
    

    Start your session with:

    startx