One keystroke goes double when using groups.

Bug #1318542 reported by Cyril Lavier
138
This bug affects 31 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Medium
Stephen Boddy
terminator (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello.

When I group terminals, the keyboard input is always duplicated in the "slave" terminals.

In the terminal where I'm actually typing, no problem, it displays only what I typed. But on the other terminals, the typing is duplicate.

For example, if I type "abc" in the first terminal, it will type "aabbcc", and this behavior happens for all characters, or entries, like delete, remove or insert.

I will try to perform a screencast of this issue later if needed.

Thanks.

Revision history for this message
Cyril Lavier (davromaniak) wrote :

Hi.

Apparently, it doesn't appears that this issue is valid when I use Gnome (either the Gnome or "Gnome Classic").

And after I installed Gnome (using tasksel "Ubuntu Gnome Desktop"), when I return on LXDE or plain OpenBox, I don't have the issue.

So this issue is only on OpenBox and LXDE (which used OpenBox).

I will try to figure out what component of the tasksel "Ubuntu Gnome Desktop" helps terminator to work well under OpenBox.

Thanks.

Revision history for this message
Guido Zoellner (gzoellner) wrote :

The reported duplication issue is also present in current Ubuntu 14.10 Utopic/Unity, with Terminator 0.97-4 from the Ubuntu Software Center.

Revision history for this message
Kick In (kick-d) wrote :

I have the same behaviour on vivid with terminator 0.97-4 on default unity desktop.

Revision history for this message
trick7 (trick7) wrote :

Typed 'a' in upper left terminator.
...
Clicked on close main terminator window.

Revision history for this message
Valentin Lab (vaab) wrote :

I'm on a 15.04, and hit by the same bug, tried these version:

terminator_0.95+1408~oneiric1_all.deb
terminator_0.97+1491~ubuntu13.04.1_all.deb
terminator_0.97+1516-ubuntu13.10.1_all.deb

from:

http://ppa.launchpad.net/gnome-terminator/nightly/ubuntu/pool/main/t/terminator/

No success. This seems related to be related to the environment used.

It's working on another computer on a 14.04 (version 0.97-2ubuntu0.1 )

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Have you made changes with, or to, IBus? We have bug LP:#1463704 which is actually about getting broadcast compose characters (dead key sequences). The fix provided by the IBus dev ( https://github.com/ibus/ibus/issues/1802#issuecomment-114415370 ) comes in two parts that are needed. If IBus is disabled with the environment variable, then the symptoms are exactly as described here, i.e. one keypress gives one char in broadcast term, and 2 char in receiver terms.

I'm committing a patch to trunk, rev 1611. If someone seeing this problem could try applying it and see if this fixes it, that would be very helpful.

Changed in terminator:
status: New → Incomplete
importance: Undecided → Medium
assignee: nobody → Stephen Boddy (stephen-j-boddy)
Revision history for this message
Niels Kristensen (nielsek) wrote :

I'm still seeing the bug on 15.04 after upgrading to trunk rev 1611.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Balls! Well that's annoying. Not being able to reproduce this makes it pretty impossible to come up with a fix.

Just idle curiosity, but what happens if you kill the IBus process completely? (You do have IBus running, right?) Still broken?

If so, then I may have to try and provide a special version with my turbocharged debugging added on.

Revision history for this message
Niels Kristensen (nielsek) wrote :

It actually works as intended, if I kill the IBus process. :)

I've tried a couple of other things without any luck.. fx running 'IBUS_NO_SNOOPER_APPS=terminator terminator' or 'IBUS_DISABLE_SNOOPER=1 terminator'.

But IBUS_DISABLE_SNOOPER is set by terminator in rev 1611, so I guess that doesn't make any difference anyway.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Double balls! So somehow events are getting through that shouldn't. This is all a bit alien to me (being an English monoglot) never digging too deeply into this stuff, and is especially frustrating as I (and presumably many others) do not see this behaviour.

By the sounds of it you're quite comfortable downloading bzr branches. If I upload a special debug version (might be the weekend before I get chance) would you be OK to run it and capture some debug? (You will be able to run it from the checkout, and it won't eat your files, or electrocute the cat.)

