cgoldberg / xvfbwrapper

Manage headless displays with Xvfb (X virtual framebuffer)
Other
295 stars 52 forks source link

support for args upon initialization of Xvfb instance #40

Open leej3 opened 4 years ago

leej3 commented 4 years ago

Hi, thanks for the great tool.

I am wondering if you are willing to support extra arguments. To the wrapper upon initialization.

My use case is to pass arguments that are not a key value pair following the pattern '-'. Specifically I would do:

with Xvfb("+iglx") as xvfb:
    run_x_command_requiring_glx_extension()

Not a big deal. Currently I can resort to:

xvfb = Xvfb()
xvfb.extra_xvfb_args += ['+iglx']
xvfb.start()
run_x_command_requiring_glx_extension()
xvfb.stop()

It might be nice though. Or more generally making it more explicit in the documentation how one can deal with adding arguments that do not follow the pattern "Xvfb -key value"

EDIT: I see this is along the lines of #13. Apologies, I checked issues but not pull requests

leej3 commented 4 years ago

@ranasats this pattern solves your issue. You can't use the context manager as is to do what you want though.