1
vote
0answers
42 views

Execute commands on TMUX Detach

Is it possible to execute commands on tmux detach? I usually have a rails console and server running in the tmux session, on detach is it possible to automatically end those? Thanks.
4
votes
1answer
588 views

How can I forward a already forwarded ssh key into tmux?

I'm connecting through SSH from a machine where my keys are stored, forwarding to a second machine, and then try to use the keys from within tmux. I appear to "loose" the forwarding when entering ...
2
votes
1answer
116 views

Send keystrokes to a process on Console

If I have a terminal with a shell open, how can I write a shell script (any scripting language is ok with me!) that will send a keystroke to any one of the running processes? As an example, how could ...
2
votes
1answer
57 views

How do I drop to a shell after exiting a command I started by scripting tmux?

I'm following this tutorial for scripting the creation of tmux windows. tmux new-window t $SESSION:0 -k -n MAIN 'cd ~/main/ && perl -Ilib myapp' sometimes I kill myapp after I've started ...
4
votes
3answers
2k views

How do I run a shell command from .tmux.conf

How do I run a shell command from .tmux.conf, or otherwise automatically when tmux launches, without having to hit any other command? How can I create an alias, a function, or a script which boils ...
3
votes
3answers
824 views

How to make my tmux which starts via crontab @reboot use bash?

I have a crontab which launches tmux-launching-script as follows : -sh-3.00# crontab -l @reboot /root/scripts/tmux_autostart.sh where #!/bin/bash # setup tmux session tmux new -d -s my_session ...
12
votes
4answers
3k views

Why do I have to re-set env vars in tmux when I re-attach?

I mainly work on a mac and ssh/tmux attach to a Linux machine to do my work. I have ssh-agent running on the Linux machine. I have set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID ...
0
votes
0answers
31 views

Pass process ownership to another shell [duplicate]

I didn't hear of anything like this, but It might be possible. I often end up starting a process on a server and midway realizing that I would like to suspend that process and continue it inside a ...
6
votes
2answers
300 views

Replacing tmux with exec

I'm using tmux from a while and I'm very happy with it. Since I need it most of the time, I made it my default shell (in guake, to be precise). This is nice and I'm perfectly fine with this. But ...
2
votes
2answers
665 views

Changing tmux .bash_profile behavior

I have a script in my .bash_profile that prompts for X sessions to boot. When I launch tmux, I get this prompt that I had only intended for the TTY login. Is there something I can put in ...
8
votes
1answer
906 views

How to copy from/to the tmux 'clipboard' with shell pipes?

When working in a shell environment I run fairly often into the need to copy 'intermediate pipe output' around (eg. from/to already running editors, to other shells, other machines, etc.). When in a ...
11
votes
6answers
6k views

How can I set my default shell to start up tmux

I would like my default bash shell to go straight into tmux instead of my always having to type tmux every time.
1
vote
2answers
2k views

Run tmux always when I open terminal

I usually open lxterminal with bash shell where I usually type tmux command first. I'd like to have launched tmux command automatically, so I tried to add this command to ~/.bash_profile or to ...
4
votes
2answers
2k views

Convert gnu screen status line to tmux status line

I am using the following screen status line, configured in my screenrc: I configured it using the following line: hardstatus alwayslastline hardstatus string '%{= kG}[ %{G}%H %{g}][%= ...
6
votes
3answers
375 views

Why might tmux only be capable of attaching once per shell session?

I'm using tmux on a Fedora 8 server (workplace restriction) to monitor several boxes on a stress rack. I noticed that I can only attach to my detached tmux session once per shell session. In order ...
4
votes
3answers
951 views

`$XAUTHORITY` appears from 'nowhere' on su+tmux

When I switched from su+bash to su+tmux+zsh I noticed that I get $XAUTHORITY variable defined as /root/.xauthXXXXXX where XXXXXX are 6 random alphanumeric characters. With previous configuration X ...