Basic stuff. IBus up and running. Open a window with debug redirected to a file, split once, group, pause + make note of time so I have a point to start looking in the file, type some characters, exit all windows. Then kill ibus and repeat steps, then attach the two files to the ticket.

Possibly stupid question: When you ran 1611 you did make sure to kill any running Terminator instance right? By default the DBus server (if enabled in your config) would cause a second instance to ask for a new window from the already running instance and then exit, which would invalidate your original test where IBus was running.

Revision history for this message
Niels Kristensen (nielsek) wrote :

All Terminator instances where definitely wiped out prior testing.

I'll be happy to run any non-electrocuting debug branches, if that helps out.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

New branch created, containing an experimental new logger I created. It is activated for the Terminal and Terminator classes already, and should hopefully give some kind of insight. It can be found in the newly associated branch.

Updated instructions:
1. IBus up and running.
2. Open a window with debug redirected to a file.
3. Split once, group terminals, then pause + make note of time so I have a point to start looking in the file.
4. Type _a_ character.
5. Exit all windows.
6. Kill IBus and repeat steps 1-5 (different file obviously.)
7. Attach the two files to the ticket.

Revision history for this message
Niels Kristensen (nielsek) wrote :

With ibus running
    14:41:04 - terminals grouped
    14:41:09 - key pressed

Revision history for this message
Niels Kristensen (nielsek) wrote :

Without ibus running
    14:43:53 - terminals grouped
    14:43:59 - key pressed

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

OK, so I can't look at it in detail right now, but when IBus is running we're very definitely receiving two separate KEY_PRESS events. It looks like I'm going to have to dump the entire contents/flags of the events to try and figure out the "why" though.

Either we're receiving extra events because IBus is doing something, or it just occured to me that maybe when the keypress is "emitted" to the other terminals, that somehow IBus is turning that into two events somehow. Very weird stuff. But what is really strange is that I'm running IBus right now, and *do not* have the double char in receivers behaviour.

Changed in terminator:
status: Incomplete → Triaged
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hi Bug subscribers, this is the maintainer (Steve Boddy) of Terminator, who took over from Chris.

In case you were not aware there has been a new release 0.98 of Terminator in the last few days which has many changes, fixes and updates. We also have an ongoing GTK3 port which uses a much more up-to-date libvte.

Even with the ~50 issues closed by that release, and discounting the ~90 outstanding wishlist items, we still have an unwieldy 95 bugs. With the oldest approaching it's 6th birthday and some that haven't seen any updates in nearly 5, it is time for a purge.

My intention is to try and get this list down to a minimum, and for that I need your help.

First I'm going to work through, oldest to newest, setting bugs to Incomplete, pending confirmation that they are still an issue. If after a month there is no feedback, the issue will get closed as Invalid. Here's where you come in. I can't always reproduce, or setting up (i.e. other distros) to even test takes a long time, so I'm going to try crowdsourcing this.

1. Get the latest release. Is it still an issue? If yes, set the confirmed-0.98 tag. For bonus points follow the guide http://gnometerminator.blogspot.com/2015/09/so-you-want-to-try-terminator-gtk3.html and see if the GTK3 branch has same issue, and set the confirmed-gtk3 or notaffected-gtk3 tag.

2. Can you reproduce with an empty/default config file? You can pass "-g temp_config" to do this without affecting your existing config. If you already have Terminator running, you'll need to pass -u as well to disable the DBus.

3. If able to, can you reproduce with another user/guest account?

4. If the issue does not already have clear, precise instructions to reproduce with minimal setup/steps, add them.

5. Put as much info about what you are running.
   * Software/library versions (libvte, gtk, pango, cairo, distro, desktop environment, language)
   * Screens (single or multi)
   * Any unusual / custom packages or configs that might be interacting.

6. If possible attach the config file, unless the issue also happens with an empty one, but mention that.

7. Attach the "-d" debug output from 0.98.

Some common things that cause incidents.

* Strange sizing issues or rapidly shrinking windows - Try turning off Window geometry hints.
* Input (esp. broadcasting duplicate chars etc) problems - Try killing IBus.
* Hand editing of the config file can cause various issues - Due to misunderstanding, incorrect structure or typos.
* Some issues are actually in libvte - This is why testing GTK3 is so important.
* segfaults - Unfortunately these are dying inside the C libraries, and it is usually beyond me to fix those.

