Install Suckless Dwm in Debian
I was trying to install dwm in Debian 12 which is already having XFCE Desktop. From the suckless website I cloned the dwm repo
git clone git://git.suckless.org/dwm
And the changed to dwm
to compile
Fixing missing Xlib.h error
raja@debian ~/s/dwm (master)> make
cp config.def.h config.h
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"6.5\" -DXINERAMA drw.c
drw.c:5:10: fatal error: X11/Xlib.h: No such file or directory
5 | #include <X11/Xlib.h>
|
with
sudo apt install libx11-dev
Fixing X11/Xft/Xft.h
raja@debian ~/s/dwm (master)> make
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"6.5\" -DXINERAMA drw.c
drw.c:6:10: fatal error: X11/Xft/Xft.h: No such file or directory
6 | #include <X11/Xft/Xft.h>
| ^~~~~~~~~~~~~~~
with
sudo apt install libxft-dev
Fixing
raja@debian ~/s/dwm (master)> make
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"6.5\" -DXINERAMA drw.c
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"6.5\" -DXINERAMA dwm.c
dwm.c:40:10: fatal error: X11/extensions/Xinerama.h: No such file or directory
40 | #include <X11/extensions/Xinerama.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
with
sudo apt install libxinerama-dev
Then final make attempt went without any issues.
raja@debian ~/s/dwm (master)> make
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"6.5\" -DXINERAMA dwm.c
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"6.5\" -DXINERAMA util.c
cc -o dwm drw.o dwm.o util.o -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft
and to install sudo make clean install
BTW I started using fish
shell, it is awesome. You should try it.
Hope it helps.