screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Could I contribute a patch to increase the default remote command buffer


From: 张小潘
Subject: Could I contribute a patch to increase the default remote command buffer size?
Date: Tue, 11 Sep 2018 08:32:58 -0700

Hi there,

I have been using GNU screen for many years and have some personal modifications to make it work better in my environment. There is one change I am looking for contribute back to main repository.

Typically I have two monitors connected to my workstation, and I run one screen session in a terminal window on each of these monitors.  One screen is used to run a Vim session, another screen is used to run a bash session.  The trick here is I wrote a Vim script so that in a special buffer of the vim window, I can edit bash commands, and send these commands to run on the screen window by using  "/usr/bin/screen -S <session> -p <window> -X stuff <shell-command>", which is really handy. (I can share the vim script if anybody wants to see, but that is not my main point here)

One thing annoys me is that screen uses a predefined constant in the source code to define the size to receive the remote command, that is:

    #define MAXSTR 768

    char fullcmd[MAXSTR];

    ...
    if (!(fc = strncpy_escape_quote(fc, p, fullcmd + ARRAY_SIZE(fullcmd) - 2))) { /* '"' ' ' */
     Msg(0, "Remote command too long.");
   ...
 
My shell commands are usually quite long (binary with dozens of command line flags) and it can easily exceed the 768 limit. So in my local screen source copy, I changed it to 16384, which works really well for me. As I think in modern computers usually come up with several Gigabytes memory, 16 k is really a small number, so I am writing this email to see if I can contribute this change back to screen main repository, and if yes, what is the appropriate steps to do it.

Regards.

--
Xiaopan Zhang - (张小潘)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]