You are not logged in.

#1 2013-08-22 18:45:12

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

tmux immediately crashes, but not sudo tmux

I have a problem where tmux crashes immediately upon start. But when I run with sudo it works fine.

Output of "strace tmux" here: http://sprunge.us/LXVI

What permissions am I missing?


EDIT: These problems are over an SSH connection.

Last edited by wuncidunci (2013-08-23 10:20:42)

Offline

#2 2013-08-22 19:40:40

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: tmux immediately crashes, but not sudo tmux

I have a feeling that you don't have the ability to write to your own home directory. 

What are the outputs of:
echo $HOME
whoami
ls -l /home
ls -la ~


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2013-08-22 19:46:41

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

echo $HOME
/home/d

whoami
d

ls -l /home
total 20
drwx------ 6 d    users  4096 Aug 22 21:44 d
drwx------ 2 root root  16384 Aug 20 17:36 lost+found

ls -la ~
total 96
drwx------  6 d    users  4096 Aug 22 21:45 .
drwxr-xr-x  4 root root   4096 Aug 21 15:42 ..
-rw-------  1 d    users  3117 Aug 22 01:48 .bash_history
-rw-r--r--  1 d    users    21 Jun  1 02:10 .bash_logout
-rw-r--r--  1 d    users    57 Jun  1 02:10 .bash_profile
-rw-r--r--  1 d    users  1476 Aug 21 16:47 .bashrc
lrwxrwxrwx  1 d    users    18 Aug 22 01:39 .gitconfig -> dotfiles/gitconfig
-rw-------  1 d    users    74 Aug 22 12:10 .lesshst
drwxr-xr-x 10 d    users  4096 Aug 22 01:39 .oh-my-zsh
-rw-r--r--  1 d    users  3729 Oct 31  2012 .screenrc
drwxr-xr-x  2 d    users  4096 Aug 21 17:00 .ssh
lrwxrwxrwx  1 d    users    14 Aug 22 01:39 .vim -> dotfiles/vim.d
-rw-------  1 d    users  5023 Aug 22 20:39 .viminfo
lrwxrwxrwx  1 d    users    14 Aug 22 01:39 .vimrc -> dotfiles/vimrc
-rw-r--r--  1 d    users 29869 Aug 22 02:19 .zcompdump
-rw-------  1 d    users  5359 Aug 22 21:45 .zhist
-rw-------  1 d    users     0 Aug 22 12:03 .zprofile
lrwxrwxrwx  1 d    users    15 Aug 22 01:39 .zshenv -> dotfiles/zshenv
lrwxrwxrwx  1 d    users    14 Aug 22 01:39 .zshrc -> dotfiles/zshrc
drwxr-xr-x  4 d    users  4096 Aug 22 20:39 dotfiles
drwxr-xr-x  3 d    users  4096 Aug 22 01:10 git

Last edited by wuncidunci (2013-08-22 19:58:07)

Offline

#4 2013-08-22 19:55:43

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: tmux immediately crashes, but not sudo tmux

I was bored so I looked over your strace pretty closely, and compared it to an strace of my own. Aside from the fact that I have a .tmux.conf, the two were practically identical right up until the end. The only thing I can come up with is maybe your user environment is causing problems. Create a new user (I'd recommend using bash shell if that's what root is using), switch to that user with su, and try running tmux.

Edit: also, code tags pls.

Last edited by alphaniner (2013-08-22 19:56:01)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2013-08-22 19:59:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: tmux immediately crashes, but not sudo tmux

I took the liberty of adding code tags for you.   That output all looks reasonable.  Let me ponder.

edit: I missed seeing alphaniner's post.  That looks like a reasonable suggestion.

Also, let us know which shell you are using and maybe let us see the files that that shell sources (bashrc, etc...)

Last edited by ewaller (2013-08-22 20:03:33)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2013-08-22 20:02:01

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: tmux immediately crashes, but not sudo tmux

Are you running tmux in a console, or in a terminal emulator in X?

Offline

#7 2013-08-22 20:15:43

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

Creating a new user didn't help. Made sure it had full access to its home directory.

Not sure if it helps but the strace is here: http://sprunge.us/UJdT

Offline

#8 2013-08-22 20:29:48

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

My main user uses zshell and has .zshrc and .zshenv both symlinked to a git repository for syncing between servers.
zshrc: http://sprunge.us/dPXj (note that the tmux alias is only used on OS X)
zshenv: http://sprunge.us/LACh

My new user created by alphaniner's suggestion uses bash, and has shell sources from /etc/skel:

#
# ~/.bash_logout
#

#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

This is all on a server which I'm accessing over SSH from iTerm on OS X.

Offline

#9 2013-08-22 20:39:32

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: tmux immediately crashes, but not sudo tmux

I noticed the SSH vars in the strace, but it didn't dawn on me. That probably factors in to the equation as well.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#10 2013-08-22 20:51:18

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

I can imagine tmux crashing because of some problem related to SSH. But I can't really see how those problems would not lead to a crash when running as root. That said I don't have physical access to this server so I can't check if these problems are still present when running from the console.

Offline

#11 2013-08-22 21:07:17

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: tmux immediately crashes, but not sudo tmux

I should have said "that may factor in to the equation". I don't know SSH well enough to say one way or the other.

IMO though, it should have been mentioned in the OP.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#12 2013-08-23 10:21:30

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

alphaniner wrote:

IMO though, it should have been mentioned in the OP.

I've now edited the OP to add this.

Offline

#13 2013-08-25 11:56:15

quantumphaze
Member
From: Melbourne, Australia
Registered: 2008-11-14
Posts: 175

Re: tmux immediately crashes, but not sudo tmux

Is your problem at all similar to this?

[user@localhost ~]$ tmux
^[[?1;2c
-bash: 1: command not found
                           -bash: 2c: command not found
                                                       [user@localhost ~]$ [user@localhost ~]$

If so then you should follow the thread here and remove the /dev/pts line in /etc/fstab. /dev/pts is now handled by systemd and this line causes problems with everything.


▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁

Offline

#14 2013-08-26 17:24:31

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

Fixed my problems. Thank you very much. Should have tried searching before posting a new thread.

Offline

#15 2013-08-30 00:37:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: tmux immediately crashes, but not sudo tmux

wuncidunci wrote:

Fixed my problems. Thank you very much. Should have tried searching before posting a new thread.

https://wiki.archlinux.org/index.php/Fo … way_Street

and ....  ???


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2013-08-31 12:58:18

wuncidunci
Member
Registered: 2013-08-22
Posts: 8

Re: tmux immediately crashes, but not sudo tmux

Oh I guess I was a bit unclear. What I meant to say was that removing the /dev/pts line in /etc/fstab as per quantumphaze's suggestion worked brilliantly, and that I should have seen the thread from a few days back with exactly the same problem.

Offline

Board footer

Powered by FluxBB