From d4307e58cb6d902c5cb16a65410e0266b212cbb7 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 4 Aug 2021 15:06:52 +1000 Subject: Start tmux with a huge screen size, to work around OpenSim bug. --- src/sledjchisl/sledjchisl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 92b5f30..65f51f0 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -7177,8 +7177,9 @@ jit library is loaded or the JIT compiler will not be activated. if (strcmp(pw->pw_name, scUser) == 0) { I("Not running inside the proper tmux server, starting it."); - snprintf(toybuf, sizeof(toybuf), - "export PATH='%s:$PATH'; %s %s/%s new-session -d -s %s -n '%s' bash -c 'export PATH=%s:$PATH; bash' \\; split-window -vp 50 -t '%s:' " + snprintf(toybuf, sizeof(toybuf), + // Set x,y to huge values, to work around an OpenSim bug. + "export PATH='%s:$PATH'; %s %s/%s new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; bash' \\; split-window -vp 50 -t '%s:' " "bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s/current/bin; bash'", scBin, Tcmd, scRun, Tsocket, Tconsole, Ttab, scBin, Tconsole, scBin, scBin, scRoot); } @@ -7188,7 +7189,8 @@ jit library is loaded or the JIT compiler will not be activated. // The sudo is only so that the session is owned by opensim, otherwise it's owned by whoever ran this script, which is a likely security hole. // After the session is created, we rely on the scRun directory to be group sticky, so that anyone in the opensim group can attach to the tmux socket. snprintf(toybuf, sizeof(toybuf), - "sudo -Hu %s %s %s/%s new-session -d -s %s -n '%s' bash -c 'export PATH=%s:$PATH; bash' \\; split-window -vp 50 -t '%s:' " + // Set x,y to huge values, to work around an OpenSim bug. + "sudo -Hu %s %s %s/%s new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; bash' \\; split-window -vp 50 -t '%s:' " "bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s/current/bin; bash'", scUser, Tcmd, scRun, Tsocket, Tconsole, Ttab, scBin, Tconsole, scBin, scRoot); } -- cgit v1.1