Install libX11-devel in dom0 for dmenu (i3)

Hello, I am setting up i3 with dmenu.

I’d like to “rice” dmenu and the easiest way to do so is with patches (.diff files that I’ve read through to ensure no scripts piped to bash).

It seems that the only way to add patches to dmenu is if you’ve compiled it from source; I have found no information on adding patches to the dmenu binary available with sudo qubes-dom0-update dmenu.

I’m running into a compilation error for dmenu-5.0 when I run sudo make clean install.

The compiler says fatal error: X11/Xlib.h: No such file or directory. Based on some stackexchange searches, it appears that the Xlib.h file is an “X11 headers” file, and that the compiler is looking for it in /usr/X11R6/include— which does not exist for me in dom0.

Additional forum searches indicate that the Xlib.h file is available in the libX11-devel or libx11-dev package. I’ve tried installing these with sudo qubes-dom0-update <package>, but there is no match for them in the repos.

Assuming I’m on the right track with respect to resolving this compiler error, how can I get the headers file? Should I trust the libX11-devel package for Fedora 33 from https://pkgs.org/download/libX11-devel?

Thanks.

So, are you trying to complie dmenu in dom0? Doing anything other than the bare minimum in dom0 is the standard. You should do the compilation inside a (secure) development qube and only then move the resut to dom0. Having unneed development packages increases your dom0’s attack surface.

Plus, the chances of you template having libX11 are greater (though I should note it is available in r4.0)

1 Like

Thanks @deeplow! Compiling in another VM makes so much more sense.

Notes (also to dmenu users in general):

  • I had to install several other packages (libxinemara-dev, libxft-dev). As the compiler complained about a missing file, I just searched the internet for something like “no such file: <file_name.h>”, and was able to figure out which package would supply that file
  • If you’re compiling software only once, it’s easiest to add the packages to a networked appvm and then compile.
  • If you’re compiling the same software many times over long timescales, it makes sense to: 1) install a necessary package in a TemplateVM; 2) shutdown the Template and start the compiler AppVM; 3) compile until you get another “missing package” error; 4) shutdown the AppVM and start the TemplateVM; and repeat.