Is there a way to automate split-screens in GNU Screen?

Go To


I know this is possible manually via ctrl commands using gnu screen for linux but I cannot seem to find a way to do this using only a script.

What I am trying to accomplish is via script having gnu screen split my terminal screen horizontally and run two separate commands on each screen at the same time.

For instance using two separate watch ls folder commands

[screen 1] watch ls folder1

[screen 2] watch ls folder2

2012-04-04 18:21
by user1313546


Your .screenrc file gets interpreted in order, sort of like running the Ctrl-A commands yourself.

$ cat .screenrc
screen -t folder1 1 watch ls /path/to/folder1
screen -t folder2 2 watch ls /path/to/folder2
sessionname Hello
select 1
select 2
startup_message off
2012-04-04 20:24
by ghoti
For people that wonder how you can create a vertical split: split -vDaan 2016-07-29 07:22