Sending keys to Linux’ programs

Source: http://www.semicomplete.com/projects/xdotool/

#apt-get install xdotool

#Send a Ctrl+P to Google Earth -> “File -> Print”

WID=`xdotool search “Google Earth” | head -1`
xdotool windowactivate $WID
xdotool key ctrl+p

#Copy Google Earth current view image to clipboard

WID=`xdotool search “Google Earth” | head -1`
xdotool windowactivate $WID
xdotool key ctrl+alt+c

And so on….there are several other possibilities described in the mentioned page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s