Is it possible somehow to define a keyboard shortcut that sequentially executes two different keyboard shortcuts? As an example, I want to open nautilus search directly. I can search in nautilus by pressing ctrl+F, but only if I am already in nautilus. I can open my home folder by a custom shortcut win+E. So, is it possible to define a new shortcut, let's say the search button on my keyboard that will first open nautilus then focus on search, similarly to if I first press win+E and then ctrl+F?

As a separate question (I'm interested in both), if there's a way to refer to searching in nautilus directly by a command, then that will work too.

  • Possible with a few little hacks. Any specific requirements other than opening nautilus and searching ? Feb 29, 2016 at 21:59
  • For this specific thing no, that will be fine :) Feb 29, 2016 at 22:04

1 Answer 1


Answer under construction

Basic idea - bind shortcut to this command

  bash -c 'nautilus && sleep 2.5 && xdotool key Ctrl+f'  

xdotool is a keypress simulator basically, so you will need that installed with sudo apt-get install xdotool.

You may want to play with sleep time (seconds) before window shows up.

  • Works perfectly, thank you! Xdotool will be very useful to me, so thanks for pointing me to it as well! Feb 29, 2016 at 22:28
  • Now this works almost as efficiently as Search Everything did on my previous Windows configuration, and it makes my life easier. I'm loving the customizability of linux so far, and I'm learning a lot from your helpful answers! Feb 29, 2016 at 22:35
  • Glad it works for you :) I will expand on this answer a little bit later. Meanwhile , have fun with the new command ! Feb 29, 2016 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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