LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-23-2008, 02:29 AM   #1
Вячеслав
LQ Newbie
 
Registered: Jul 2008
Location: Россия
Distribution: Slackware Linux
Posts: 4
Blog Entries: 1

Rep: Reputation: 0
Slackware 12.1 International


How do you do!
I have a question. How to configure the support of the Russian language in the command line, in the names of files and folders in KDE?
Thanks.
 
Old 08-23-2008, 03:15 AM   #2
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
Hi Вячеслав.

Check out scim. It supports the cyrillic alphabet as well as cjk (chinese, japanese, korean) etc.

With it you can enter cyrillic characters mostly anywhere including the command line.
 
Old 08-23-2008, 03:23 AM   #3
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
I am assuming, of course, that you don't want to set up the system totally in russian. If you do, then you should check out how to change the locale.
 
Old 08-23-2008, 03:30 AM   #4
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by Вячеслав View Post
How do you do!
I have a question. How to configure the support of the Russian language in the command line, in the names of files and folders in KDE?
Thanks.
1) Set system locale (LANG) to russian. This is done in /etc/profile.d/lang.sh
Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

export LANG=ru_RU.KOI8-R
2) Select font with russian character map. This is done in /etc/rc.d/rc.font
Code:
#!/bin/sh
#
# This selects your default screen font from among the ones in
# /usr/share/kbd/consolefonts.
#
setfont -v koi8c-8x16 -u koi8r
3) Select russian keyboard map in /etc/rc.d/rc.keymap:
Code:
#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys ru-ms.map
fi
Language (in terminal) will be switched by pressing right ctrl.
4) IN /etc/X11/xorg.conf tune keyboard section like this:
Code:
Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XKbModel" "pc105"
    Option         "XKbLayout" "us,ru(winkeys)"
    Option         "XKbOptions" "grp:rwin_toggle,grp_led:scroll,grp:shifts_toggle"
EndSection
Language will be indicated by scrolllock, and you can toggle language by pressing right "windows" key, or two shifts together. Restart X after modifications.
5) In KDE control center, go to "Regional and Accessibility"->"Country/Region & Language". Press "add language", select russian language, and place it first in list.
6) if you are mounting windows volumes (fat32/ntfs), make sure they use correct codepage or locale.
examples:
ntfs-3g volume:
Code:
/dev/hdc3	/mnt/ntfs1	ntfs-3g		defaults,locale=ru_RU.KOI8-R,gid=users,fmask=113,dmask=003 1 0
cd-rom:
Code:
/dev/hda         /mnt/cdrom       iso9660     users,gid=users,ro,iocharset=koi8-r 0   0
Some of these settings are available fron pkgtool, but I prefer editing configuration directly.

Quote:
Originally Posted by harryhaller View Post
Hi Вячеслав.

Check out scim. It supports the cyrillic alphabet as well as cjk (chinese, japanese, korean) etc.

With it you can enter cyrillic characters mostly anywhere including the command line.
There is NO need to use this to make russian characters work. Slackware already has everything you need for russian support.
 
Old 08-23-2008, 03:36 AM   #5
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by harryhaller View Post
I am assuming, of course, that you don't want to set up the system totally in russian. If you do, then you should check out how to change the locale.
If you don't want to change system completely to russian, then
1) Add section to xorg.conf, as mentioned before.
2) Set /etc/rc.d/rc.keymap and /etc/rc.d/rc.font as I've mentioned before.
3) setup fstab as mentioned before
4) Set system locale (/etc/profile.d/lang.sh) to this:
Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
export LANG=ru_RU.KOI8-R
export LC_MESSAGES=en_US
#export LC_ALL=ru_RU.KOI8-R
This is required, because otherwise KDE might select incorrect encoding for filenames (ISO-8whatever encoding, which no one ever uses).
System messages will be in english, but you'll have russian support.
Unfortunately with this configuration some programs will still detect your locale in russian and print russian text (Qt4 programs). You might even try something like en_US.KOI8-R, but some programs won't understand it.
 
Old 08-23-2008, 03:41 AM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by harryhaller View Post
I am assuming, of course, that you don't want to set up the system totally in russian. If you do, then you should check out how to change the locale.
Changing only locale won't be enough, because you'll need to configure terminal fonts, terminal keymap, and xorg.conf's keyboard configuration. Otherwise you won't be able to type in russian.
 
Old 08-23-2008, 04:10 AM   #7
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
I stand corrected!

Thanks ErV, since I only use scim for learning chinese, my posts had no basis in practice. Your posts were hence also very useful info for me.
 
Old 08-23-2008, 04:53 AM   #8
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by harryhaller View Post
I stand corrected!

Thanks ErV, since I only use scim for learning chinese, my posts had no basis in practice. Your posts were hence also very useful info for me.
Russian doesn't have anything like kanji, so chinese is another story.
 
Old 08-23-2008, 06:34 AM   #9
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
Quite.

SCIM is excellent for simply inputing text in other characters - european, cjk or whatever.
 
Old 08-23-2008, 01:22 PM   #10
Вячеслав
LQ Newbie
 
Registered: Jul 2008
Location: Россия
Distribution: Slackware Linux
Posts: 4
Blog Entries: 1

Original Poster
Rep: Reputation: 0
Thanks for all for such detailed howto.
 
Old 08-24-2008, 06:55 AM   #11
tramni1980
Member
 
Registered: Jul 2006
Location: Tübingen, Germany
Distribution: Slackware64-13.37
Posts: 737

Rep: Reputation: 37
Hello!
I have a question that I think pertains here.

I want to use emacs without X, i.e. in the console only and write utf8 encoded cyrillic text (Bulgarian to be precise). Is there a way to achieve that?
In the Changes and Hints file there was something about enabling utf8 console, probably that is what I should do, but Patrick warns that there is some danger of misinterpretation of some commands. So can I achieve my goal without running into this risk? I wish I could leave everything in english on my machine, I just want to write in console emacs in utf8 Bulgarian.

Regards,
Martin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
International SMS usa1234 Linux - Software 1 07-28-2009 10:54 AM
international chars awl Slackware 8 09-01-2005 02:17 PM
International Package! UltraSoul Linux - Software 2 12-24-2004 09:13 AM
Typing International Characters jrdioko Linux - General 12 09-19-2004 09:21 PM
international cd over_clock Linux - Newbie 3 11-17-2003 07:14 PM


All times are GMT -5. The time now is 01:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration