Issue
I use linux screen heavily , generally if the OS didn't restart or say as long as the SCREEN process is there, I can re-attach to my terminals. But I don't want to set-up the screens each time after my computer restarts that's tedious work.
so I generally setup a series of screens to run different categories of command
1. create a window, rename the screen, run specific command
2. etc...
Is there a way to create these screen setups automatically , say can I script to do that ?
Edit: what is more important here is how to paste some command into the window after the window is created.
Solution
Yes, of course.
You just need to specify the configuration of screen in ~/.screenrc
.
If you want to use several configurations, you can create several config files
and start screens with -c
key.
screen -c ~/.screenrc1
screen -c ~/.screenrc2
screen -c ~/.screenrc3
Example of ~/.screenrc
:
screen -t news 8 newsbeuter
screen -t jabber 9 freetalk
here will be open two windows: on 8 -- newsbeuter
(the name of the window news
); on 9 — freetalk
(the name of the window jabber
).
Answered By - Igor Chubin Answer Checked By - Clifford M. (WPSolving Volunteer)