Tmux as Login Shell

Raspbian

$ whoami
pi

$ sudo apt update

$ sudo apt install -y tmux

$ sudo chsh -s /usr/bin/tmux $USER

Archlinux

$ whoami
root

$ pacman -Sy --no-confirm tmux

$ echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen

$ locale-gen

$ localectl set-locale LANG=en_US.UTF-8

$ localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: n/a

$ echo '/usr/bin/tmux' >> /etc/shells

$ cp ~alarmpi/.bash_profile ~

$ chsh -s /usr/bin/tmux $USER

You need to config locale.

~/.tmux.conf

set -g default-shell /bin/bash  
set -g mode-keys vi  

~/.bashrc

if ! tmux has-session -t $USER 2> /dev/null  
then  
  tmux rename-session $USER
fi  
if ! [[ $(tmux display-message -p '#S') == $USER ]]  
then  
  tmux switch-client -t $USER
  tmux kill-session -a -t $USER
fi