tmux doesn’t start properly, when I start it as root like so:
truenas_admin@qnaptruenas[~]$ sudo -s
[sudo] password for truenas_admin:
root@qnaptruenas[/home/truenas_admin]# tmux
[exited]
root@qnaptruenas[/home/truenas_admin]# 1;2c0;276;0c10;rgb:ffff/ffff/ffff11;rgb:0000/0000/0000
zsh: command not found: 1
zsh: command not found: 2c0
zsh: command not found: 276
zsh: command not found: 0c10
zsh: no such file or directory: rgb:ffff/ffff/ffff11
zsh: no such file or directory: rgb:0000/0000/0000
root@qnaptruenas[/home/truenas_admin]#
The characters 1;2c0;276;0c10;rgb:ffff/ffff/ffff11;rgb:0000/0000/0000 ended up on the command line automatically, after tmux exited.
My workaround has been to tmux first and then do sudo -s inside the tmux session.
Just tried this on my master build VM and no issues:
truenas_admin@truenas[~]$
truenas_admin@truenas[~]$ sudo -s
[sudo] password for truenas_admin:
root@truenas[/home/truenas_admin]# tmux
[exited]
root@truenas[/home/truenas_admin]#
Probably worth launching tmux -vv and seeing if the tmux logs it writes have anything interesting.
1 Like
Thanks for that tip!
root@qnaptruenas[/home/truenas_admin]# tmux -vv
sudo: argv[0] mismatch, expected "/usr/bin/zsh", got "-zsh"
[exited]
root@qnaptruenas[/home/truenas_admin]# 1;2c0;276;0c10;rgb:ffff/ffff/ffff11;rgb:0000/0000/0000
That makes me think that 1;2c0;276;0c10;rgb:ffff/ffff/ffff11;rgb:0000/0000/0000 are setup parameters for the tmux session.
There must be some misconfiguration in an init file of sorts. I just don’t know, where to find it, much less to fix it.
Interesting, are you on EE? This has been reported before, but a long time ago. Looks pretty much the same.
Hi,
I just noticed that I cannot start a tmux session as the root user anymore under TrueNAS 24.10:
[image]
I also noticed, that I cannot become root anymore by running sudo su -:
[image]
I think, that this is related. As this happened on an upgraded 24.10 instance as well as on a freshly installed 24.10.0.2 environment (with restored settings from 24.04) I also think that it is not due to something I may have fucked up but that it is probably a bug.
Running tmux as another user still work…
If i do tmux as root on my EE , i get an error
root@nas-01:~# tmux
sudo: argv[0] mismatch, expected "/usr/bin/bash", got "-bash"
[exited]
root@nas-01:~#
If i do it as a “user” it works
Is that an error or ??
1 Like
I’m seeing that same behavior in 25.10.1:
qe-realmini% sudo -s
[sudo] password for testing:
root@qe-realmini[/mnt/tank/testing]# tmux -vv
sudo: argv[0] mismatch, expected "/usr/bin/zsh", got "-zsh"
[exited]
root@qe-realmini[/mnt/tank/testing]# 1;2c0;276;0c10;rgb:ffff/ffff/ffff11;rgb:0000/0000/0000
But not in 26-BETA.1:
truenas_admin@truenas[~]$ sudo -s
[sudo] password for truenas_admin:
root@truenas[/home/truenas_admin]# tmux -vv
[exited]
root@truenas[/home/truenas_admin]#
It may just be that the upstream bug was resolved between the Debian versions each is based on.
This is related to a known bug in sudo that was fixed in debian trixie.
3 Likes