View previous topic :: View next topic |
Author |
Message |
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Mon Jul 24, 2017 6:30 pm Post subject: Change keyboard layout for Gnome Login [Solved] |
|
|
Hello,
I changed every place I know from english to german keyboard layout but unfortunately only the login of GDM still persists in english.
How can I change this to german too?
Kind Regards
Richard
Last edited by Spargeltarzan on Sun Jul 30, 2017 11:33 am; edited 1 time in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Jul 24, 2017 7:09 pm Post subject: |
|
|
No idea how gdm has evolve, if it's still using xorg and not some weird drivers, here's how to make an xorg in french (adapt with your legion code)
keyboard content of /etc/X11/xorg.conf.d/97-evdev.conf
Code: |
Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "fr"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "AutoServerLayout" "on"
EndSection
|
|
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Mon Jul 24, 2017 7:19 pm Post subject: |
|
|
I use it under Xorg because the Gentoo handbook says this is still the official way. Wayland will come with 3.24
But I use libinput instead of evdev synaptics, because with libinput my touchpad settings are available in the GNOME settings. Anyway, the issue persisted also with evdev synaptics
I have no config file /etc/X11/xorg.conf.d/. Is it sensful with libinput to create one?
Regards |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Jul 24, 2017 7:30 pm Post subject: |
|
|
Spargeltarzan wrote: | I have no config file /etc/X11/xorg.conf.d/. Is it sensful with libinput to create one? |
Your computer won't explode because you have create a directory and a file in it no?
So at worst nothing, at best, working, worth a try.
ps: if it explode, a sorry with be enough? |
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Mon Jul 24, 2017 7:52 pm Post subject: |
|
|
I tried, no explosions, but it made my windows-key to stop working for launching apps. Also it didn't fix the keyboard layout.
Any other idea? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Tue Jul 25, 2017 12:17 am Post subject: |
|
|
Are you using dantrell's GNOME 3 without systemd, or bog-standard GNOME 3? If the latter, you could try the following:
Code: | # localectl list-keymaps
# localectl set-keymap de
# localectl list-x11-keymap-layouts
# localectl set-x11-keymap de
# env-update && source /etc/profile |
EDIT: Corrected typo "locatectl" -> "localectl". _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog
Last edited by Fitzcarraldo on Tue Jul 25, 2017 11:50 am; edited 1 time in total |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Tue Jul 25, 2017 7:07 am Post subject: |
|
|
krinn wrote: | (adapt with your legion code) |
Oh. Are we a legion ? |
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Tue Jul 25, 2017 8:09 am Post subject: |
|
|
Yes I use dantrell's GNOME 3 without systemd. As I said I would reinvestigate to change to GNOME system.d if it is more stable, future-proof, ... I thought with GNOME without system.d I will have the better solution since Gentoo uses rc. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
|
Back to top |
|
|
sdoubleyou n00b
Joined: 27 May 2016 Posts: 42
|
Posted: Tue Jul 25, 2017 4:46 pm Post subject: |
|
|
Do you have a ~/.dmc? There you can enter the following
Code: | [Desktop]
Language=de_DE.UTF-8
Layout=de nodeadkeys |
|
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Wed Jul 26, 2017 8:25 am Post subject: |
|
|
Hi,
I tried now three ways,
-) I do not have a ~/.dmc, but I created one without success
-) I have read the GDM manual and tried to set with the gconf-editor the /apps/gdm/simple-greeter/recent-layouts variable, but this path is not existing in the editor
-) "I've put "setxkbmap de" (replace de with your layout code) in the last line of /etc/gdm/Init/Default. Works." --> Doesn't work for me.
I believe I have a strange setup for GDM. In my other thread I posted the issue that immediately after login, the system locks me out again. The second login (now with german keyboard!) works. I believe it is only locked...
Any other idea?
Regards
Richard |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jul 26, 2017 8:43 am Post subject: |
|
|
you changed so many settings. try reboot? _________________ "Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey |
|
Back to top |
|
|
sdoubleyou n00b
Joined: 27 May 2016 Posts: 42
|
Posted: Wed Jul 26, 2017 9:02 am Post subject: |
|
|
The user's default session and the language selection are stored in the ~ / .dmrc file. When a user logs in for the first time, this file is created based on the values entered by the user. The user can change these default values each time they log in by simply re-entering. GDM stores these changes for the following registrations.
The ~ / .dmrc file is saved in the INI format. It contains a section called [Desktop], which contains two keys: Session and Language.
The Session key defines the base name of the .desktop file that the user typically wants to use, but without the .desktop extension. The Language key specifies the default language that the user wants to use. If any key is missing, the system-wide default is used. The file normally looks as follows:
Code: | [Desktop]
Session=gnome
Language=de_DE.UTF-8 |
You can read this in your native language under https://help.gnome.org/admin/gdm/3.22/gdm.html#userconfig
Question is, did you define de-De.UTF-8 in the locale.gen? |
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Wed Jul 26, 2017 10:25 am Post subject: |
|
|
Of course I rebooted...
I have put 4 entries in locale.gen.
en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
In my graphical gnome settings I have put only german as input source.
In GDM no selection for different layouts are available.
I did a re-emerge of gdm and issued locale-gen as well.
In my ~ no ./dmrc file is available
Code: |
lenovo-yoga ~ # ls -la /home/richard/
insgesamt 124
drwxr-xr-x 21 richard richard 4096 26. Jul 12:12 .
drwxr-xr-x 3 root root 4096 21. Jul 18:53 ..
-rw------- 1 richard richard 19266 26. Jul 12:12 .ICEauthority
-rw------- 1 richard richard 2074 26. Jul 12:09 .bash_history
-rw-r--r-- 1 richard richard 127 13. Jul 06:00 .bash_logout
-rw-r--r-- 1 richard richard 204 13. Jul 06:00 .bash_profile
-rw-r--r-- 1 richard richard 551 13. Jul 06:00 .bashrc
drwx------ 126 richard richard 4096 26. Jul 12:12 .cache
drwx------ 19 richard richard 4096 26. Jul 10:47 .config
drwx------ 3 richard richard 4096 23. Jul 02:03 .dbus
drwx------ 2 richard richard 4096 23. Jul 02:03 .gnupg
-rw------- 1 richard richard 0 24. Jul 15:08 .lesshsQ
drwx------ 3 richard richard 4096 23. Jul 02:03 .local
drwxr-xr-x 3 richard richard 4096 24. Jul 12:17 .macromedia
drwx------ 4 richard richard 4096 23. Jul 14:02 .mozilla
drwx------ 3 richard richard 4096 23. Jul 17:52 .pki
drwx------ 2 richard richard 4096 13. Jul 07:58 .ssh
drwxr-xr-x 2 richard richard 4096 24. Jul 21:36 Aufnahmen
drwxr-xr-x 2 richard richard 4096 23. Jul 02:03 Bilder
drwxr-xr-x 2 richard richard 4096 26. Jul 12:08 Dokumente
drwxr-xr-x 2 richard richard 4096 24. Jul 14:38 Downloads
drwxr-xr-x 2 richard richard 4096 23. Jul 02:03 Musik
drwxr-xr-x 2 richard richard 4096 23. Jul 02:03 Schreibtisch
drwxr-xr-x 2 richard richard 4096 24. Jul 22:07 Videos
drwxr-xr-x 2 richard richard 4096 23. Jul 02:03 Vorlagen
drwxr-xr-x 2 richard richard 4096 24. Jul 21:59 dwhelper
drwxr-xr-x 2 richard richard 4096 23. Jul 02:03 Öffentlich
|
I again created the .dmrc with the [Desktop] section and de-UTF-8 language, but the problem persists... |
|
Back to top |
|
|
josephg l33t
Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Wed Jul 26, 2017 11:58 am Post subject: |
|
|
Spargeltarzan wrote: | I have put 4 entries in locale.gen.
en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE.UTF-8 UTF-8 |
you only need one entry in locale.gen, for example mine is
Code: | $ cat /etc/locale.gen
en_GB.UTF-8 UTF-8 |
what do the following commands show?
Code: | $ locale -a
$ localedef --list-archive
$ eselect locale list |
_________________ "Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey |
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Wed Jul 26, 2017 8:10 pm Post subject: |
|
|
Hi,
Even with only one entry, the german utf-8 in locale.gen the problem still persists.
Here is the output:
Code: |
lenovo-yoga ~ # locale -a
C
POSIX
de_DE
de_DE.iso88591
de_DE.utf8
deutsch
en_US
en_US.iso88591
en_US.utf8
german
lenovo-yoga ~ # localedef --list-archive
de_DE
de_DE.iso88591
de_DE.utf8
deutsch
en_US
en_US.iso88591
en_US.utf8
german
lenovo-yoga ~ # eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] de_DE
[4] de_DE.iso88591
[5] de_DE.utf8 *
[6] deutsch
[7] en_US
[8] en_US.iso88591
[9] en_US.utf8
[10] german
[ ] (free form)
lenovo-yoga ~ #
|
After I changed to german UTF-8 only:
Code: |
lenovo-yoga ~ # locale -a
C
POSIX
de_DE.utf8
lenovo-yoga ~ # localedef --list-archive
de_DE.utf8
lenovo-yoga ~ # eselect locale list
Available targets for the LANG variable:
[1] C
[2] POSIX
[3] de_DE.utf8 *
[ ] (free form)
| [/quote] |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Thu Jul 27, 2017 9:58 am Post subject: |
|
|
Did you enter the following command after changing the locale?:
Code: | # env-update && source /etc/profile |
Ref. https://wiki.gentoo.org/wiki/Localization/Guide
Spargeltarzan wrote: | "I've put "setxkbmap de" (replace de with your layout code) in the last line of /etc/gdm/Init/Default. Works." --> Doesn't work for me. |
Just to be sure, you did put the "setxkbmap de" before the "exit 0", right?
Have you edited /etc/conf.d/keymaps to have keymap="de"? _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Thu Jul 27, 2017 1:25 pm Post subject: |
|
|
Your problem piqued my curiosity, so I have just now installed the GNOME 3 edition of Sabayon Linux (a binary derivative of Gentoo with its own overlay) in a virtual machine. I opted to use Sabayon Linux to investigate your problem because it is quick to install and similar to Gentoo. Sabayon Linux uses systemd rather than OpenRC, but I found that, even with systemd, GNOME 3 in Sabayon Linux exhibits the same problem you are experiencing. So I don't think the problem is specific to dantrell's OpenRC edition of GNOME 3; I think it is a general problem with GNOME 3.
Anyway, I did get GDM to use the German keyboard by default in the end, but it took a bit of messing around to get it to work:
Step 1. I did the usual set up of the German locale that has already been discussed:
Code: | # cat /etc/locale.gen
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
# locale-gen
* Generating 4 locales (this might take a while) with 1 jobs
* (1/4) Generating de_DE.ISO-8859-1 ... [ ok ]
* (2/4) Generating de_DE.UTF-8 ... [ ok ]
* (3/4) Generating en_GB.ISO-8859-1 ... [ ok ]
* (4/4) Generating en_GB.UTF-8 ... [ ok ]
* Generation complete
# env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache... |
Step 2. I added the "setkbmap de" command to the end of /etc/gdm/Init/Default (I'm not sure this is necessary):
Code: | # tail /etc/gdm/Init/Default
elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then
$SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS"
elif [ -n "$XKBSYMBOLS" ]; then
$SETXKBMAP -symbols "$XKBSYMBOLS"
fi
fi
fi
fi
setkbmap de
exit 0 |
Step 3. I used 'Applications' > 'System Tools' > 'Settings' > 'Region & Language' and added the German keyboard under 'Input Sources', and moved 'German' to the top of the list of input sources. It appears to me that it is necessary to move German to the top of the list if you want the German keyboard layout to be the default in GDM.
Step 4. On the panel at the top of the screen, I selected the German keyboard layout, then I logged out.
Step 5. At the top of the GDM greeter screen, I selected the German keyboard layout.
Step 6. At the top of the GDM greeter screen, I then clicked on the Shutdown icon and shutdown the machine.
Step 7. I then booted the machine and the GDM greeter screen now shows German (de) as the default keyboard layout instead of English. I can logout, login, reboot and shutdown, and the keyboard layout on the GDM greeter screen now remains as German. (It took quite a bit of tinkering to get it to work in GNOME 3, which has put me off GNOME 3 even more! )
EDIT: Yep, just proved it to myself: Step 2 is not necessary. The essential step to get German (or any other keyboard layout) to be the default layout on the GDM greeter screen is that it must be at the top of the list of input sources (Step 3). _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Fri Jul 28, 2017 9:35 am Post subject: |
|
|
Thank you for your great enthusiasm!
Step 1 & 3 I did already. With only one input source in the Region & Language Settings no selection appears in the top panel. I added a second input source German (Österreich) and now I have the selection menu in the top panel:
-) de1 Deutsch Österreich
-) de2 Deutsch
When I only lock my screen, the GDM greeter shows the selection menu in the panel and I can select german and the german layout works.
But when I completely lock of, no selection menu in the panel is shown. Also after a reboot the menu doesn't appear. I tried both german and german (Österreich) but without success.
What could I miss that in the greeter only it doesn't show the menu?? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Jul 28, 2017 2:38 pm Post subject: |
|
|
I'm not sure, as I don't use GNOME. But googling shows some possibilities. I know you're using dantrell's GNOME without systemd, but some of the things I have found for GNOME with systemd might still be relevant in your case. I notice the following from the documention for the systemd command localectl (see my first post):
Quote: | localectl may be used to query and change the system locale and keyboard layout settings. It communicates with systemd-localed( to modify files such as /etc/locale.conf and /etc/vconsole.conf.
The system locale controls the language settings of system services and of the UI before the user logs in, such as the display manager, as well as the default for users after login.
The keyboard settings control the keyboard layout used on the text console and of the graphical UI before the user logs in, such as the display manager, as well as the default for users after login.
Note that the changes performed using this tool might require the initramfs to be rebuilt to take effect during early system boot. The initramfs is not rebuilt automatically by localectl. |
So, what do your files /etc/locale.conf and /etc/vconsole.conf contain? Here's what my test virtual machine running GNOME & systemd has:
Code: | # cat /etc/locale.conf
LANG=en_GB.UTF-8
# cat /etc/vconsole.conf
KEYMAP=uk
FONT=eurlatgr
|
Those do indeed correspond to the language and the keymap at the top of my list (I specified the following 'Inputs Sources': 1. English (UK), 2. English (US) and 3. Portuguese (Brazil)) in 'Applications' > 'System Tools' > 'Settings' > 'Region & Language'.
And, importantly, this is what GNOME's 'Applications' > 'System Tools' > 'Settings' > 'Region & Language' also created:
Code: | $ cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "gb,us,br"
Option "XkbVariant" ",,"
EndSection |
Notice that GNOME has added the three keyboard layouts ('Input Sources') that I specified in 'Applications' > 'System Tools' > 'Settings' > 'Region & Language'. So you should also edit (or create, if you don't already have an X Windows keyboard configuration file) such a file with the correct settings.
Furthermore, have you tried adding other languages and keymaps to your installation, to see what effect it has on GDM? You can always revert later back to only German if you don't want the additional locales and keymaps. I suggest you try the following:
Step 1. Edit locale.gen as shown below then generate some addtional locales and a new profile:
Code: | # cat /etc/locale.gen
de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_AT ISO-8859-1
de_AT.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
en_US ISO-8859-1
en_US.UTF-8 UTF-8 |
Code: | # locale-gen
# env-update && source /etc/profile |
You can see the list of acceptable locales in the file /usr/share/i18n/SUPPORTED
Step 2. Configure GNOME to specify the language and the list of keymaps ('input sources'):
Use 'Applications' > 'System Tools' > 'Settings' > 'Region & Language' and: a) specify the Language as German; b) specify the Format as Germany; c) add the German, Austrian, British English and American English keyboards under 'Input Sources', and move 'German' to the top of the list of input sources.
Step 3. Check that you have an X11 keyboard configuration file with the correct keymaps:
Code: | $ cat /etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "de,at,gb,us"
Option "XkbVariant" ",,"
EndSection |
The keymap order must be the same as you specified in 'Applications' > 'System Tools' > 'Settings' > 'Region & Language'.
The acceptable keyboard layouts are listed in the file /usr/share/X11/xkb/rules/base.lst
Step 4. On the panel at the top of the screen, select the German keyboard layout, then log out.
Step 5. At the top of the GDM greeter screen, select the German keyboard layout.
Step 6. At the top of the GDM greeter screen, click on the Shutdown icon and reboot the machine. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Spargeltarzan Guru
Joined: 23 Jul 2017 Posts: 317
|
Posted: Fri Jul 28, 2017 9:46 pm Post subject: |
|
|
Hi,
It works! I created the /etc/X11/xorg.conf.d/00-keyboard.conf and adjusted the order of the keyboard layouts according to Region & Language in the settings. Afterwards changes in GNOME settings were applied in the 00-keyboard.conf and I am able to use the german layout.
An /etc/locale.conf and /etc/vconsole.conf additionally is not necessary when using GNOME without systemd.
Thank you very much! |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Jul 28, 2017 10:18 pm Post subject: |
|
|
You're welcome. Glad it now works. \o/
(You might want to edit your first post in this thread and add "[Solved]" to the end of the Subject line.) _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
|