[pygtk] set xdisplay for Window object within pygtk application

Jens Nie JNie at RosenInspection.net
Tue Nov 4 19:50:27 WST 2008


Hi everyone.

How can i set the xdisplay id within a running pygtk application to a different display?

I am working on a jobmanagement system which should be able to handle gui applications correctly. In order to achive this I am starting a VNC-server with a certain display id and authority file containing the MIT-MAGIC-COOKIE. Now I want to start a new application with its stdout and stderr redirected into Textviews which are part of a notebook in a gtk.Window. This window should of course pop up in the VNC-Servers display not on my local one. My current way to inform every piece of code in my software is to set the DISPLAY and XAUTHORITY environment variables within my worker application as early as possible (before instantiating the Window), which works well for the forked application to execute, but not for the gtk.Window always showing up on my local display.



More information about the pygtk mailing list