Re: [hackers][slock] making slock set the keyboard layout to English before locking the screen
Hi, yes, thank you very much, I apologize for such a seemingly simple
solution flying over my head.
Also thanks to Augusto Castelo for responding and giving me insight about
how slock works.
On Wed, Oct 19, 2022 at 11:40 AM Daniel Littlewood <
danielittlewood_AT_gmail.com> wrote:
> Hi Lancia. Does "setxkbmap us && slock" do what you want?
>
>
> On Tue, Oct 18, 2022 at 10:23 AM Lancia Greggori
> <lanciagreggori_AT_gmail.com> wrote:
> >
> > Hi gentleman, as the title suggests, I need slock to automatically set
> the keyboard layout to English because sometimes my keyboard layout is in
> another language when slock locks the screen and this causes my typed
> password to be rejected by slock as incorrect because it has been entered
> in foreign characters.
> >
> > What I have tried so far:
> >
> > 1- using setxkbmap(1) with slock(1):
> >
> > $ slock setxkbmap us
> > Authorization required, but no authorization protocol specified
> > Cannot open display ":0"
> >
> > $ slock env setxkbmap us
> > Authorization required, but no authorization protocol specified
> > Cannot open display ":0"
> >
> > 2- editing slock.c and using system(3) to execute setxkbmap(1):
> >
> > system("setxkbmap us");
> >
> > /* everything is now blank. Wait for the correct password */
> > readpw(dpy, &rr, locks, nscreens, hash);
> >
> > output of slock(1):
> >
> > Authorization required, but no authorization protocol specified
> > Cannot open display ":0"
> > Terminated ---> guess: caused by root using killall(1)
> >
> >
> > I am not familiar with Xorg programming, but I am guessing there might
> be a function or something that will set the keyboard layout to English.
> >
> > Can anyone kindly give me pointers or hints?
>
>
Received on Wed Oct 19 2022 - 17:05:34 CEST
This archive was generated by hypermail 2.3.0
: Wed Oct 19 2022 - 18:00:38 CEST