diff options
-rw-r--r-- | scripts/install/opensim.tmux.conf | 10 | ||||
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 41 |
2 files changed, 40 insertions, 11 deletions
diff --git a/scripts/install/opensim.tmux.conf b/scripts/install/opensim.tmux.conf index c204c42..9cdda3f 100644 --- a/scripts/install/opensim.tmux.conf +++ b/scripts/install/opensim.tmux.conf | |||
@@ -16,6 +16,16 @@ unbind '"' | |||
16 | bind | split-window -h | 16 | bind | split-window -h |
17 | bind - split-window -v | 17 | bind - split-window -v |
18 | 18 | ||
19 | # pane border | ||
20 | set -g pane-border-status top | ||
21 | #colors for pane borders | ||
22 | set-window-option -g pane-border-style fg=black,bg=green | ||
23 | set-window-option -g pane-active-border-style fg=black,bg=red | ||
24 | set-window-option -g automatic-rename off | ||
25 | set-window-option -g pane-border-format '[#{pane_index}:#{pane_title}]' | ||
26 | |||
27 | # select-pane -t 1 -T "fancy pane title" | ||
28 | # Note that running a program in that tab might override it - 1 mc [dvs1@Superbitch]:/media/DATA/home/dvs1 | ||
19 | # set-options -g global, -s server, -w window, otherwise a session option. | 29 | # set-options -g global, -s server, -w window, otherwise a session option. |
20 | # -a appends a string to the existing option. | 30 | # -a appends a string to the existing option. |
21 | # -u unsets an option. | 31 | # -u unsets an option. |
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 0ea29a3..9297772 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -6949,19 +6949,27 @@ jit library is loaded or the JIT compiler will not be activated. | |||
6949 | { | 6949 | { |
6950 | snprintf(toybuf, sizeof(toybuf), | 6950 | snprintf(toybuf, sizeof(toybuf), |
6951 | "%s %s/%s new-session -d -s %s -n '%s' \\; split-window -bhp 50 -t '%s:' bash -c '/usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s; bash'", | 6951 | "%s %s/%s new-session -d -s %s -n '%s' \\; split-window -bhp 50 -t '%s:' bash -c '/usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s; bash'", |
6952 | "; select-pane -t 0 -T 'SledjChisl'; select-pane -t 1 -T 'ROBUST'", | ||
6952 | Tcmd, scRun, Tsocket, Tconsole, Ttab, Tconsole, scRoot); | 6953 | Tcmd, scRun, Tsocket, Tconsole, Ttab, Tconsole, scRoot); |
6953 | } | 6954 | } |
6954 | else | 6955 | else |
6955 | { | 6956 | { |
6956 | // 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. | 6957 | // 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. |
6957 | // 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. | 6958 | // 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. |
6958 | snprintf(toybuf, sizeof(toybuf), | 6959 | snprintf(toybuf, sizeof(toybuf), |
6959 | "sudo -Hu %s %s %s/%s new-session -d -s %s -n '%s' \\; split-window -bhp 50 -t '%s:' bash -c '/usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s; bash'", | 6960 | "sudo -Hu %s %s %s/%s new-session -d -s %s -n '%s' \\; split-window -bhp 50 -t '%s:' bash -c '/usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s; bash'", |
6960 | scUser, Tcmd, scRun, Tsocket, Tconsole, Ttab, Tconsole, scRoot); | 6961 | scUser, Tcmd, scRun, Tsocket, Tconsole, Ttab, Tconsole, scRoot); |
6961 | } | 6962 | } |
6962 | i = system(toybuf); | 6963 | i = system(toybuf); |
6963 | if (!WIFEXITED(i)) | 6964 | if (!WIFEXITED(i)) |
6964 | E("tmux new-session command failed! %s", toybuf); | 6965 | E("tmux new-session command failed! %s", toybuf); |
6966 | else | ||
6967 | { | ||
6968 | snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-pane -t 0 -T 'SledjChisl'", Tcmd, scRun, Tsocket); | ||
6969 | i = system(toybuf); | ||
6970 | if (!WIFEXITED(i)) | ||
6971 | E("tmux select-pane command failed!"); | ||
6972 | } | ||
6965 | } | 6973 | } |
6966 | // Join the session. | 6974 | // Join the session. |
6967 | memset(toybuf, 0, sizeof(toybuf)); | 6975 | memset(toybuf, 0, sizeof(toybuf)); |
@@ -7523,6 +7531,10 @@ T("ARGS - %i |%s| |%s|", currentMode, toys.optargs[0], target); | |||
7523 | c = xmprintf("mono Robust.exe -inidirectory=%s/config/ROBUST", scRoot); | 7531 | c = xmprintf("mono Robust.exe -inidirectory=%s/config/ROBUST", scRoot); |
7524 | sendTmuxCmd(d, c); | 7532 | sendTmuxCmd(d, c); |
7525 | free(c); | 7533 | free(c); |
7534 | c = xmprintf("%s %s/%s select-pane -t 1 -T 'ROBUST'", Tcmd, scRun, Tsocket); | ||
7535 | i = system(c); | ||
7536 | if (!WIFEXITED(i)) | ||
7537 | E("tmux select-pane command failed!"); | ||
7526 | waitTmuxText(d, "INITIALIZATION COMPLETE FOR ROBUST"); | 7538 | waitTmuxText(d, "INITIALIZATION COMPLETE FOR ROBUST"); |
7527 | I("ROBUST is done starting up."); | 7539 | I("ROBUST is done starting up."); |
7528 | // la = waitLoadAverage(la, loadAverageInc / 3.0, simTimeOut / 3); | 7540 | // la = waitLoadAverage(la, loadAverageInc / 3.0, simTimeOut / 3); |
@@ -7663,17 +7675,24 @@ sims = -- Note these are .shini / tmux tab short names. | |||
7663 | E("tmux new-window command failed!"); | 7675 | E("tmux new-window command failed!"); |
7664 | else | 7676 | else |
7665 | { | 7677 | { |
7666 | if (0 == doWait) | 7678 | snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-pane -t %s.0 -T '%s'", Tcmd, scRun, Tsocket, nm, name); |
7667 | { | 7679 | r = system(toybuf); |
7668 | memset(toybuf, 0, sizeof(toybuf)); | 7680 | if (!WIFEXITED(r)) |
7669 | snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", name); | 7681 | E("tmux select-pane command failed!"); |
7670 | waitTmuxText(nm, toybuf); | ||
7671 | I("%s is done starting up.", name); | ||
7672 | la = waitLoadAverage(la, loadAverageInc, simTimeOut); | ||
7673 | } | ||
7674 | else | 7682 | else |
7675 | I("Not waiting for %s to finish starting up.", name); | 7683 | { |
7676 | count++; | 7684 | if (0 == doWait) |
7685 | { | ||
7686 | memset(toybuf, 0, sizeof(toybuf)); | ||
7687 | snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", name); | ||
7688 | waitTmuxText(nm, toybuf); | ||
7689 | I("%s is done starting up.", name); | ||
7690 | la = waitLoadAverage(la, loadAverageInc, simTimeOut); | ||
7691 | } | ||
7692 | else | ||
7693 | I("Not waiting for %s to finish starting up.", name); | ||
7694 | count++; | ||
7695 | } | ||
7677 | } | 7696 | } |
7678 | free(newPath); | 7697 | free(newPath); |
7679 | free(path); | 7698 | free(path); |