Macããmoshã§æ¥ç¶ãããã¨ããã¨ã¨ã©ã¼ã«ãªã£ãã話ã
ç¾è±¡
- iTerm2ã§moshã³ãã³ãã使ãã¨ã¨ã©ã¼åºã¦æ¥ç¶ã§ããªãã
- Terminalã§ããã¡ã
- sshã¯æ¥ç¶ã§ããã
- ä»ã®Macãããªãmoshãæ¥ç¶ã§ããã
$ mosh vps The locale requested by LC_CTYPE=UTF-8 isn't available here. Running `locale-gen UTF-8' may be necessary. The locale requested by LC_CTYPE=UTF-8 isn't available here. Running `locale-gen UTF-8' may be necessary. mosh-server needs a UTF-8 native locale to run. Unfortunately, the local environment (LC_CTYPE=UTF-8) specifies the character set "US-ASCII", The client-supplied environment (LC_CTYPE=UTF-8) specifies the character set "US-ASCII". locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: LC_ALL?????????????????????: ?????????????????????? LANG=ja_JP.UTF-8 LC_CTYPE=UTF-8 LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL= Connection to example.sakura.ne.jp closed.
çµè«
çµè«ããããã¨ã
- ã¯ã©ã¤ã¢ã³ãå´ã§ããMacã®è¨å®ãåå
- ãµã¼ãå´é¢ä¿ãªã
- Terminal, iTerm2 è¨å®è¦ç´ãããç´ã£ã
解決ã«è³ãã¾ã§
ã¨ã©ã¼ã¡ãã»ã¼ã¸ããLC_CTYPEã¨LC_ALLã«ã¢ã¿ãªãä»ãã¦ãã®ã§ã
sshã§æ¥ç¶ãããµã¼ãã§localeã³ãã³ãå®è¡
ãµã¼ãã®locale
server $ locale LANG=ja_JP.UTF-8 LC_CTYPE="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL=
ãµã¼ãã¯ãããVPS CentOS(ããã©ã«ãã§ja_jp.UTF-8) ã§ç¹ã«åé¡ãªã
æ£å¸¸ã«æ¥ç¶å¯è½ãªMacã®locale
connectable-mac $ locale LANG="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_CTYPE="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_ALL=
æ¥ç¶ä¸å¯è½ãªMacã®locale
unconnectable-mac $ locale LANG="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_CTYPE="UTF-8" # ãããéã! LC_MESSAGES="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_ALL=
LC_CTYPE="UTF-8" ãåå ã£ã½ãã¨ãããã¨ã§ã
Mac から Ubuntu に ssh ログインするとなんかロケール云々で怒られるやつ - 休刊 ボルシチは食べ物です。 ã§ãè¿ããäºä¾ããã£ãã®ã§Terminal, iTerm2 ã®è¨å®ãå¤æ´ãã¦ã¿ãã
Terminal ã¯ããã®ãã§ãã¯ãå¤ã
iTerm2 ã¯ããã®ãã§ãã¯ãå¤ã
ç´ãã¾ããã
(å¤åiTerm2ã¢ãããã¼ãããæã«å¤ãã£ã¡ãã£ãã®ããª)
ãªãã±
åèã«ããã¦ããã£ã Mac から Ubuntu に ssh ログインするとなんかロケール云々で怒られるやつ - 休刊 ボルシチは食べ物です。 ã«è¼ã£ã¦ãã /etc/ssh_config (å®ä½ã¯/private/etc/ssh_config) ãé¢ç½ãã
SSH_CONFIG (5) ãèªãã¨ãµã¼ãå´(/etc/ssh/sshd_config)㧠AcceptEnv LC_CTYPE ããã¦ããã°ãTerminalè¨å®ã§ã /etc/ssh_configã§ã ~/.ssh/ssh_config ã§ãç°å¢å¤æ°ã渡ãããããªã®ã§ãä¾ãã° LC_CTYPE="en_US.UTF-8" ã¨defaultã§è±èªã«è¨å®ããã¦ãããµã¼ãã§ã "ja_JP.UTF-8" ã«ã§ãã¡ãã£ããããã¿ããã