how to switch keyboard layout at login screen? [Solved]

Installer Issues via Installer -- Not for global upgrades or upgrading individual packages -- ONLY ISSUES WITH INSTALLATION OF THE OS -- Can't get Sabayon installed, than post here, otherwise use correct forums

Moderator: Moderators

how to switch keyboard layout at login screen? [Solved]

Postby Taras » Tue Jul 05, 2011 15:07

Hi all!

I have just installed sabayon 6 gnome edition x86_64. During install I used Ukrainian localization. Same was for keyboard. For switching layout I used both shift keys (as was stated at keyboard selection page). Now when I tried to boot into my fresh install at login screen I cannot change layout anymore. Ukrainian letters (cyrillic) are not valid for username/password. Still I found no way to change layout (tried numerous combinations of ctrl, alt, shift both left and right). How can I get in? Also change this? I can get into console mode (ctrl+alt+f1), there us keyboard used. What should I change in configs, so I can switch layout? As I can see, this behavior is wrong, so may be this should be changed in install?
Taras
Baby Hen
 
Posts: 3
Joined: Fri Jun 24, 2011 8:15

Re: how to switch keyboard layout at login screen?

Postby Fitzcarraldo » Tue Jul 05, 2011 18:22

I'm not sure I understand what exactly you are trying to achieve, but the steps below should set you up with a consistent Ukrainian locale and keyboard.

N.B. Ukraine locale and keyboard codes can be confused with British codes. keymap=uk is a British keyboard and keymap=ua is a Ukrainian keyboard, whereas in xorg.conf I believe XkbLayout "uk" is Ukrainian (XkbLayout "gb" is definitely British).

All steps need to be executed as root user. If you are unable to use your installation directly, you will need to boot a LiveCD/DVD and chroot into the installation (see HOWTO: chroot from a LiveCD for how to do that).

1. Make sure /etc/conf.d/keymaps has keymap="ua" (this is for the console).

2. Add the following to /etc/X11/xorg.conf and reboot:

Code: Select all
Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option                 "XkbLayout" "uk" # Note that British layout is "gb".
EndSection

If the above two steps alone do not fix it, carry on with the following steps:

3. Edit the file /etc/env.d/02locale and make it:

Code: Select all
LANG="uk_UA.UTF-8"
LC_MESSAGES="uk_UA.UTF-8"
LANGUAGE="uk_UA.UTF-8"
GDM_LANG="uk_UA.UTF-8"
LC_CTYPE="uk_UA.UTF-8"
LC_NUMERIC="uk_UA.UTF-8"
LC_TIME="uk_UA.UTF-8"
LC_COLLATE="uk_UA.UTF-8"
LC_MONETARY="uk_UA.UTF-8"
LC_PAPER="uk_UA.UTF-8"
LC_NAME="uk_UA.UTF-8"
LC_ADDRESS="uk_UA.UTF-8"
LC_TELEPHONE="uk_UA.UTF-8"
LC_MEASUREMENT="uk_UA.UTF-8"
LC_IDENTIFICATION="uk_UA.UTF-8"
SYSFONT="latarcyrheb-sun16"

then update the environment:

Code: Select all
env-update && source /etc/profile

4. Edit the file /etc/locale.gen and make it the following (you can just comment out the other locales rather than deleting them if you want):

Code: Select all
uk_UA ISO-8859-5
uk_UA.UTF-8 UTF-8

(I think ISO-8859-5 should cover your language's font.)

5. Enter the command:

Code: Select all
locale-gen

6. If you're using KDE, make sure you have selected Ukrainian language and Ukrainian keyboard layout via, respectively, Kickoff > System Settings > Locale | Languages | Preferred Languages and Kickoff > System Settings > Input Devices > Keyboard | Layouts | Add Layout. I hardly use GNOME these days, but you'll find the preferences for language and keyboard can be configured in GNOME from one of the menus.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: how to switch keyboard layout at login screen?

Postby Taras » Wed Jul 06, 2011 7:53

Thanks for your answer!

Well, my problem is a bit other, better to say quite opposite. I'm getting to login with Ukrainian layout only, that means I can enter only Cyrillic letters and cannot enter Latin ones. During install I was able to switch my layout and now I can't. So the task is to add another layout so I can get in. Now I can't because username/password were entered (and it must be so) in Latin letters.

I'm using Gnome.
Taras
Baby Hen
 
Posts: 3
Joined: Fri Jun 24, 2011 8:15

Re: how to switch keyboard layout at login screen?

Postby Fitzcarraldo » Wed Jul 06, 2011 12:15

If you want to be able to toggle the keyboard layout on the X Windows log-in screen, you can add multiple keyboard layouts to the xorg.conf file. See, for example, the section titled "Enabling Ukrainian keyboard layout: xorg.conf / HAL" in the article Ukrainianising your computer. Ignore the HAL part as SL 6 no longer uses HAL. Also, if you want to use an American or British keyboard layout on the console (i.e. a TTY, not X Windows), you could have keymap="us" or keymap="uk" in /etc/conf.d/keymaps.

Another useful resource is the Gentoo Localization Guide, as SL is based on Gentoo. [Ignore sections 1 and 2 on the time zone and hardware clock in that article as they relate to an installation before migration to Baselayout2/OpenRC. For clock-related configuration, see HOWTO: Clock, Time, UTC, Dual boot with Windows.]
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: how to switch keyboard layout at login screen?

Postby Taras » Wed Jul 06, 2011 13:28

Thanks!
I think, I can get now through.
Taras
Baby Hen
 
Posts: 3
Joined: Fri Jun 24, 2011 8:15


Return to Installer Issues - Anaconda **Not for Package Manager Stuff**

Who is online

Users browsing this forum: No registered users and 2 guests