Virtual Touch Events for XTEST

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 23 02:59:52 UTC 2017


On Wed, Feb 22, 2017 at 12:25:07PM +0530, Prakash P wrote:
> ​​
> Hi,
> 
> I want to create an virtual test environment for my web application. I got
> it working with the help of xvfb and running google-chrome inside it. I am
> able to send keytrokes and mouse events through the xdotool
> http://www.semicomplete.com/projects/xdotool which internally uses XTEST.
> 
> I do have some test cases where I have to send touch events to the chrome
> browser. Unfortunately the xdotool does not support sending touch events. I
> am unable to find any info about whether XTEST supports touch events or not..

it doesn't support touch events, so going down that route isn't possible.

> I tried creating a "virtual touch device" using user mode input subsystem
> "uinput" which works only on the logged in x-org session. I am able to send
> touch events [Code attached in the bottom].
> 
> But the Xvfb dont care about the virtual uinput devices the "xinput list"
> revealed only the following.
> 
> >sudo DISPLAY=localhost:2.0 xinput list

xvfb only initializes dummy input devices that don't do anything.

> *⎡ Virtual core pointer                          id=2    [master pointer
> (3)]⎜   ↳ Virtual core XTEST pointer                id=4    [slave
> pointer  (2)]⎜   ↳ Xvfb mouse                                id=6
> [slave  pointer  (2)]⎣ Virtual core keyboard
> id=3    [master keyboard (2)]    ↳ Virtual core XTEST
> keyboard               id=5    [slave  keyboard (3)]    ↳ Xvfb
> keyboard                             id=7    [slave  keyboard (3)]*
> 
> 
> I also tried the virtual uinput device with "Xorg X11 dummy video driver"
> https://xpra.org/trac/wiki/Xdummy which is also not detecting the my
> "virtual touch device" ( I ran the xorg as non root).
> 
> 
> I am struck. I don't know where to proceed further.
> Is there any other options available? Do I have to implement something else?

The only option I can see is to run a full Xorg with the uinput touch
device. Short of that, I don't think anything will help.

Cheers,
   Peter

> 
> Any help would be greatly appreciated.
> 
> Thanks,
> Prakash
> 
> 
> Notes,
> 1. Starting X virtual frame buffer -  "Xvfb :2 -screen 0 1600x900x24"
> 2. virtual touch device uinput code -
> https://drive.google.com/open?id=0B2lQr8WlvKmzZjhJOHB0b0x4ZGc   (with the
> help of  http://thiemonge.org/getting-started-with-uinput )
> 3. For the xvfb - I used CentOS 7.3 with Xorg -  1.17.2, pixman 0.34.0,
> kernel -3.10.0
> 4. For the x dummy driver - I used ubuntu 16.10 with Xorg 1.18.4, pixman -
> 0.33.6 , kernel -4.10.
> 
> 
> -- 
> Anyone who has never made a mistake has never tried anything new.



More information about the xorg-devel mailing list