If you still want to know how to install dmenu
from source code, here's some hint that I tried to install dmenu2 from source under xubuntu 20.04 focal. Dmenu2 is a patched version of dmenu. Which also works with dmenu of course.
The commands and explanations:
The bitbucket repo of dmenu2 uses mercurial, so...
sudo apt install mercurial
Check original dmenu
package details to see from which repository is installed
as mentioned dmenu
is a virtual package name so look for suckless-tools
:
apt show suckless-tools
The interesting line is:
APT-Sources: http://fr.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
And especially the universe
repository
Uncomment, if necessary, the line in /etc/apt/sources.list
(span your favorite editor)
sudo vim /etc/apt/sources.list
The line we are looking for is a deb-src
for the universe
repository, it might look like:
deb-src http://fr.archive.ubuntu.com/ubuntu/ focal universe
update the packages list
sudo apt update
and let the packaging magic do the rest, this will install all the needed dependencies to build the packages:
sudo apt-get build-dep suckless-tools
now simply let the build tools do the job:
cd path/to/cloned/dmenu
make
You should have an fresh compiled ./dmenu
in your local directory.
See inside the Makefile
the actions that will be performed:
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
To finally install it to the destination configured (PREFIX = /usr/local
in config.mk
)
sudo make install
Have fun!
Want even more fun? check rofi instead, a drop in replacement for dmenu, and many more.
Which is also packaged already:
sudo apt install rofi
ls | rofi -dmenu
Note, selecting 'suckless-tools' instead of 'dmenu'