Many thanks for your assistance, and hopefully this will get us closer to a bug-free Terminator.

Changed in terminator:
status: Triaged → Incomplete
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

In all honesty linux input + ibus + gtk = bat-sh!t crazy.

When ibus is running two key-press events are received. The first is the same as if IBus is not running. The second is identical apart from a RESERVED gtk modifier mask bit being set. I have pushed an update to the tree which brings it up to date with trunk, and adds extra breakdown of the event internals, and dumps out events regardless of if they are discarded, used, or whatever. If someone could repeat Niels' test, it may give a clue as to what the hell is going on here. (Apologies for the back-and-forth, but this is a strange one.)

And I just realised I didn't give instructions for getting the debug branch:
# bzr branch http://bazaar.launchpad.net/~stephen-j-boddy/terminator/bugfix-1318542-double-chars
# cd bugfix-1318542-double-chars

Now test it with:

# ./terminator -g deletemeconfig -u -d --debug-classes Terminal

(On top of that weirdness, *all* events have the GDK_MOD2_MASK flag set if your num lock is on. That confused the hell out of my for a while, because of course this is neither obvious nor documented anywhere as far as I could see. Grrrrrr)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hello? Anyone still paying attention?

Something I should have said explicitly in #17 was that there was a fix (rev. 1620 of the special branch, but already committed to trunk as 1647) involved that may have fixed the issue. That fix was for people using non-IBus methods for switching keymaps by checking for the existance of the ibus-daemon process.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Right , no one seems interested in responding. I've fixed all use cases to the best of my knowledge. I'm closing this as fix committed.

Changed in terminator:
status: Incomplete → Fix Committed
Revision history for this message
Manuel Seelaus (seelaman) wrote :

Had this issue on a Ubuntu 16.04 installation
Terminator 0.98.1

Killing ibus fixed the double-character behaviour

tags: added: confirmed-0.98
Revision history for this message
Manuel Seelaus (seelaman) wrote :

I tried the GTK3 branch and had the same issue when ibus was running.

Revision history for this message
Manuel Seelaus (seelaman) wrote :

same behaviour on the bugfix-1318542-double-chars branch

Without ibus running
    9:47:52 - Split and Broadcast-all set
    9:48:02 - key pressed

Revision history for this message
Manuel Seelaus (seelaman) wrote :

bugfix-1318542-double-chars branch

With ibus running
    10:04:12 - Split and Broadcast-all set
    10:04:17 - key pressed

Revision history for this message
Rodrigue ROYER (rodrigue-royer) wrote :

I've posted in https://bugs.launchpad.net/ubuntu/+source/terminator/+bug/819775 before discovering this thread but briefly : I can confirm this bug on lubuntu 14.04 LTS

Revision history for this message
Dennis Ullrich (dj-9) wrote :

I have a workaround until the fix is released...

Go to System Settings -> Language Support -> Keyboard Input Method System: None
Then restart your session and the problem is gone.

Changed in terminator:
status: Fix Committed → Fix Released
Revision history for this message
Zhichang Yu (yuzhichang) wrote :

Workaround mentioned at #25 works. However I have a better one, just unset env GTK_IM_MODULE when run terminator.

alias terminator='GTK_IM_MODULE= setsid terminator'

Revision history for this message
Toni Mueller (support-oeko-net) wrote :

I am using 1.90+bzr-1705-1 on Debian/Stretch, together with fcitx and the awesome window manager, but no Gnome, and I have the problem.

Revision history for this message
Cesar Araujo (ca-b) wrote :

I am on Ubuntu 18.10, terminator 1.91 and have the problem with ubuntu default graphical interface.

Revision history for this message
Cripton (cripton) wrote :

Hi, I am also on Ubuntu 18.10, terminator 1.91, all default except nvidia proprietary drivers, all updated

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in terminator (Ubuntu):
status: New → Confirmed
affects: ubuntu → terminator (Ubuntu)
Changed in terminator (Ubuntu):
status: New → Confirmed
Revision history for this message
Molly Fletcher (molly-fletcher) wrote :

