回文章列表
作者StringR.bbs@ptt.cc (MoO~) 看板: linux
標題Re: [問題] 請問如何偵測使用者登入在本機?
時間批踢踢實業 (2008/08/21 Thu 22:42:03)
※ 引述《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。

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

--
※ 發信站: 批踢踢實業坊(ptt.cc) 
◆ From: 61.216.118.113
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