Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

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

Monday, January 4, 2010

Logitech Travel Mouse issues under Ubuntu 9.10 (Karmic)

There are many issues related to Logitech blue-tooth mouse and other blue-tooth devices. It's been several months I have problems with my Logitech cordless laser mouse under Ubuntu 9.10 (karmic). It just stopped working after waking up my Lenovo T61 and I was not able to get it working without rebooting. Sure it is Ok when you use your computer only for browsing and there is nothing to restart but browser, but it is quite annoying if you have to restore your development environment that includes several heavy applications like eclipse with around 100 plug-in projects.

Simple google search gives around 15 000 results. Those results don't contain exact solution to solve my problem and I had to read a lot of them before I found couple comments that gave me a way to get my mouse back without required reboot.

After removing all bluetooth related software and installing bluez-gnome by

$sudo apt-get install bluez-gnome
I found exact steps to restore my mouse after waking up.

1. Modify hcid.conf file: change 'security' option to 'auto' and Add your device as

device MAC_ADRESS {
    name "Bluetooth Laser Travel Mouse"
}
where MAC_ADRESS is MAC address for your mouse which is usually printed on mouse

2. Press 'connect' button on mouse

3. Execute

$sudo hcitool inq
and you'll get something like
00:07:61:DE:7B:29 clock offset: 0x3389 class: 0x002580

4. Execute

sudo hidd --search
and after it says
Connecting to device 00:07:61:DE:7B:29
you'll get your mouse back