Wednesday, April 14, 2010

Using Tab Window Manager with VNC in Automatic UI testing

By default Ubuntu 9.10 - the Karmic Koala - using twm windows manager for displays created by vncserver command. But twm with default configuration requests user to select new window location by mouse and waited until that happened. It is real problem when you're trying to run UI tests and UI applications are started by build script. With default twm settings your testing session just hangs at point of creating window and you have to open display where your tests are running and make that damn click to keep your tests rolling it is Ok if you have one window and long running tests, but it is not working if your UI application starts many times during testing.

twm window manager allows to control this behavior by RandomPlacement variable in $HOME/.twmrc configuration file. To let your tests go without your attention just add line.

RandomPlacement

in your existing .twmrc file or create new one see [1] for other configuration parameters.

If that doesn't work you probably do not have twm installed by default, I faced that problem. It looked like everything is fine but I had no title bars for windows opened in vnc session. To fix that just install twn window manager using your favorite way to do it. I did it by

sudo apt-get install twm

After restarting vncserver everything is working like a charm.

[1] - Tab Window Manager Manual - http://www.x.org/archive/X11R6.8.0/doc/twm.1.html

No comments:

Post a Comment