Try adding set -g default-shell '/bin/bash'
to tmux.conf. Also it is not a good idea to use /etc/tmux.conf for this because tmux will look for it automatically, try using a different filename. On Wed, Mar 11, 2015 at 11:13:21AM +0800, Wang Sen wrote: > Description > ======== > > I'm using tmux on the server side to start the os installer. I have > modified the file /etc/passwd so that the installer will be started > immediately when using ssh to login the server. > > /etc/passwd : > install:x:0:0:root:/root:/usr/bin/installer > > installer: > #!/bin/sh > TMUX="/bin/tmux" > START="-u -f /etc/tmux.conf start" > ATTACH="-u attach -t kvm" > export PYTHONPATH=/opt/installer/:$PYTHONPATH > $TMUX $START > $TMUX $ATTACH > > tmux.conf: > set-option -g status-bg black > set-option -g status-fg white > set-option -g status-left-length 12 > set-option -g status-left "KVM" > set-option -g status-right "C-right/C-left to switch" > set-option -g status-right-length 30 > set-window-option -g window-status-current-bg blue > set-option -s exit-unattached off > set-option -g base-index 1 > set-option -g set-remain-on-exit on > new-session -s kvm -n installer "python /opt/installer/main.py" > new-window -d -n shell "bash --login" > new-window -d -n debug "touch /tmp/installer.log && tail -f > /tmp/installer.log | grep -E '(INFO|CRITICAL)' " > bind-key -n "C-Left" select-window -t :- > bind-key -n "C-Right" select-window -t :+ > detach-client -s kvm > > Defect > ===== > > The installer works well if I use this command : > > $ssh -t root@*.*.*.* installer > > or : > > $ssh root@*.*.*.* > #installer // on the server > But when using ssh command on the client like this: > > $ssh install@*.*.*.* > > the tmux was started but the screen print dots continuously. > > And on the server side, it seems that the tmux attach command was executes > 4 times: > > $ps aux | grep tmux > > root****** 2089 77.0* 0.0** 4252* 2076 ?******* Rs** 03:05** 0:03 > /bin/tmux -u -f /etc/tmux.conf start > root****** 2093* 0.0* 0.0** 3720* 1140 pts/1*** S+** 03:05** 0:00 > /bin/tmux -u attach -t kvm > root****** 2096* 0.0* 0.0** 3720* 1140 pts/2*** S+** 03:05** 0:00 > /bin/tmux -u attach -t kvm > root****** 2098* 0.0* 0.0** 3720* 1136 pts/3*** S+** 03:05** 0:00 > /bin/tmux -u attach -t kvm > root****** 2099* 0.0* 0.0** 3720* 1140 pts/4*** S+** 03:05** 0:00 > /bin/tmux -u attach -t kvm > > Anyone who knows what's happening and how to fix this? > --- --- --- > Best Wishes > Wang Sen > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users