Re: [gdm-list] layout selection



Hi,

On Sun, Aug 7, 2011 at 1:46 PM, † <govnototalitarizm gmail com> wrote:
> I'd like to add layout selection to my greeter:
>
> - to select and apply kb layout for the greeter itself (e. g. logon screen)
> - to select and apply kb layout for the gnome session (e. g. after user have logged in)
>
> Could you help me on how to properly use 'SelectLayout', 'DefaultLayoutNameChanged'
> and other dbus signals to do that?
Previously the way it worked was SelectLayout was called any time the
user switched layouts in the greeter.  that information would get sent
to the processing handling the authentication conversation, so that
after authenticating (and we knew the user's home directory was
available) we could save the infomration in ~/.dmrc

DefaultLayoutNameChanged was emitted when the ~/.dmrc is first
available to read, so the greeter could italicize the user's "default"
layout in the layout list.

The whole thing didn't work very well though.  It turns out a
significant number of multiple layout users want to enter their
username and password in a different layout than they want post-login.
 Also, the code in general has been plagued with bugs (races between
SelectLayout/DefaultLayoutNameChanged, dropping auxillary information
about the layout in the greeter, etc).

The new plan is to provide the same interface the shell is going to provide:

https://live.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/InputLanguage

but make it specific to the greeter, and not the user.

> Btw, what's the proper way to get currently active kb layout? All the samples I've
> found only deals with getting all possible layout variants instead of the one which
> is currently active.
I believe it's something like xkl_config_rec_get_from_server to get
the list of grouped layouts, and then xkl_engine_get_current_state to
get the currently locked group.

--Ray


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]