TMUX script

Discussion in 'Systems Administration' started by GaIaxy, Apr 22, 2017.

  1. GaIaxy

    Supporter

    So I had this script that was suggested. I tweaked it a little bit, but for some reason only 2 screens open. One's named bash-0 and the other what it's supposed to be. Anything after that doesn't load.

    Code (Text):

    tmux new-session -d -s RageCraft
    tmux new-window -t RageCraft:1 -n 'Bungeecord' 'java -Xms512M -Xmx1024M -jar /home/RageCraft/BungeeCord/RageCord.jar'
    tmux new-window -t RageCraft:2 -n 'Hub1' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/Hub-01/RageCore.jar'
    tmux new-window -t RageCraft:3 -n 'Bridges' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/Bridges/RageCore.jar'
    tmux new-window -t RageCraft:4 -n 'Factions01' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/Factions01/RageCore.jar'
    tmux new-window -t RageCraft:5 -n 'UHC01' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/UHC01/RageCore.jar'
    tmux new-window -t RageCraft:6 -n 'Donator' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/Donator/RageCore.jar'
    tmux new-window -t RageCraft:7 -n 'SkyBlock' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SkyBlock/RageCore.jar'
    tmux new-window -t RageCraft:8 -n 'Games' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/Games/RageCore.jar'
    tmux new-window -t RageCraft:9 -n 'EggWars' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/EggWars/RageCore.jar'
    tmux new-window -t RageCraft:10 -n 'HAS01' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/HAS01/RageCore.jar'
    tmux new-window -t RageCraft:11 -n 'HAS02' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/HAS02/RageCore.jar'
    tmux new-window -t RageCraft:12 -n 'HAS03' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/HAS03/RageCore.jar'
    tmux new-window -t RageCraft:13 -n 'SG01' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SG01/RageCore.jar'
    tmux new-window -t RageCraft:14 -n 'SG02' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SG02/RageCore.jar'
    tmux new-window -t RageCraft:15 -n 'SG03' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SG03/RageCore.jar'
    tmux new-window -t RageCraft:16 -n 'SW01' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SW01/RageCore.jar'
    tmux new-window -t RageCraft:17 -n 'SW02' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SW02/RageCore.jar'
    tmux new-window -t RageCraft:18 -n 'SW03' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SW03/RageCore.jar'
    tmux new-window -t RageCraft:19 -n 'SW04' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SW04/RageCore.jar'
    tmux new-window -t RageCraft:20 -n 'SW05' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/RageCraft/SW05/RageCore.jar'
     
     
  2. What is the point of this skript?
     
  3. I don't have an answer but
    this is a shell script for starting a bunch of tmux windows, not Skript.
     
  4. Have you tried running one of the commands outside of tmux to make sure it doesn't error out or something? Just a thought.
     
    #4 Datatags, May 1, 2017
    Last edited: May 1, 2017
  5. GaIaxy

    Supporter

    Tried that. I am not using TMUX now anyways.

    But it maybe didn't work because it maybe tried to execute it inside another session.
     
  6. When I (accidentally or deliberately) do that it says that it doesn't recommend doing nested sessions but you can set $TMUX to false or something to enable it.
     
  7. WAS

    WAS

    • Agree Agree x 1