PyVirtualDisplay
PyVirtualDisplay copied to clipboard
Set new session on created display
The way PyVirtualDisplay works now, the virtual X server is created on the same process group as the Python script.
One of the effects of this is that when sending, for example, SIGINT to the Python script the virtual X server also receives it and exits before the script can do any cleanup.
Adding start_new_session=True to the subprocess.Popen in AbstractDisplay would easily solve this and possibly other subtle edge cases, as it makes a lot of sense for the X server to be on it's own session.