Re:Show HN: Restore tmux environment after a system restart
by brianmcd on Saturday August 30, 2014 @10:16AM
(#8246498)
Check out tmuxinator: https://github.com/tmuxinator/tmuxinator. You can create configurations for your projects that specify windows, panes, which apps to run, etc. It's great for starting all the servers/shells/workers required for a project.
Re:Show HN: Restore tmux environment after a system restart
by JelteF on Saturday August 30, 2014 @11:19AM
(#8246647)
I just use a shell script based on this SO answer. https://stackoverflow.com/questions/9023164/in-bash-how-can-...
The only sort of problem with it is that the output gets merged with each other. You can quite easily figure out what is what though.
Re:Show HN: Restore tmux environment after a system restart
by swah on Saturday August 30, 2014 @06:03PM
(#8247720)
See the goreman solution below: its similar but each output line has its app prefixed.
Re:Show HN: Restore tmux environment after a system restart
by tlunter on Saturday August 30, 2014 @10:12AM
(#8246486)
This is the use case of Foreman. https://github.com/ddollar/foreman
Re:Show HN: Restore tmux environment after a system restart
by crymer11 on Saturday August 30, 2014 @10:13AM
(#8246489)
or Goreman. https://github.com/mattn/goreman
Re:Show HN: Restore tmux environment after a system restart
by swah on Saturday August 30, 2014 @03:45PM
(#8247370)
Thanks for all replies. I tested this before the tmux solution, and I must say I'm impressed.
Ctrl-c worked like I was running a single app:
16:44:33 scss | QUIT
16:44:33 webpack | QUIT
16:44:33 nginx | QUIT
16:44:33 go | QUIT
This was better than expected! I suppose tmux will be preferable if one of the apps is slow to start and must be killed individually.
Re:Show HN: Restore tmux environment after a system restart
by joeroot on Sunday August 31, 2014 @02:08AM
(#8248569)
or Forego! https://github.com/ddollar/forego
Re:Show HN: Restore tmux environment after a system restart
by swah on Monday September 01, 2014 @06:56AM
(#8252309)
After using Goreman for a few days, I miss a way to restart a single process. Maybe just typing that process number should restart it... do you know if any of the solution do this?
Re:Show HN: Restore tmux environment after a system restart
by darkr on Monday September 01, 2014 @07:38AM
(#8252392)
I find teamocil[1] for this use case, usually with one window opening a vimsplit of TODO, README, CHANGELOG etc, one window to launch a vagrant machine (which then runs all the daemons), another for guard/rspec output, and other windows for key files currently being worked on.
Re:Show HN: Restore tmux environment after a system restart
by Hates_ on Saturday August 30, 2014 @10:14AM
(#8246490)
I use tmuxinator to launch services I need, then I just kill the session when I'm done.
Re:Show HN: Restore tmux environment after a system restart
by kapilvt on Saturday August 30, 2014 @04:10PM
(#8247443)
yes.. http://devstack.org for openstack, does a ~20 window screen session with all the servers attached to the foreground.
I'm looking for a way to start nginx/sass watcher/js builder/web app in a split screen, and also stop them all with one command (which would send ctrl-c to all windows). Now I just use tabs (OSX).