Ubuntu – Find X-Window Name

12.10gnomekeyboardxorg

I am using a script called SendKeys (https://github.com/kyoto/sendkeys) which I want to use to send keyboard strokes to Skype.

I am able to get SendKeys to works perfectly with pluma (a text editor) and Google Chrome.

Send Keys works by sending keys to the name of an X-window, e.g.:

bash sendkey.sh 'Google Chrome' Control+v

I can send keys to Google Chrome by supplying the window 'Google Chrome' or 'Chrome' and for Pluma 'pluma' (lower case.) However I am not able to send anything to Skype. I do not know if this is because of a compatability issue or because I can't find out the name of the window.

Can anyone suggest how you determine the name of a x-window?

Or failing that suggest another way I may be able to send keyboard strokes to Skype.

Best Answer

If you are unable to click on the window you want, you can use:

xwininfo -root -children

or

xlsclients

Those should list all windows open by their names. The first one worked better for me.

Related Question