LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2010, 06:02 PM   #1
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Rep: Reputation: 16
How to change the keyboard layout (I have English-Russian set-up, Russian kbd wrong)


I have Debian running in Russian and English.
The Russian keyboard layout isn't the typewriter standard, which I know and much prefer to the one it gives me.

NOTE: I am NOT using KDE or gnome. (ratpoison is my windows manager.) I need to solve this via CLI-based solution, I want it to affect the keyboard I get both in ratpoison and in a basic CLI tty (when I'm not in X).

How do I do that?
Thanks in advance!
 
Old 05-02-2010, 09:07 PM   #2
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,573

Rep: Reputation: 210Reputation: 210Reputation: 210
I think "dpkg-reconfigure xserver-xorg" gives options to change the keyboard setting.
 
Old 05-02-2010, 09:09 PM   #3
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
Presumably not for the non-X tty CLI consoles, though, right?
 
Old 05-03-2010, 03:56 AM   #4
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Arch, Fedora
Posts: 54

Rep: Reputation: 15
$ setxkbmap ru

I've not used ratpoison but I don't see from what I've checked on the web that setxkbmap should not work with it.

How you go on when you are not using an X server ... ?
 
Old 05-03-2010, 08:01 AM   #5
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
ratpoison uses the X-server.
 
Old 05-03-2010, 08:47 AM   #6
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
How do I use setxkbmap to set ONE variant of the keyboard layout for ONE of TWO installed languages?

$setxkbmap -ru-cp1251, for example, is accepted, but doesn't appear to change anything.
 
Old 05-03-2010, 09:29 AM   #7
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Arch, Fedora
Posts: 54

Rep: Reputation: 15
/usr/share/X11/xkb/rules/xorg.lst

Under:

! layout
...
...

...
...

phonetic ru: Phonetic
phonetic_winkeys ru: Phonetic Winkeys
typewriter ru: Typewriter
legacy ru: Legacy
tt ru: Tatar
os_legacy ru: Ossetian, legacy
os_winkeys ru: Ossetian, Winkeys
cv ru: Chuvash
cv_latin ru: Chuvash Latin
udm ru: Udmurt
kom ru: Komi
sah ru: Yakut
xal ru: Kalmyk
dos ru: DOS
bak ru: Bashkirian

So:

$ setxkbmap ru -variant typewriter

will give the typewriter variant of Russian.
 
1 members found this post helpful.
Old 05-03-2010, 09:51 AM   #8
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Arch, Fedora
Posts: 54

Rep: Reputation: 15
One should perhaps point out that Gnome has an additional keyboard "layer" so that each application can be set to use a different keyboard. It also means that you don't lose things like Ctrl+C, Ctrl+X, Ctrl+V when you change the keyboard to a non-Roman alphabet.

Unless things have changed recently even KDE works directly on the setxkbmap settings.
 
Old 05-03-2010, 10:25 AM   #9
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
Awesome, r-t... partially.
Yes, that changed the keyboard to the layout I wanted... after which I couldn't switch back to English in X and had to reboot.

BUT when I rebooted the computer and restarted X, it was back to where I started.

What I want is to preserve the option to switch between RU and EN, but I want to set the RU keyboard layout PERMANENTLY to 'typewriter'.
 
Old 05-03-2010, 10:35 AM   #10
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by r-t View Post
One should perhaps point out that Gnome has an additional keyboard "layer" so that each application can be set to use a different keyboard. It also means that you don't lose things like Ctrl+C, Ctrl+X, Ctrl+V when you change the keyboard to a non-Roman alphabet.

Unless things have changed recently even KDE works directly on the setxkbmap settings.
I do want this to work throughout X - especially, of course, in Writer and similar programs.

But, really - everywhere. Ideally, even in the non-X interface.

The most crucial thing, though, is to get it working in X, in word processing.
 
Old 05-03-2010, 11:04 AM   #11
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Arch, Fedora
Posts: 54

Rep: Reputation: 15
Well, of course, once you have typed:

$ setxkbmap us

or

$ setxkbmap gb

and

$ setxkbmap ru -variant typewriter

and any others into the command line, you can use the keyboard up-arrow to select which you want.

The other option is to edit xorg.conf (see, for example:

http://tech.groups.yahoo.com/group/OmegaT/message/11593 ) and set it to toggle using specified keys.

But the "smoothest" option as far as I know is to use Gnome and set things up at Keyboard Preferences with a Keyboard Indicator in the desktop tray/panel. (Unless you are talking about Java applications!)
 
Old 05-03-2010, 11:14 AM   #12
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
I set up Debian with the 2 kbds.
I did go into xorg.conf and saw a "variant" section in the section on the RU keyboard. I changed it to "typewriter"... but it doesn't work.
By which I mean that it shifts to the same Russian keyboard layout it had before.
 
Old 05-03-2010, 11:27 AM   #13
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Arch, Fedora
Posts: 54

Rep: Reputation: 15
Perhaps you put the variant in brackets as here:

http://www.daemonforums.org/showthread.php?t=1830

My xorg.conf on Fedora however has no keyboard information in it at all – it just seems to be used to set up the nVidia video card.

Last edited by r-t; 05-03-2010 at 11:29 AM.
 
Old 05-03-2010, 11:58 AM   #14
Wombat Pete
Member
 
Registered: Apr 2010
Distribution: Starting with Debian. When I've learn it passably well, moving to Gentoo. Opinions are appreciated!
Posts: 69

Original Poster
Rep: Reputation: 16
OK, largely (but NOT completely) solved!
In xorg.conf, the point isn't to make the "XKBVariant" variable read "typewriter," but to have the "XKBLayout" variable read "us,ru(typewriter)"
It is the addition of "(typewriter)" that did the trick!

BUT one thing is left:
How do I affect/alter the choice of the layout of the Russian keyboard when I hit alt-shift and I'm *NOT* in X? Just in a tty? The choice IS, somehow, being made.

Thanks, all!
 
Old 05-03-2010, 03:51 PM   #15
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Arch, Fedora
Posts: 54

Rep: Reputation: 15
Looks like that question has drawn a bit of a blank before:

http://www.linuxquestions.org/questi...layout-278253/

Although from this post it looks as if "loadkeys" is necessary:

http://www.linuxquestions.org/questi...d-line-499375/

Last edited by r-t; 05-03-2010 at 03:55 PM.
 
  


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
LXer: New russian blog "Digged Linux Articles in Russian" LXer Syndicated Linux News 0 07-31-2007 06:16 AM
Selecting layout for secondary keyboard (Russian) lathuile Ubuntu 2 01-02-2007 11:24 AM
Russian Ukrainian Keyboard Layout Desperado2006 SUSE / openSUSE 2 09-04-2006 03:05 AM
Russian vertual keyboard GameMaker Linux - Software 1 02-26-2006 03:23 AM
Alt Keyboard Layout Setup esp Russian luegner Slackware 1 11-23-2003 01:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:20 AM.

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
Open Source Consulting | Domain Registration