Using tmux on Arch Linux

I changed to Arch Linux on my Linode server, and expected to just run irssi in tmux as usual, but tmux failed to run with the message “create session failed: : No such file or directory”, which was not very enlightening. Running tmux -vvv to get some debug output wasn’t at all helpful either.

Enter strace, roughly equivalent to ktrace on the BSD’s, and I got something useful (strace -o tmux.trace -f tmux):

17809 open("/dev/ptyp0", O_RDWR)        = -1 EACCES (Permission denied)
17809 open("/dev/ptyp1", O_RDWR)        = -1 EACCES (Permission denied)
17809 open("/dev/ptyp2", O_RDWR)        = -1 EACCES (Permission denied)
17809 open("/dev/ptyp3", O_RDWR)        = -1 EACCES (Permission denied)
17809 open("/dev/ptyp4", O_RDWR)        = -1 EACCES (Permission denied)

All the way through the 256 /dev/pty* files.

Aha! The /dev/pty* files are root:tty with 660 permissions, so just adding my user to the tty group solved it. I knew it was a permission problem somewhere, but it took a little digging since the error message was very generic.