Working with tmux
Last updated
Was this helpful?
Last updated
Was this helpful?
tmux
is a very useful Linux command line tool. It allows you to create command line session that is persistent; meaning you can close the window and re-open it later and it remains in the same state. This allows you to do things such as start a long data compression operation from home then log out again, leaving the compression still running. tmux
is therefore safe to use if you have a flaky network connection. You can also connect to existing tmux
sessions. So if you start an operation locally on a PC, you can go home and re-connect to the same window. There is a Below are details on some common operations that might be useful in the context of StitchIt.
Here is what to do if the previous syncAndCrunch
session is stitching the last brain and you want to begin a new one.
Rename the existing tmux
session to something memorable. e.g. if the current sample is called XYZ-123
then we can rename the tmux
session to stitch_XYZ
by doing: ctrl b
then press $
then you can type the new name. Then press return.
Now detach from the existing session with ctrl b
then press d
.
You are now back at the non-tmux Linux command line (the green bar at the bottom has gone). You can verify your session is in the background with tmux ls
. That lists all tmux
sessions.
Start a new session by typing tmux
.
Rename it to whatever you normally call your syncAndCrunch
tmux
sessions. e.g. You might always name them after the microscope. To rename you can again do ctrl b
then press $
then type slicerscope
or whatever the name is that you normally use.
Start MATLAB with matlab
When you are ready you can run syncAndCrunch('slicerscope')
(substitute slicerscope
with your rig name)