Comment 39 for bug 401497

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I'm attaching a script which should make the situation more bearable for system admins.

To summarize the problem:
=========================
 * In some countries, two layouts are needed by default.
 * Console-setup correctly supports that, e.g. XKBLAYOUT='[us,gr]'.
 * Gdm makes the wrong assumption that "only one layout can be the system default" so it only keeps the first one, e.g. [us].
That's broken behavior.

A proposed fix for gdm, *without any UI changes*:
=================================================
 * In the login screen, there's a combo box with all the possible keyboard layouts.
 * Gdm could just add an additional, default entry there:
   [Use the system default layouts]
 * That entry should be selected by default.
 * If the user selected that entry, gdm should copy the system defaults from console-setup to the gconf keys (see the attached script).

Until gdm is fixed, sysadmins could use the attached script like this:
======================================================================
 * Copy it to /usr/bin/apply-system-default-layout
 * chmod +x /usr/bin/apply-system-default-layout
 * cat <<EOF > /etc/xdg/autostart/apply-system-default-layout
[Desktop Entry]
Name=Apply the system default layout
Exec=/usr/bin/apply-system-default-layout
OnlyShowIn=GNOME;
Icon=preferences-desktop-keyboard
Terminal=false
Type=Application
EOF
 * The default system layout would then be applied to all users.
   But some users may need a different layout than the system default.
   Those users should disable the script from System > Preferences > Startup programs.