Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use easystroke for many tasks like command, key combination, etc. Now, I need to perform a series of tasks in a single stroke.

For example:

First i need to execute the command 'cryptkeeper'.

Second, I need to execute 'gnome-terminal'.

Third, I need to press key combination "ctrl+c".

Fourth, i need to press 'up-arrow'. Then 'Enter'


Here, i need to do step 1 to 4 with a single stroke in Easystroke.

Is there any way to do this ??

share|improve this question
up vote 1 down vote accepted

DISCLAIMER: I'm not sure if this will work, and I am can't test it now, but try it.

Install xte: sudo apt-get install xautomation

In easy-stroke make sure "Type" is set to "Command", then in the "Details" field put:

cryptkeeper && gnome-terminal && xte 'keydown Control_L' 'keydown C' 'keyup Control_L' 'keyup C' 'key Up' 'key Return'

In the end, it should look something like this

enter image description here

share|improve this answer
Thanks for the response..Your answer helped me upto some extend. The code you provided will not work as in a single line..So, I added them to a shell script and invoked using a specified gesture. Thanks again for introducing me XTE. – 001neeraj Dec 26 '12 at 5:56
@001neeraj Could you post an answer detailing what you did? This way other poeple can do it as well? Thanks! – Seth Jan 11 '13 at 19:22
forgive me for the delay in reply. I've answered the way i did it. – 001neeraj Apr 19 '13 at 7:56

enter image description here

Where secret.h is:

gnome-terminal -e "gnome-panel"&
xte 'sleep 5'
xte 'keydown Control_L' 'key c' 'keyup Control_L'
xte 'sleep 5'
gnome-terminal -e "gnome-panel"&

I am posting this because it may be useful to some others by editing the code. 'xdotool' can be used instead of xte.

share|improve this answer
Thank you for sharing! Hmm, I think this is equivalent to replacing the following command line in Seth's answer: cryptkeeper & gnome-terminal & xte 'sleep 5' ; xte 'keydown Control_L' 'key c' 'keyup Control_L' ; xte 'sleep 5' ; gnome-terminal -e "gnome-panel" & Note that a && b will start b when a has finished successfully, a ; b will start b when a has finished, a & b starts both simultaneously. – ignis Apr 19 '13 at 8:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.