Emulating screen in nixos test, xscreensaver

Hello,

I would like to introduce an option to the xscreensaver module. I have tested it on my personal machine (and it works), but I would like to get an automated test working before upstreaming it.

This option adds a handler which the user can script to respond to different events xscreensaver emits. However, xscreensaver is unhappy with the fact that there are no physical display in the nixos testing VM. I was told by someone on discord to use xvfb, but I wasn’t able to get that working.

The branch is here, I haven’t opened a PR.

Are there examples of using an emulated display in nixos test?
Thank you for your time :smiley:

Plenty, here is one for gnome, for example, but you can look through the NixOS tests directory in general, examples should be easy to find.

You probably want to import the generic xorg module.

The docs for the python objects you can use live in the NixOS manual, by the way, I found it was explained quite well. I wrote some extra hints here in case that helps, though they are a bit specific to my use case.

2 Likes