LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to get more than 40 windows in GNU screen under Debian. (http://www.linuxquestions.org/questions/linux-software-2/how-to-get-more-than-40-windows-in-gnu-screen-under-debian-4175450467/)

odin_ago 02-16-2013 03:47 PM

How to get more than 40 windows in GNU screen under Debian.
 
A question for Debian stable users.

I am using the terminal program called screen, which can create several "virtual terminals" in a single "real" terminal (the words "virtual" and "real" here are quite relative, the "real" terminal can be a konsole tab as well, not necessarily tty1-tty6). The problem is that I cannot create more than 40 windows inside a single screen. When I try to create more, screen says "No more windows." After some googling I found that that this is controlled by something called MAXWIN, but I didn't find any information how to modify this MAXWIN. How can I increase the maximal number of windows inside a single screen?

I use Debian squeeze (stable).

amani 02-17-2013 11:11 AM

you should write it in the screenrc file and start screen again?

mjolnir 02-17-2013 11:29 AM

http://comments.gmane.org/gmane.linu...an.user/426291

"toor | 13 Jan 2012 05:38

Re: gnu screen - 40 windows limit?
I run across this issue as well.

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.

On Fri, Jan 13, 2012 at 7:38 AM, Evuraan <evuraan <at> gmail.com> wrote:
> gnu screen seems to let me open upto 40 windows. When I try for more, it
> says "No more windows." - is there a way we can override this limit?
>
> many thanks in advance.
"

I haven't tried this so use at your own risk.

amani 02-17-2013 11:56 AM

The manual should be improved.

mjolnir 02-17-2013 12:13 PM

Don't get me wrong, if a person wants 40+ windows that's their business but what on earth do you do with all of them? I'm not a sys admin but I use tmux with 5 windows and thought that was overkill.

odin_ago 02-17-2013 06:43 PM

Thank you for your response, I will try it.
Doesn't anybody know a more "canonical" way of doing that than to recompile the source?

ntubski 02-17-2013 07:48 PM

Quote:

Originally Posted by odin_ago (Post 4894010)
Doesn't anybody know a more "canonical" way of doing that than to recompile the source?

If the limit is #defined in the source than the only way around that will be to recompile. I suppose you could also start nesting screen instances, although that could get confusing.

odin_ago 02-23-2013 02:12 PM

I tried this. It seems to work ok. But in this case, if Debian maintainers decide to update the package, MAXWIN will become 40 again.

I mean, is it possible, for example, to tell Debian something like "when this package requires updating, its source should be downloaded instead of the binary, then
Code:

sed s/"#define MAXWIN 40"/"#define MAXWIN 400"/g
should be applied to config.h.in, then the package should be compiled?

Or maybe there exist another compiled package where MAXWIN is already larger?

odin_ago 02-24-2013 06:14 AM

Moreover, every time I want to update the system, debian "updates" my rebuilt screen to the original one, and I have to rebuild it again.

jpollard 02-24-2013 07:14 AM

Don't put the rebuilt version of screen in /usr/bin - put it in /usr/local/bin.

And don't install the debian version, thus updates will not attempt to replace it.

descendant_command 02-24-2013 12:59 PM

Or make a package and pin it to your version in apt/preferences

ntubski 02-24-2013 10:09 PM

Maybe try tmux instead?

odin_ago 02-25-2013 03:26 AM

Quote:

Originally Posted by jpollard (Post 4898607)
And don't install the debian version, thus updates will not attempt to replace it.

I've found a different workaround against Debian's attempts to reinstall the original package every time, even when it was not updated. T have to say
Code:

dch -v 4.0.3-14.asus1
after I modify config.h.in, but before I say
Code:

dpkg-buildpackage
.


All times are GMT -5. The time now is 07:27 AM.