Tristan Schuler
Tristan Schuler

Reputation: 41

Is there a way to initiate UNIX screen with keyboard commands?

Is there a way to begin a screen session with keyboard commands?

For instance I want to start screen, split the window horizontally, and then switch to the bottom window with one command. Currently I can only start screen and then running the keyboard commands:

Split vertically: Ctrl+a then S.

Switch screen: Ctrl+a then n.

Is there a way I can do this with one line when starting a new screen session? Or a work around to simulate pressing keyboard commands once screen is started?

Upvotes: 0

Views: 64

Answers (1)

tbrk
tbrk

Reputation: 1298

You could put the following lines into .screenrc:

split
focus
screen

Or even:

bind U eval split focus screen

Also, see this answer.

Upvotes: 2

Related Questions