For me tmux ls works, though I am a bit confused here, as you are using a convention that signals “run as root” while I see a user id thats definitely not roots in the output.
Could you run the equivalent ps without resolving UIDs or at least show the UID of luser and tell us who has the UID 1000?
That’s curious you didn’t find how to install screen, it installs exactly like you installed tmux
As for your tmux issue, it seems you are running tmux ls as root from the # prefixing your commands, and you started tmux as luser, which is a different user.
Indeed, running a program controlling your terminal requires to force ssh to have a TTY.
I’d recommend using this code in your shell for remote ssh server instead of explicitly calling tmux attach
test -z "$TMUX" && tmux attach
Upon login on the remote system, if you are not in a tmux, attach to the tmux server. The check is to avoid infinite tmux recursion when creating a new shell within the tmux.
You can add a check for an existing tmux server if you want.
You just need to ssh into the server, and no need to run tmux attach
I don’t think it is a root issue.
I set up $TMUX_TMPDIR and build tmux myself and it works for most of the cases. while my tmux cannot my sessions in one of my shared clusters:
(base) [yerong2@golubh2 ~]$ tmux ls
no server running on /scratch/yerong/tmux/tmux-1103445/default