Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

GNU Screen has a command called exec that will launch a subprocess and optionally let you do things with its file descriptors, including tying them in your window. I frequently use :exec !! sx -b /tmp/file to send a file over a serial link using the xmodem protocol.

I'm looking for the same functionality in tmux so I can move away from screen without having to use minicom's (or picocom's, etc,) function for sending files.

share|improve this question
add comment

2 Answers 2

Take a look at tmux's respawn-window command and http://hyperpolyglot.org/multiplexers

share|improve this answer
1  
I don't know how I could use that to accomplish my goal. I want to dump stdout from a command into a window, and dump the window's output into stdin of the command. –  Shawn J. Goff Aug 29 '12 at 15:43
add comment

Run tmux

tmux    

Go to the command mode in your tmux session:

ctrlB then :

Then split a new window with a command associated.

split-window -d 'exec sx -b /tmp/file' 

Option -d is optional, it is to detach from the new pane and to return to the first. That will works with new-window command too.

CtrlB then o will switch from one pane to the other.

I didn't tested it with sx, but it worked with exec top

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.