I'm trying to use the x11 protocol in a library I'...
# getting-started
z
I'm trying to use the x11 protocol in a library I'm making and I'm wondering how I can make tests for it. I need to have an x server running, is there some way I can do that automatically through the test lib?
e
sure, you can start a Xvfb. although you'll have to take care in choosing a display number to avoid collisions
oh right, I'm not sure since what version, but with new enough xorg-xserver, you can run
Xvfb -displayfd N
and it'll choose a free display number on its own and print it to file descriptor
N
maybe not the best way to do it, but getting Gradle to auto-start and stop a
Xvfb
for tests is pretty easy
👌 1
👍 1
z
Oh thats perfect, thank you