I'm seeing the same thing on Centos 7.6.1810 and so far none of the work arounds are working

Revision history for this message
Aidan Samuel (aidan-samuel) wrote :

I'm experiencing this problem in v1.91 after upgrading from 18.04 -> 19.04.

Using the proprietary Nvidia drivers, FWIW.

Revision history for this message
LADISLAV KOSCO (la-ci) wrote :

Hi All,

I've tested workaround based on one suggestion
edit /usr/share/applications/terminator.desktop
change Exec line to
Exec=sh -c "GTK_IM_MODULE= setsid terminator"

for me, running terminator again works as expected. Could it be implemented in package? (just edited desktop entry looks like all that is needed)

Revision history for this message
dogmatic69 (dogmatic69) wrote :

Nothing like searching for a problem and seeing an open bug from 5 years ago..

Also noticed this since being on 1.91

Revision history for this message
alberpilot (alberpilot) wrote :

Hello all

  The workaround described here doesn't work for me ( Exec=sh -c "GTK_IM_MODULE= setsid terminator" ).

Revision history for this message
Halkane (halkane) wrote :

... not for me either...
(even if I try alias terminator='GTK_IM_MODULE= setsid terminator')

(Ubuntu 19.04, gnome 3.32.1)

Revision history for this message
Lorant Nemeth (loci) wrote :

Hi,

same here: Ubuntu 19.04 latest updates: terminator 1.91-4.

Workaround doesn't work for me either. I'm happy to help to investigate the problem as I'm using terminator excessively and this bug renders one of the main 2 features why I'm using terminator unusable.

Br,
 Loci

Revision history for this message
Ryan (drummingsticks) wrote :

Also using Ubuntu 19.04. I attempted the alternative from #34, but it unfortunately does not work.

Revision history for this message
cue (keino) wrote :

I also have that issue on 19.04. I was just happy to start working with Terminator as I have to install stuff on 6 boxes.
I just wanted to type on group broadcast mode and everything got doubled.
I can remember a similar bug within a terminal in a game like RUST.
I cannot believe its still an issue.
What makes Ubuntu different here from other Debian based distros?
I don't get it!

Revision history for this message
cue (keino) wrote :

I solved the issue like follows:

#1 download a kali linux osboxes.org vdi file. Its based on Debian and uses Gnome just like the Ubuntu I used
#2 open a terminal and type: apt install termonator
#3 open Terminator and test the group broadcast feature

It works instantly and the workaround shouldn't steal you much of your lifetime!

See attached picture

Revision history for this message
Laurent Dumont (baconpackets) wrote :

If the workaround is running Kali Linux in a VM, it's not much of a workaround...

I've just tried editing /usr/share/applications/terminator.desktop :

with

Exec=sh -c "GTK_IM_MODULE= setsid terminator"

and broadcast not works correctly.

Revision history for this message
BBROS (pblaszkow5-gmail) wrote :

Exec=sh -c "GTK_IM_MODULE= setsid terminator"

in terminator.desktop works for me, on Ubuntu 19.10, version 1.91-4.

Used config file:

https://pastebin.com/gGvYH6zD

Revision history for this message
Sergio Zia (sergio-zia-f) wrote :

I am on Ubuntu 19.10, terminator 1.91, and I encounter the same problem. The workaround does not work for me.

Revision history for this message
Marc Duboc (icemad) wrote :

GTK_IM_MODULE=setsid did not work for me but removing all env vars but DISPLAY and PATH did work so I tried all and I finally found the faulty env var for me: DBUS_SESSION_BUS_ADDRESS.

I got terminator to work using this command line:

DBUS_SESSION_BUS_ADDRESS='' terminator

Revision history for this message
Lorant Nemeth (loci) wrote :

Ubuntu 19.10:
- both works:
  - sh -c "GTK_IM_MODULE= setsid terminator"
  - sh -c "DBUS_SESSION_BUS_ADDRESS='' terminator"

Revision history for this message
Lorant Nemeth (loci) wrote :

Update: today, the setsid workaround stopped working (I guess after yesterday updates), however the DBUS solution seems to work still

Revision history for this message
Mirror Mirage (mirrormirage) wrote :

Thanks @loci

