Re: Proposal: Using update-alternative to switch input method
Marguerite Su <[email protected]> Fri, 25 Feb 2022 22:14:43 +0800
| Newsgroups | gmane.linux.suse.m17n |
|---|---|
| Message-ID | <CAK0PdAmOj_Mc5LFsKzwefa_cR-UzgmKrC1J2faH-vbxJiufxig@mail.gmail.com> |
--0000000000009da4a505d8d8525c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Aloha! Glad to see you are still alive on the net! We discussed and tried to find the best approach for IMF to work flawlessly on both X11 and Wayland. I have tested that the combination of a systemd user environment generator, a environment.d config and a systemd user service works for fcitx5, so I split a new package named systemd-inputmethod-generator for the generator and the config to see if it can benefit other IMFs like ibus and fcitx4. it=E2=80=99s a wrapper to translate the openSUSE xim.d preference mechanism= to systemd environment. Then ftake suggested update-alternative is also a brilliant idea. But I am a little unsure because it will need a lot of work on every existing IMF package to add the alternative. And as the alternatives are the generators, this approach will not benefit Xorg sessions, which will fallback to the old xim.d approach. Maybe we can use the update alternative on Xorg too? or a joint effort between upstream and downstream? I have been thinking a =E2=80=9Cinputmetho= dd=E2=80=9D(two =E2=80=9Cd=E2=80=9Ds) for long which will do the GTK/QT_IM_MODULE exports f= or all IMFs and work as a wrapper to start all kinds of IMFs. But certainly it=E2=80=99s be= yond my programming capability. What do you think, my best net friend? Either thoughts on openSUSE=E2=80=99= s IMF auto start or any other good ideas are welcome with all my heart Marguerite Weng Xuetian <[email protected]>=E4=BA=8E2022=E5=B9=B42=E6=9C=8825=E6=97=A5 = =E5=91=A8=E4=BA=9421:12=E5=86=99=E9=81=93=EF=BC=9A > On Fri, Feb 25, 2022 at 4:50 AM Marguerite Su <[email protected]> wrote: > > But still, like the name says, an user environment generator can not > work as the 100% replacement for the xim script. We still need to write > lots of systemd stuff (targets and etc) to achieve the goals that were do= ne > via the LibreOffice/gsettings hacks, if you want to end up to an IMF > systemd service > Just to point out, making the IMF a systemd service can be very tricky > for wayland. To use the wayland based input method protocol, certain > wayland compositors (weston, kwin) may pass a socket file descriptor > for the wayland connection for authentication and only such clients > can be used to talk to wayland. > > Unless they are handled in some special away (I implemented a special > tool for fcitx5 to pass over the file descriptor > > https://www.csslayer.info/wordpress/fcitx-dev/fcitx-5-and-multiple-waylan= d-compositor/ > ), the compositor is expected to launch the input method framework > server by themselves. > --0000000000009da4a505d8d8525c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Aloha!</div><div dir=3D"auto"><br></div><div dir=3D"auto"= >Glad to see you are still alive on the net!</div><div dir=3D"auto"><br></d= iv><div dir=3D"auto">We discussed and tried to find the best approach for I= MF to work flawlessly on both X11 and Wayland.</div><div dir=3D"auto"><br><= /div><div dir=3D"auto">I have tested that the combination of a systemd user= environment generator, a environment.d config and a systemd user service w= orks for fcitx5, so I split a new package named systemd-inputmethod-generat= or for the generator and the config to see if it can benefit other IMFs lik= e ibus and fcitx4. it=E2=80=99s a wrapper to translate the openSUSE xim.d p= reference mechanism to systemd environment.</div><div dir=3D"auto"><br></di= v><div dir=3D"auto">Then ftake suggested update-alternative is also a brill= iant idea. But I am a little unsure because it will need a lot of work on e= very existing IMF package to add the alternative. And as the alternatives a= re the generators, this approach will not benefit Xorg sessions, which will= fallback to the old xim.d approach.</div><div dir=3D"auto"><br></div><div = dir=3D"auto">Maybe we can use the update alternative on Xorg too? or a join= t effort between upstream and downstream? I have been thinking a =E2=80=9Ci= nputmethodd=E2=80=9D(two =E2=80=9Cd=E2=80=9Ds) for long which will do the G= TK/QT_IM_MODULE exports for all IMFs and work as a wrapper to start all kin= ds of IMFs. But certainly it=E2=80=99s beyond my programming capability.</d= iv><div dir=3D"auto"><br></div><div dir=3D"auto">What do you think, my best= net friend? Either thoughts on openSUSE=E2=80=99s IMF auto start or any ot= her good ideas are welcome with all my heart=C2=A0</div><div dir=3D"auto"><= br></div><div dir=3D"auto">Marguerite</div><div><br><div class=3D"gmail_quo= te"><div dir=3D"ltr" class=3D"gmail_attr">Weng Xuetian <<a href=3D"mailt= o:[email protected]">[email protected]</a>>=E4=BA=8E2022=E5=B9=B42=E6=9C= =8825=E6=97=A5 =E5=91=A8=E4=BA=9421:12=E5=86=99=E9=81=93=EF=BC=9A<br></div>= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:r= gb(204,204,204)">On Fri, Feb 25, 2022 at 4:50 AM Marguerite Su <<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>> wrote= :<br> > But still, like the name says, an user environment generator can not w= ork as the 100% replacement for the xim script. We still need to write lots= of systemd stuff (targets and etc) to achieve the goals that were done via= the LibreOffice/gsettings hacks,=C2=A0 if you want to end up to an IMF sys= temd service<br> Just to point out, making the IMF a systemd service can be very tricky<br> for wayland. To use the wayland based input method protocol, certain<br> wayland compositors (weston, kwin) may pass a socket file descriptor<br> for the wayland connection for authentication and only such clients<br> can be used to talk to wayland.<br> <br> Unless they are handled in some special away (I implemented a special<br> tool for fcitx5 to pass over the file descriptor<br> <a href=3D"https://www.csslayer.info/wordpress/fcitx-dev/fcitx-5-and-multip= le-wayland-compositor/" rel=3D"noreferrer" target=3D"_blank">https://www.cs= slayer.info/wordpress/fcitx-dev/fcitx-5-and-multiple-wayland-compositor/</a= ><br> ), the compositor is expected to launch the input method framework<br> server by themselves.<br> </blockquote></div></div> --0000000000009da4a505d8d8525c--