hmmm ... I just realized this can be made much simpler. You said that you can perfrom the following tasks
- connect to the server normally
- attach tmux
- run irssi/other-things with no unicode bugs.
If you can connect to the shell of your server, why not add tmux attach
to your .*rc file? If you would like to attach to tmux most times you connect to the server, just have the server automatically attach when you connect (every time).
Using some putty-specific connection method is a bad idea, in my opinion, because it may not work well when/if you change your method of connecting ie. if you change to a non-windows computer. So, instead of attaching to the session by using putty's "remote command", just connect regularly. If you are using a bash shell, add this to the $HOME/.bashrc
file on the server:
if [[ ! -n $TMUX ]] ; then tmux attach ; fi
Then, as soon as you connect it will automatically attach to the tmux session. You can always leave tmux by using detaching:tmux detach
(or you can kill every tmux session killall tmux
if you want to start over).
Of course, if you like, you can then begin to think of a more complex tmux attachment script that creates a custom-new-session OR attaches. Personally, every time I open a terminal, it launches a tmux session script (113 lines long), which sets it up just like I like it ... or it attaches if the session already exists.
$TERM
on the remote machine? Also, please explain the meaning of "remote command in the connection" ... is thisssh username@server -t 'tmux'
or some variant?echo $TERM
(this tells you the value of TERM), I expect "xterm" or something similar. Attach the session and check the output of the same command (it won't be the same). Also, when you connect with "remote connection" being "tmux attach" give the output of the same command, I expect "screen" or something similar. Next, just to make sure, you setup putty to display UTF-8? Also, have you added setterm_charset
in the irrsi config files?echo $LANG