bash - Tmux failed to connect to server error on `tmux ls` when there are no running sessions -


just writing quick loop list out existing tmux sessions when log server, depending on whether tmux installed (via .bashrc on centos).

if rpm -q tmux;     echo -e "tmux sessions running:\n"     echo `tmux ls` fi 

this works great when tmux has session or two, if there no running tmux sessions, i'm getting failed connect server: no such file or directory.

is there way suppress this?

thanks!

note may have tmux server running, cannot connect because cleaned out /tmp directory , took server's socket it.

in case, can tell server recreate socket sending sigusr1 signal.

% ps aux | grep -w [t]mux root     14799  0.2  0.0  36020   488 ?        ss   may08  51:30 tmux % kill -usr1 14799 % tmux ls <list of tmux sessions> 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -