The officially official Devuan Forum!

You are not logged in.

#1 2020-04-08 15:18:51

Registered: 2018-11-27
Posts: 26  

IBUS issue

I've got a problem with a (rather old) Lazarus installation (ver.1.6, from Devuan repos). Briefly, whatever symbol I type into the fields, appears doubled (i.e. "aa" instead of "a"). Lazarus developers claim it is due to a number of bugs in ibus, and since it is all not new, there are a number of workarounds for it.
The general description is here: … te_letters:

In order to do that you have a number of options, namely:

    1 - Disable (or set to "none") the Input Method in System Settings->Preferences->Input Method
    2 - Add the three following lines in /etc/profile (system wide)

export GTK_IM_MODULE=gtk-im-context-simple
export QT_IM_MODULE=simple
export XMODIFIERS=@im=none

    3 - Add a file named containing just the 3 lines above in /etc/profile.d (system wide)
    4 - Add the 3 lines above in the home directory ~/.xprofile (per user). If there's no ~/.xprofile in your home directory, you should create one.
    5 - Create a Lazarus launching script containing the same 3 lines. (affects only Lazarus)

Methods 1 and 2 may not survive after a system update, while 3,4 and 5 will.
Be aware that both GTK and QT applications may change dynamically the IM. If you experience the problem in an apparently random way, chances are good that some other application is enabling again an IM and fails to set to default when terminates. If such is the case method 5 is the only one suitable.

What would you suggest to choose? I incline to point 5 as I do not have (apparently) any other ibus-related issues.
And then, how do I create a launching script?

Thank you!

Last edited by Copper36 (2020-04-08 15:21:51)


#2 2020-04-08 17:29:16

From: London
Registered: 2019-03-24
Posts: 668  

Re: IBUS issue

Copper36 wrote:

how do I create a launching script?

Create a file called /usr/lib/lazarus/1.6.2/startlazarus-custom with this content:

GTK_IM_MODULE=gtk-im-context-simple QT_IM_MODULE=simple XMODIFIERS=@im=none /usr/lib/lazarus/1.6.2/startlazarus "$@"

Use chmod +x to make the script executable and then symlink it to /usr/local/bin/, like this:

# ln -s /usr/lib/lazarus/1.6.2/startlazarus-custom /usr/local/bin/startlazarus-1.6.2
# ln -s /usr/lib/lazarus/1.6.2/startlazarus-custom /usr/local/bin/lazarus-ide-1.6.2

Then use this to add the script to the alternatives system:

# update-alternatives \
   --install /usr/bin/lazarus-ide lazarus-ide /usr/lib/lazarus/1.6.2/startlazarus-custom 1060200 \
   --slave /usr/bin/startlazarus startlazarus /usr/lib/lazarus/1.6.2/startlazarus-custom \
   --slave /usr/share/pixmaps/lazarus.xpm lazarus.xpm /usr/share/pixmaps/lazarus-1.6.2.xpm

Finally run this and select the new startlazarus-custom alternative:

# update-alternatives --config lazarus-ide

If you ever upgrade the system or change to the newer Lazarus package from the backports repository then remove the custom script from the alternatives system beforehand:

# update-alternatives --remove lazarus-ide /usr/lib/lazarus/1.6.2/startlazarus-custom

Also remove /usr/lib/lazarus/1.6.2/startlazarus-custom and the /usr/local/bin/startlazarus-1.6.2 & /usr/local/bin/lazarus-ide-1.6.2 symlinks.

After the upgrade you can create new scripts & symlinks and add the new alternative using the new package version names.

"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry


#3 2020-04-12 16:27:37

Registered: 2018-11-27
Posts: 26  

Re: IBUS issue

Thank you very much!
BTW, I completely forgot about the backports (which I did not activate).
I doubt that I'll ever upgrade my system on this machine, so I simply resorted to making an executable script, starting Lazarus 1.8 and put it right into the /usr/bin where the links to Lazarus binaries are. Everything seems to work fine now, thanks again!


Board footer