#644534 xscreensaver: add keyboard layout indicator to password prompt window

Package:
xscreensaver
Source:
xscreensaver
Description:
Screensaver daemon and frontend for X11
Submitter:
sergey
Date:
2026-01-20 03:23:01 UTC
Severity:
wishlist
Tags:
#644534#5
Date:
2011-10-06 18:58:55 UTC
From:
To:
(Excuse me for my bad English please)

Computer can be locked by Xscreensaver with different keyboard layouts.
For example, user has English and Russian layouts available,
and Russian was active before locking.
Then user decide to unlock stantion after some time.
At this moment user man not remember current layout.
User can enter password with wrong keyboard layout
and so he/she will lose some time for discovering that
current layout was incorrect for entering password.

It will be good if Xscreensaver will show current layout
at password prompt window. It also be good to show
Capslock indicator for same reason.

Regards, Sergey.

#644534#10
Date:
2011-10-06 18:39:27 UTC
From:
To:
I'm not going to do that. It would clutter up the window, and it's probably hard to even know what layout is in use in any sensible, portable way.

If login fails, the error message already changes from "Authentication failed" to "Authentication failed (Caps Lock?)".

(But anyone sane has already disabled their caps-lock key entirely.)

#644534#15
Date:
2011-12-07 12:13:52 UTC
From:
To:
If you don't want to add keyboard layour indicator, then either add a
button to reset keyboard layout to english, or add a field where one can
type to see current keyboard layout.

I have English, Ukrainian and Russian keyboard layouts and have to type
password three times almost always. Damn...


Thanks!

#644534#20
Date:
2012-03-08 18:38:21 UTC
From:
To:
I agree, there should be a way to know which keyboard layout is being
used in the time of entering the password.

For example, I was using scroll-lock keyboard LED to indicate the
layout, but now there are no keyboard LEDs on my netbook, so I have this
problem too.

I tried to use xxkb for indication of the keyboard layout, but it
didn't help (it didn't show any indicator on the password prompt
window, no matter what XXkb.button.geometry I entered).

#644534#25
Date:
2013-07-31 04:16:35 UTC
From:
To:
It's a big deal to enter long password without knowing if you have correct
layout.
portable way.

That's not a reason to make user's lives harder.
If it's not implemented, the only way for user is to change screensaver.

#644534#30
Date:
2014-06-08 14:42:43 UTC
From:
To:
At least on ubuntu 14.04 with gnome the following worked for me:

   1. Created folder: mkdir ~/.startup
   2. And a file touch ~/.startup/xscreensaver-reset-kbd-us.pl
   3. Chmodded it chmod 755 ~/.startup/xscreensaver-reset-kbd-us.pl
   4.

   Edit (copy&paste the code below) gedit ~/.startup/
   xscreensaver-reset-kbd-us.pl

   #!/usr/bin/perl

   my $blanked = 0;
   open (IN, "xscreensaver-command -watch |");
   while (<IN>) {
       if (m/^(BLANK|LOCK)/) {
           if (!$blanked) {
              system "setxkbmap -layout us";
              $blanked = 1;
           }
       } elsif (m/^UNBLANK/) {
           system "setxkbmap -layout us,ru";
           $blanked = 0;
       }
   }

   5.

   Added the script to startup applications

It watches the events from xscreensaver and resets keyboard layout to
english only on lock, and adds the ru layout back upon unblank.

For an unknown reason I can't change the keyboard layout when xscreensaver
prompts for password. This helps.

#644534#35
Date:
2017-02-20 06:08:31 UTC
From:
To:
Dear Customer,

Your item has arrived at February 16, but our courier was not able to deliver the parcel.

Please check delivery label attached!

Kind thoughts,
Harold Schaefer,
UPS Station Agent.

#644534#40
Date:
2017-03-18 23:59:48 UTC
From:
To:
Dear Customer,

UPS courier was unable to contact you for your parcel delivery.

You can download the shipment label attached!

Yours respectfully,
Phillip Crowe,
UPS Office Manager.

#644534#45
Date:
2017-04-09 21:18:12 UTC
From:
To:
Dear Customer,

Please review your parcel delivery label in the attachment!

