What tmux version? If you do without the sleeps and it goes wrong, how many tmux servers do you end up with? (run "ps -eopid,ppid,comm" and look for tmux with a ppid of 1).
On Sat, Jun 21, 2014 at 11:16:18PM +0200, Emanuel Berg wrote: > Romain Francoise <rfranco...@debian.org> writes: > > > The mailing list is tmux-us...@lists.sf.net and is > > usually pretty active. > > OK! I send this mail to them as well, as well as the > first mail I sent, in quotes. I don't know if I'm added > automatically but otherwise you'll have to CC me, I > guess. > > >> In .zprofile, I have a setup like this to start tmux > >> in a few of the ttys: > >> > >> tmux-two-panes-50-50 () { > >> tmux new-session\; split-window -v\; select-pane -U > >> } > >> > >> # ... > >> > >> case $TTY in > >> (/dev/tty1) emacs ;; > >> (/dev/tty2) sleep 4; tmux-two-panes-50-50 ;; > >> (/dev/tty3) sleep 6; tmux-two-panes-50-50 ;; > >> (/dev/tty4) sleep 8; tmux new-session\; split-window -v\; resize-pane -D > >> 10 ;; > >> (/dev/tty5) start_X_if_not_running; irssi ;; > >> esac > >> > >> Also, in, .xinitrc, the last line is > >> > >> xterm -fullscreen -e tmux new-session\; split-window -v\; select-pane -U > >> > >> so I get tmux there as well. > >> > >> The problem with this is, sometimes (once in ten > >> boots perhaps) 1-2 of the clients disappear. tmux > >> actually appears in the failing tty(s), but it is > >> somehow crippled (e.g., 'tmux select-pane -U' > >> doesn't work etc.). And, with 'tmux list-clients' > >> there isn't an entry for that tty! > >> > >> If you notice the 'sleep' commands in .zprofile, I > >> have no idea why but those have a positive effect as > >> now this problem is much more rare, and it always > >> affects a single tty, never two (or more). > >> > > But you're not logging in on all the ttys at once, > > are you? > > Well, when I start Debian, in /etc/inittab, I have the > following: > > 1:2345:respawn:/sbin/getty -a ... 38400 tty1 > 2:23:respawn:/sbin/getty -a ... 38400 tty2 > 3:23:respawn:/sbin/getty -a ... 38400 tty3 > 4:23:respawn:/sbin/getty -a ... 38400 tty4 > 5:23:respawn:/sbin/getty -a ... 38400 tty5 > > So in that sense, logging should be pretty close. > > But: the .zprofile file must be read for every tty > otherwise how can the case statement give different > behaviour what to do, depending on what tty it is? So > it should be individual invocations of tmux as well, > right? But (especially without sleep) sometimes one or > two clients don't appear. > > > Why would the sleep calls change anything? > > I don't know except I know that it helps, a lot. > > > Anyway, I have no idea about this but my advice would > > be to take the reverse approach and use tmux as your > > shell, a new session will automatically be started > > for each tty. > > Yeah, you mean change shell as in chsh? Yes, > /usr/bin/tmux is in /etc/shells so I'll try that at > once! > > > You lose the ability to configure panes differently > > for each tty, but your setup looks simple enough that > > it could be done some other way. > > Yes. > > >> How can I use for example > >> > >> tmux bind -n i send-keys Up > >> > >> but have it only affect the pane/window/client where > >> it is invoked? I'd like to set one tty apart for an > >> ncurses application, which cannot be > >> key-configured. So I thought I'd use tmux to > >> translate my keystrokes to those of the > >> application. That works, however, that also breaks > >> the keyboards for all other panes, in all other ttys > >> (and in X) where tmux runs. Ideas? > > > > It's not possible to have per-pane or per-window key > > bindings, but you can just start the application in a > > dedicated tmux server (using e.g. 'tmux -L rebind -c > > rebind.conf') and then attach to that from the main > > server. In the inner server you can disable any > > status lines and use another prefix key. > > OK, I didn't understand that but I'll try it. > > -- > underground experts united: > http://user.it.uu.se/~embe8573 > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users