サーバの Emacs で、 Linux から接続したのか Mac から接続したのかを確認したいが、これはけっこう難しい。結局できなかったのだが、試したやり方をいくつか上げておく。 ssh 接続時の環境変数で判定する ssh は接続後のサーバに環境変数を設定することができるので、それを利用する。 http://d.hatena.ne.jp/taiyo/20080613/p1 クライアントの ~/.ssh/environment か ~/.ssh/rc に CONNECTED_FROM=$OSTYPEだとかを書いておき、サーバの .emacs で (defun connected-from-linux-gnu () ;; processing here if connected from Linux ) (setq ssh-connected-from (getenv "CONNECTED_F