There is two environment variables for locale setup:
LANG
for POSIX setlocale(3)
family functions;MM_CHARSET
for applications MIME chararter set.The best way is using /etc/login.conf
russian
user's login class
in passwd(5)
entry login class position.
See login.conf(5)
for details.
First of all check your /etc/login.conf
have
russian
login class, this entry may looks like:
russian:Russian Users Accounts:\ :charset=KOI8-R:\ :lang=ru_RU.KOI8-R:\ :tc=default:
If you use vipw(8)
for adding new users,
/etc/master.passwd
entry should looks like:
user:password:1111:11:russian:0:0:User Name:/home/user:/bin/csh
If you use adduser(8)
for adding new users:
defaultclass = russianin
/etc/adduser.conf
(you must enter default
class for all non-Russian
users in this case);russian
each time when you see
Enter login class: default []:prompt from
adduser(8)
;# adduser -class russianfor each Russian user you want to add.
If you use pw(8)
for adding new users, call it in this form:
# pw useradd user_name -L russian
If you don't want to use login class method for some reasons, just set this two environment variables in the following shell startup files:
/etc/profile
:
LANG=ru_RU.KOI8-R; export LANG MM_CHARSET=KOI8-R; export MM_CHARSET
/etc/csh.login
:
setenv LANG ru_RU.KOI8-R setenv MM_CHARSET KOI8-R
Alternatively you can add this instructions to
/usr/share/skel/dot.profile
:
(similar to /etc/profile
above);
/usr/share/skel/dot.login
:
(similar to /etc/csh.login
above).