ponty / PyVirtualDisplay

Python wrapper for Xvfb, Xephyr and Xvnc
BSD 2-Clause "Simplified" License
714 stars 78 forks source link

Resizable Xephyr window in PyVirtualDisplay #29

Closed sdaau closed 5 years ago

sdaau commented 6 years ago

Not sure if this is exactly a bug, but I just wanted to document this:

I had wanted a resizeable window when I use PyVirtualDisplay - and it turns out it is a relatively easy hack - simply add this line in /usr/local/lib/python2.7/dist-packages/pyvirtualdisplay/xephyr.py (tested on Ubuntu 14.04):

    @property
    def _cmd(self):
        cmd = [PROGRAM,
               dict(black='-br', white='-wr')[self.bgcolor],
               '-screen',
               'x'.join(map(str, list(self.size) + [self.color_depth])),
               '-resizeable',   # add this line
               self.new_display_var,
               ]
        return cmd