How to install dwm in Arch Linux

Omar Awamry picture Omar Awamry · Jul 7, 2015 · Viewed 18.1k times · Source

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

# make install
# dwm

but running "dwm" gives error: "dwm: cannot open display" 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 "awesome" window manager package and it worked.

Answer

Ari Shashivkopanazak picture Ari Shashivkopanazak · Sep 30, 2019

first, you will need to install X server & git

# pacman -S xorg-xinit xorg git

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

$ cd /usr/src

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

# useradd -m -g users ari
# passwd ari

logout, login 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