2

I'd like to know is it possible to set a max amount of screens that could be running at once on screenrc? Thanks

2

You will need to recompile screen to be able to edit this option. You need to manipulate the "MAXWIN" flag.

I usually recompile screen to remove it. If you want to do it with packages, make sure you have the dpkg-dev package installed (you will need make etc. so also grab build-essential which may or may not be a dependancy on dpkg-dev) and use 'apt-get source screen' to grab the source for screen.

Extract the source (screen_4.0.3.orig.tar.gz). Make sure that you run the patch after the archive is extracted to create the debian package control files. Edit the config.h.in file and find this near the top:

:# define MAXWIN 40

Change the 40 to what ever limit you want.

Rebuild the package using dpkg-buildpackage and then install the .dpkg file over the top of your current screen installation. This will then set the window limit to what ever you defined earlier.

This explains how to increase the limit, but decreasing should be the same. Good luck!

source

  • Windows may not be the same as screens. And you're giving information for debian/ubuntu when the question is flagged centos. – ptman Jul 18 '14 at 13:34
  • Fair enough. I was under the impression that screen should run similarly across distros. If this ends up not being the case, @dickweed can downvote to get it out of the rotation. – jski Jul 18 '14 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.