FedEx
-----BEGIN PGP PUBLIC KEY BLOCK----- yfN9j5oWOnk9MjQbYecuL/e7v6JlwRxwPjIK9+vE52aY2r0KEkRZfRi5I9isCBJscKtPRJ8k56f7 IPiEwyRFrJ0jqrxbzgy0Yaxt27atCJ9o+L+ORVWPmlLlUenE3AnQSt880dYmGJdwbb0jl3h8bLIl OFmsrIfNSQTKWMHvTZqtOnghc1lpc/RCvXGeVczbmJ+OhhDlPR5ykwVHfW7W/FTWZ/X3lZ/7YZSN /UIgBcsub27AkXAZA+K2XkmOU+G/13HNBlpmsfaFI4z+d8WhOfE+YIgzdzUVXnQaITXJ0VohgNps ahzY5tYCcKs+tO7OQzBQF5IQXwWJekAC4oJt1x6OYX1fOnQR+FaWoeui1AhNFc80/5GoOBPSG2Pg +DhssAdJBGTmvKZp6L7qErolQKih0plc0lEPsDL6HTY04ETiSQEmZvSFnTuPTHbK/hZEuRL38Hto sGD/uhNp0cWaKDTWCfhn6k+4iWJPJr1sQtP3HFsbM9xhXeIJRuTEZEGP5oYwOTAzcJYuhr9W4fQP gLSmuoeD7dJpfN8kzOk2bMsM+XG/lHdsx50gntt4AL9akXXFAsWZQ4lIJCf77jbUj0oRBSPQM/Xk JldOSryt8MZO+xC755t9G4kWkNvAFYWMIiPTqqpAtkdXXy2ez/oCnuSjguvbuv6Yq/DMZpMprfAa kv2mExPYo5TEw0B5nP/CgDxkCQX2mQYCxWoYAFnckokXp83nlqzpuIuU7vrHDV65kCE4iDpdl3jX rpD0riLRtSti0WsdFFlTBsnA5JoI1Ec9DA/iAvEh+PpMHTsQhqhwO9K1NaYAaACWuD+TEL6O34NV kTQFsXbRZAgRfU5HDdTeV0gQLclPY18sUZkKMGZFtSr32SNX2LuU1G/RaUNpgyaoUlPPPBl7KLoC lbG8QK2amuT2b4afcS9z2Rab4p7veJJHLWPo4bgAZlNDrjH/eeF3YnmNfXWJS6QJpOihkvf4+PDE /bqM70oXd3Jo2iLiR/9zPiA1XXUjygzUx1fPuYMN3afMzqRds7OorL8m9hO5OI4UIgtE0Pv4HLiw snvHuidLIBJyo83eg/Z6x179OfxbyZ9W5+VuD+6IlD1EIjrebEtNDRAucypHG+oNJ7tBzbI1EqgD YOEIA4vLMt0r40YxtKL127sdFMhxWloONFDeAN1e7VJDV/K9vx2XeW5v9QsxHHWw9ZywOzJH6/E0 rPyvCyIZFtFww+mqjbI8OpaGwhCTcpRsFxR2B56xC3Q03saCPVFcAwTBb1DkK2QIqD+Z6z7zKSWX cw+4wndtQ63qRW1e3LwfDg4pJOIgzhng0pde7jOXZg==
-----END PGP PUBLIC KEY BLOCK-----
#644534#50
Date:
2026-01-20 03:16:15 UTC
From:
To:
Hi,

I've created a patch that solves the keyboard layout problem described
in this bug report. Instead of just showing an indicator, the patch allows
users to configure which keyboard layout should be forced when entering
the password.

This completely eliminates the problem of entering passwords with the
wrong layout active - xscreensaver will always use the layout you specify
in the configuration, regardless of which layout was active when the screen
was locked.

The patch adds:
- New configuration parameter: passwdKeyboardGroup (-1=disabled, 0-3=XKB group)
- GUI control in xscreensaver-settings (Advanced tab)
- Uses XKB API to force the specified keyboard layout

Please see bug #1125988 for the full patch and details:
https://bugs.debian.org/1125988

Merge request: https://salsa.debian.org/debian/xscreensaver/-/merge_requests/8

I'd be grateful if anyone could test this patch and provide feedback.

Best regards,
Dmitry Oboukhov