Is there a way to auto re-size screen windows, along with screen -x option? I know we can do this by using the screen fit command, once the shared screen session is open, but is there a way to do this automatically? (just like with screen -r -d, the window is re-sized automatically). I am trying to open a shared screen session automatically, when a new ssh session is opened (by using the screen -x command in .bash_profile), this works; but the window is not re sized. Any suggestions would help.
Asked
Active
Viewed 1.2k times
2 Answers
34
From http://www.gnu.org/software/screen/manual/screen.html
C-a F (fit) Resize the window to the current region size. See Window Size.
Note this is a capital F, so for me, it's ctrl+a shift+f

J K
- 341
- 3
- 4
-
This is manual, but still better than nothing alright. – user202729 Jun 20 '22 at 04:34
2
I haven't tried it myself, but looking at http://www.gnu.org/software/screen/manual/screen.html I'd suggest starting screen
with the option -A
.

sdive
- 2,047
- 1
- 20
- 20