Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sudo, POSIX и UTF-8
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
Berty
n00b
n00b


Joined: 27 Aug 2007
Posts: 20

PostPosted: Thu Sep 20, 2007 12:59 am    Post subject: sudo, POSIX и UTF-8 Reply with quote

Господа, sudo, зараза такая, исползует локаль POSIX, и через это русские буквы, естественно, не работают в редакторах. Как это пофиксить?
Back to top
View user's profile Send private message
Laitr Keiows
Moderator
Moderator


Joined: 04 Jul 2005
Posts: 891
Location: Kobe, Japan

PostPosted: Thu Sep 20, 2007 9:34 am    Post subject: Reply with quote

Как это?

Code:
 $ sudo locale
LANG=ru_RU.UTF-8
....
Back to top
View user's profile Send private message
mango123
Apprentice
Apprentice


Joined: 07 Dec 2004
Posts: 266
Location: msk

PostPosted: Thu Sep 20, 2007 11:09 am    Post subject: Reply with quote

Laitr Keiows wrote:
Как это?

Code:
 $ sudo locale
LANG=ru_RU.UTF-8
....


Скорее всего он настроил локаль на конкретного пользователя...
А вот рут остался в posix-e

2Berty: А ну ка, что у тебя
тут /etc/conf.d/consolefont
тут /etc/conf.d/keymaps
и тут /etc/env.d/02locale

?
Back to top
View user's profile Send private message
Berty
n00b
n00b


Joined: 27 Aug 2007
Posts: 20

PostPosted: Thu Sep 20, 2007 3:17 pm    Post subject: Reply with quote

# /etc/conf.d/consolefont
Quote:

CONSOLEFONT="ter-k14n"

#CONSOLETRANSLATION="8859-1_to_uni"

# /etc/conf.d/keymaps
Quote:

KEYMAP="-u ru4"

SET_WINDOWKEYS="yes"

EXTENDED_KEYMAPS=""
#EXTENDED_KEYMAPS="backspace keypad euro"

DUMPKEYS_CHARSET="koi8-r "

/etc/env.d/02locale
Quote:

LANG="ru_RU.UTF-8"


Однако, вот что выдаёт sudo locale :
Quote:

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

При этом, если зайти под рутом, или залогиниться с помощью su, то тогда локаль рута будет utf-8 8O. И всё при этом работает как надо.
Back to top
View user's profile Send private message
Laitr Keiows
Moderator
Moderator


Joined: 04 Jul 2005
Posts: 891
Location: Kobe, Japan

PostPosted: Thu Sep 20, 2007 3:43 pm    Post subject: Reply with quote

Покажи-ка: grep Defaults /etc/sudoers а так же groups
Back to top
View user's profile Send private message
Berty
n00b
n00b


Joined: 27 Aug 2007
Posts: 20

PostPosted: Thu Sep 20, 2007 3:54 pm    Post subject: Reply with quote

grep Defaults /etc/sudoers:
Quote:

# Defaults specification
Defaults env_reset
# Defaults:%wheel !env_reset
# Defaults:%users env_keep=TZ
# Defaults:user env_delete-=TERMCAP
# Defaults editor=/usr/bin/vim, !env_editor


groups:
wheel audio video portage.
Back to top
View user's profile Send private message
Laitr Keiows
Moderator
Moderator


Joined: 04 Jul 2005
Posts: 891
Location: Kobe, Japan

PostPosted: Thu Sep 20, 2007 4:32 pm    Post subject: Reply with quote

Раскомментируй:
Code:
Defaults:%wheel !env_reset
Back to top
View user's profile Send private message
Berty
n00b
n00b


Joined: 27 Aug 2007
Posts: 20

PostPosted: Thu Sep 20, 2007 4:34 pm    Post subject: Reply with quote

Работает! Спасибо!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum