Command-line way to send keystrokes to a window open on a different X-session
- by Sanjay Manohar
I have a Ubuntu desktop open and logged on, on my main machine.
I am then also logging in to this machine from a remote computer, using X2go which creates a new X-session.
I have a libreoffice file open on the original session.
I want to save this file and close it - but from the remote machine!
(Both sessions have same user logged in; I can sudo if needed)
I have tried using xdotool search but this fails to find the window.
Is there a way to do what I want from this second session?
I can see the process with ps -A
I can even see the open file with lsof!
How can I do a "save-and-close" on it?