0

I'm hoping to write a script that can control GNU Screen for example split the screen with 'Ctrl + S'. My ultimate objective is to run 4 different applications with a single script. Is this possible within Ruby?

Thanks!

2
  • 1
    I doubt there is any key capture library out there. You can try to write it in C and wrap up Commented May 28, 2012 at 2:57
  • 1
    You can do this without too much difficulty in JRuby, since Java can do this. Alternatively, I've done this sort of thing with Sikuli, a very impressive Jython framework for doing this sort of thing, complete with screenshot analysis for determining where to click. Posting as a comment because I'm too tired to do the research to make a proper answer with an example. Commented May 28, 2012 at 6:22

1 Answer 1

1

I haven't found any pre-made Ruby solution, but there are various pages about doing it with shell commands. For example, Scripting screen for fun and profit.

Other Stack Exchange questions: here and here and here.

Sign up to request clarification or add additional context in comments.

1 Comment

The blog link has a working technique! Thank you! screen -X split

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.