Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Want create script that run in background 5 programs from 5 given dirs and all of them should be in one controlling screen. In other words how via script after created screen and attaching to it via screen -r via script vreate new window within that screen, run given program and detach for new itaration
Want create script that run in background 5 programs from 5 given dirs and all of them should be in one controlling screen. In other words how via script after created screen and attaching to it via screen -r via script vreate new window within that screen, run given program and detach for new itaration
If I understand you correctly, you can do this to create a screen for a command, that will terminate when the command is complete.
Code:
screen -d -m -S ScreenName1 yes
Yes is a command, you can replace it with any command you would like.
If I understand you correctly, you can do this to create a screen for a command, that will terminate when the command is complete.
Yes is a command, you can replace it with any command you would like.
No, you understand me wrongly. By "run given program" i rather mean "start program and leave it running" and proceed after that new iteration. After whole 5 iterations i must have 5 windows within 1 screen with 5 runned programs
Ok.. in that case. You can start a main screen by:
Code:
screen
Once in that screen[0] type:
Code:
screen
Once in that screen[1] type:
Code:
Crtl-A A
Now you are back in the original screen[0], type:
Code:
screen
Now you are in screen[2], type:
Code:
Ctrl-A A
Now you are back in the original screen[0], type:
Code:
screen
And again. Main point to do all that stuff via script, not typing C-A and other nonprintable ones... Is it possible at all? Besides you rather use nested screens. It's possible to do without nesting.
And again. Main point to do all that stuff via script, not typing C-A and other nonprintable ones... Is it possible at all? Besides you rather use nested screens. It's possible to do without nesting.
In this case i mean just simpler combination C-A + c. Maybe, it's same. Anyway. I did it rather manually but question with script still in power. About to think that it's impossible...
Quote:
Originally Posted by szboardstretcher
Also, you should add this to your .screenrc file to make it easier to understand where you are:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.