Giang Lê
Giang Lê

Reputation: 43

Open GNU Screen with multiple windows

How to create a script that runs gnu screen with multiple windows, each window runs a command For example

window 1 runs python3 -m http.server

window 2 runs webpack --watch

a screen with 2 windows start when I run script ./start.sh

enter image description here

Upvotes: 2

Views: 1440

Answers (1)

Giang Lê
Giang Lê

Reputation: 43

I figured it out myselft, make a .screenrc file like this

startup_message off
caption always "%{= kw} %-w%{= gW} %n %t %{-}%+w %-="
screen -t http  ./scripts/serve.sh
screen -t watch ./scripts/watch.sh

then run screen -c .screenrc

Upvotes: 2

Related Questions