您尚未登录。

#1 2013-08-01 16:05:07

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

tmux挂了,一开就[exited]

上周就出现问题,断断续续找问题一周没找到。
现象是这样的:

$ tmux                   
[exited]

一开tmux就这样。但是

tmux new '/bin/sleep 10000'

这样是能保持的。
删除过/tmp/tmux*,但是没有效果,降级也是。
sf主页上问有人说是我的shell exit了,但是找到问题在哪里。
用的konsole+zsh,而且在bash里试也有问题。
没有配置文件。
怎么破?

最近编辑记录 wych (2013-08-01 16:14:20)


Twitter@wych42

离线

#2 2013-08-01 16:51:21

phoenixlzx
晩ご飯だよー
注册时间: 2011-08-19
帖子: 1,789
个人网站

Re: tmux挂了,一开就[exited]

我也觉得是 shell existed 了... 看看shell 的 rc 文件 (.bashrc .zshrc ) 里有木有 exit 或者类似的代码..

离线

#3 2013-08-01 17:26:21

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,468
个人网站

Re: tmux挂了,一开就[exited]

~/.tmux.conf 呢?

离线

#4 2013-08-02 09:19:52

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

Re: tmux挂了,一开就[exited]

百合仙子 说:

~/.tmux.conf 呢?

删掉了也这样。

phoenixlzx 说:

我也觉得是 shell existed 了... 看看shell 的 rc 文件 (.bashrc .zshrc ) 里有木有 exit 或者类似的代码..

我把.zshrc删掉了,还是会退出。换Bash,.bashrc没有exit
.zshrc 用的是.oh-my-zsh 我加过一点点东西,是这样的http://paste.kde.org/p90b5d7b6/
.bashrc是这样的

#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
# For colourful man pages
   export LESS_TERMCAP_mb=$'\E[01;31m'
   export LESS_TERMCAP_md=$'\E[01;31m'
   export LESS_TERMCAP_me=$'\E[0m'
   export LESS_TERMCAP_se=$'\E[0m'
   export LESS_TERMCAP_so=$'\E[01;44;33m'
   export LESS_TERMCAP_ue=$'\E[0m'
   export LESS_TERMCAP_us=$'\E[01;32m'
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export EDITOR=vim

最近编辑记录 wych (2013-08-02 09:30:04)


Twitter@wych42

离线

#5 2013-08-02 11:53:19

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,468
个人网站

Re: tmux挂了,一开就[exited]

strace -o log -f tmux
然后贴 log 文件。

离线

#6 2013-08-02 12:36:24

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

Re: tmux挂了,一开就[exited]

百合仙子 说:

strace -o log -f tmux
然后贴 log 文件。

log在此:
http://paste.sinaapp.com/show.php?id=1011


Twitter@wych42

离线

#7 2013-08-02 13:15:43

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,468
个人网站

Re: tmux挂了,一开就[exited]

zsh: timeout? 你设置了 TMOUT 变量?值为 1(秒)?所以你在一秒内没输入命令 zsh 就退出了……

不介意隐私的话,贴 strace -o log -ttt -v -s 10000 -f tmux。

PS: TMOUT 这个参数 bash 也支持。

离线

#8 2013-08-02 14:31:07

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

Re: tmux挂了,一开就[exited]

百合仙子 说:

zsh: timeout? 你设置了 TMOUT 变量?值为 1(秒)?所以你在一秒内没输入命令 zsh 就退出了……

不介意隐私的话,贴 strace -o log -ttt -v -s 10000 -f tmux。

PS: TMOUT 这个参数 bash 也支持。

隐私太多了。没设置过那个参数啊 echo $TMOUT 没东西。log太大了放在google drive
https://docs.google.com/file/d/0ByOFeph … sp=sharing


Twitter@wych42

离线

#9 2013-08-02 16:31:07

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,468
个人网站

Re: tmux挂了,一开就[exited]

wych 说:
百合仙子 说:

zsh: timeout? 你设置了 TMOUT 变量?值为 1(秒)?所以你在一秒内没输入命令 zsh 就退出了……

不介意隐私的话,贴 strace -o log -ttt -v -s 10000 -f tmux。

PS: TMOUT 这个参数 bash 也支持。

隐私太多了。没设置过那个参数啊 echo $TMOUT 没东西。log太大了放在google drive
https://docs.google.com/file/d/0ByOFeph … sp=sharing

/etc/profile 最后一行。

离线

#10 2013-08-02 19:08:54

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

Re: tmux挂了,一开就[exited]

百合仙子 说:
wych 说:
百合仙子 说:

zsh: timeout? 你设置了 TMOUT 变量?值为 1(秒)?所以你在一秒内没输入命令 zsh 就退出了……

不介意隐私的话,贴 strace -o log -ttt -v -s 10000 -f tmux。

PS: TMOUT 这个参数 bash 也支持。

隐私太多了。没设置过那个参数啊 echo $TMOUT 没东西。log太大了放在google drive
https://docs.google.com/file/d/0ByOFeph … sp=sharing

/etc/profile 最后一行。

== 忘记检查这个了。
我清楚记得没有设置过这个啊!!
但是为什么screen可以用?screen不读这个变量么?


Twitter@wych42

离线

#11 2013-08-02 20:23:25

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,468
个人网站

Re: tmux挂了,一开就[exited]

wych 说:

== 忘记检查这个了。
我清楚记得没有设置过这个啊!!
但是为什么screen可以用?screen不读这个变量么?

/etc/profile 是 login 和 bash 等作为登录 shell会读取的,/etc/zsh/zprofile 是 zsh 作为登录 shell会读取的。参见login shell 和 non-login shell 不同造成的问题 - 依云's Blog

tmux 启动的应该是 login shell,而 screen 以及你的 GUI 终端模拟器启动的是 non-login shell。

离线

#12 2013-08-02 22:23:56

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

Re: tmux挂了,一开就[exited]

百合仙子 说:
wych 说:

== 忘记检查这个了。
我清楚记得没有设置过这个啊!!
但是为什么screen可以用?screen不读这个变量么?

/etc/profile 是 login 和 bash 等作为登录 shell会读取的,/etc/zsh/zprofile 是 zsh 作为登录 shell会读取的。参见login shell 和 non-login shell 不同造成的问题 - 依云's Blog

tmux 启动的应该是 login shell,而 screen 以及你的 GUI 终端模拟器启动的是 non-login shell。

ok,多谢仙子大大


Twitter@wych42

离线

页脚