請問如何偵測使用者登入在本機? - Linux

Table of Contents

※ 引述《chiucs (ChiuCS)》之銘言:
: if [ "`/sbin/consoletype`" = "vt" ]; then
: unset LANG
: else
: LANG=zh_TW.Big5
: fi
: this is what i use in my .bashrc.
: I only install some server package, no X-window.

日前試了一下,這方法看來只有在no x-window模式下有效。

如果用x-window的話,無論本機或遠端登入,consoletype都只會回應pty。

但是還是謝謝您的回應!:)

--

All Comments