Ubuntu 20.04 (5.4.0-29 generic x86_64)
 - Either of the following works as well

 - sh -c "GTK_IM_MODULE= setsid terminator"
 - sh -c "DBUS_SESSION_BUS_ADDRESS='' terminator"

Revision history for this message
Pablo Catalina (xkill) wrote :

Confirmed, @loci solution worked fine.

Tested with:
alt+f2
sh -c "DBUS_SESSION_BUS_ADDRESS='' terminator"

Revision history for this message
Jairo Moreno de Barros Junior (master-zion) wrote :

if you have ubuntu 20...

sudo nano /usr/bin/terminator

add after the imports...

del os.environ['DBUS_SESSION_BUS_ADDRESS']

Revision history for this message
BBROS (pblaszkow5-gmail) wrote :

I've installed Pop_OS based on ubuntu 20.04, and for now none of the proposed solution works.

Revision history for this message
terii (quad3datwork) wrote :

Edit the terminator command script.

Example:
vi `which terminator`

After the "import" lines at top... (on my Pop_OS 20.04 just 4 lines), insert following and save file.

os.environ['DBUS_SESSION_BUS_ADDRESS'] = ''

Works for me.

Revision history for this message
David Reagan (jerrac) wrote :

Ran into this on a new install of Pop_OS 20.04.

I edited the menu entry via alacarte and set the command to be:

sh -c "DBUS_SESSION_BUS_ADDRESS='' terminator"

Like #46's solution suggested.

That fixed it.

Revision history for this message
James Lee Rees (bullet841) wrote :

Run in to this problem on a fresh install of Ubuntu 20.04.1 LTS on bare metal.

Tried the above solutions but I am still having the same problem. I am running a Ubuntu 20.04.1 LTS on a separate computer as a VM but don't have this problem on there?

Terminator version is 1.91

Revision history for this message
brian mullan (bmullan) wrote :

This script fixed it for me permanently... broadcast all now works w/out duplicating characters

#!/bin/bash

sudo mv /usr/bin/terminator /usr/bin/terminator.SAVE
cat <<TERMINATOR > /tmp/terminator
sh -c "DBUS_SESSION_BUS_ADDRESS='' /usr/share/terminator/terminator"
TERMINATOR
chmod 755 /tmp/terminator
sudo mv /tmp/terminator /usr/bin

Revision history for this message
Haim Daniel (hdaniel) wrote :

Ubuntu 20.04.1 LTS
terminator version 1.91-4ubuntu1

Had to combine @master-zion and @quad3datwork solutions to put this to work:

sudo vi `which terminator`

after the last import line add the following:

if 'DBUS_SESSION_BUS_ADDRESS' in os.environ:
    del os.environ['DBUS_SESSION_BUS_ADDRESS']
if 'GTK_IM_MODULE' in os.environ:
    del os.environ['GTK_IM_MODULE']

Revision history for this message
Surya Adinata (s114) wrote :

I am using Ubuntu 20.10 with terminator 1.92 and KDE Plasma. I found this solution that works for my computer:

Open im-config on command-line:
im-config

Select yes to select the configuration.

at the input method configuration dialog select "do not set any IM from im-config and use desktop default".

Revision history for this message
Hussein Abdallah (abdallah98) wrote :

I had the same issue with Ubuntu 22.04 LTS + KDE. #57's solution with im-config worked for me .

Revision history for this message
FerminRJ (ferminrj20) wrote (last edit ):

For me, i was tested two solutions that works fine:

WORKAROUND 1:

1. Follow https://bugs.launchpad.net/terminator/+bug/1318542/comments/57
2. Reboot pc or close user session.

WORKAROUND 2:

1. Follow https://bugs.launchpad.net/terminator/+bug/1318542/comments/52
2. close user session an reopen new session.

Revision history for this message
Sebastian (slovdahl) wrote :

I would highly recommend against the approach suggested in https://bugs.launchpad.net/terminator/+bug/1318542/comments/52. Among other things, it breaks things like opening links from Terminator. And if you open other (GUI) programs from Terminator (VS Code by running `code .` in a directory for example), it may break those programs in sublte ways too. I added that workaround some years ago and it took me a week to figure it out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.