Bug 766607

Summary: "alt" key not passed to programs running in terminal
Product: [Fedora] Fedora Reporter: Jeff Layton <jlayton>
Component: vte3Assignee: Matthias Clasen <mclasen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 16CC: abetakehiko, agrover, aron, behdad, christoph.wickert, dvlasenk, dxklann, farrellj, fedora, felipe.contreras, jan.kratochvil, jbastian, jbrier, jistone, jonabbey, jpokorny, jskarvad, kevin, kparal, louiz, maciek.borzecki, mads, mclasen, me, michaelbabich7, michael, mikeandmore, ondrejj, rdassen, sjoerd, stephane.raimbault, steved, tbzatek, thomas.moschny, tmraz, vpvainio, zkabelac
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 626792 Environment:
Last Closed: 2012-01-12 20:20:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 626792    
Bug Blocks: 767769    

Description Jeff Layton 2011-12-12 12:44:37 UTC
+++ This bug was initially created as a clone of Bug #626792 +++

Opening against gnome-terminal since I'm not sure what actually broke this...

"Alt + numberkey" combinations no longer seem to work in gnome-terminal. Usually when you run gnome-terminal with bash, hitting alt + 1 will give you output like this:

(arg: 1) 

...as of a recent yum update, it just prints out '1'. The alt key seems to be ignored. This breaks a number of apps running within gnome-terminal.

--- Additional comment from zkabelac on 2010-08-24 11:04:46 EDT ---

Not just Alt+number - by any other key as well...

This makes usage of text editors or 'mc' quite painful in gnome-terminal.
Xterm works normally.

In fact it's a bug of 'vte' package vte-0.25.90-1.fc15.

Revert to version: 

vte-0.25.1-2.fc14.x86_64
gnome-terminal-2.31.3-1.fc14.x86_64

Fixes issue for this moment.

--- Additional comment from behdad on 2010-08-24 15:12:20 EDT ---

Should be fixed in the updates, or will be fixed soon.  Already fixed upstream.  There's a dup bug around.

--- Additional comment from jlayton on 2010-08-24 19:15:35 EDT ---

Confirmed... I don't see a newer vte package in koji, but downgrading vte fixed the issue.

Changing to a vte bug.

--- Additional comment from jlayton on 2010-08-30 09:09:51 EDT ---

Still no fixed package in koji. Can you push out an update for this soon? It makes gnome-terminal essentially useless.

--- Additional comment from jlayton on 2010-09-01 07:53:21 EDT ---

Seems to be fixed as of this morning's update (vte-0.25.91-1.fc14.x86_64)

--- Additional comment from zkabelac on 2010-09-24 06:56:31 EDT ---

Why is this bugzilla still open?

--- Additional comment from jlayton on 2010-09-24 07:17:10 EDT ---

Good question. It has been fixed for some time.

--- Additional comment from tmraz on 2011-06-24 09:31:36 EDT ---

I've upgraded with preupgrade from Fedora 13 to Fedora 14 recently. With the current vte-0.26.1-1.fc14 I can still reproduce this bug 100% times.

I have to downgrade to vte-0.25.1-2.fc14 for fix.

--- Additional comment from vpvainio on 2011-11-26 15:18:08 EST ---

I am seeing a bug like this right now on Fedora 16 using:

gnome-terminal-3.2.1-2.fc16.x86_64
gtk3-3.2.2-1.fc16.x86_64
gtk3-3.2.2-1.fc16.i686
vte-0.28.1-1.fc16.x86_64
vte3-0.30.1-2.fc16.x86_64

I found similar bugs with Google:
Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=663779
Ubuntu: https://bugs.launchpad.net/ubuntu/+source/vte/+bug/890555

--- Additional comment from louiz on 2011-11-26 22:50:14 EST ---

Happens to me too.
That bug was previously fixed long time ago, and it’s now broken again, in vte3 I think.

--- Additional comment from agriffis on 2011-11-27 21:48:47 EST ---

Seeing this on F16 in g-t (vte3) and roxterm (vte)

vte-0.28.2-1.fc16.x86_64
vte3-0.30.1-2.fc16.x86_64

--- Additional comment from rdassen on 2011-11-28 04:02:44 EST ---

I'm seeing this since updating to vte-0.28.2-1.fc16 (vte3 was updated to vte3-0.30.1-2.fc16 two weeks earlier without adverse effects). This is quite unfortunate, as this makes it less easy to use irssi effectively.

--- Additional comment from bobby on 2011-11-28 04:10:03 EST ---

esh, I'm also seeing this now in f16 on updates-testing:

vte3-0.30.1-2.fc16.x86_64
vte-0.28.2-1.fc16.x86_64

As JHM mentioned, it seems like the vte update (rather than vte3) is the culprit

--- Additional comment from bobby on 2011-11-28 04:16:52 EST ---

well, downgrading vte to 0.28.1 didn't seem to fix it, and gnome-terminal uses vte3 anyway:


[bpowers@fina ~]$ cat /proc/**/maps | grep vte
3f6d000000-3f6d09b000 r-xp 00000000 fd:00 3708245                        /usr/lib64/libvte2_90.so.9.3000.1
3f6d09b000-3f6d29b000 ---p 0009b000 fd:00 3708245                        /usr/lib64/libvte2_90.so.9.3000.1
3f6d29b000-3f6d29d000 r--p 0009b000 fd:00 3708245                        /usr/lib64/libvte2_90.so.9.3000.1
3f6d29d000-3f6d2a1000 rw-p 0009d000 fd:00 3708245                        /usr/lib64/libvte2_90.so.9.3000.1
7fe7a7e84000-7fe7a7e85000 r--p 00000000 fd:00 5638469                    /usr/share/vte/termcap-2.90/xterm

so I don't think that was the issue.  I'm at a bit of a loss on this one.

--- Additional comment from bobby on 2011-11-28 04:24:17 EST ---

through process of elimination, it seems that gtk3 is the cause of the breakage: https://admin.fedoraproject.org/updates/FEDORA-2011-16356/gtk3-3.2.2-1.fc16 (downgrading gtk3 to 3.2.1-1 enabled me to use the 'alt' key again).

--- Additional comment from bobby on 2011-11-28 04:32:35 EST ---

its most likely fallout from this commit: http://git.gnome.org/browse/gtk+/commit/?h=gtk-3-2&id=273283db9217960970810e90ef841f685231484a

--- Additional comment from davej on 2011-11-28 12:48:29 EST ---

*** Bug 757795 has been marked as a duplicate of this bug. ***

--- Additional comment from davej on 2011-11-28 12:57:43 EST ---

fwiw, I still see this even after downgrading to gtk3-3.2.1-1.fc16.x86_64

--- Additional comment from cebbert on 2011-11-28 13:07:38 EST ---

The other Alt key (Alt Gr, on the right of the spacebar) seems to work for me.

--- Additional comment from thomas.moschny on 2011-12-02 04:08:56 EST ---

For vte there's a patch available in https://bugzilla.gnome.org/show_bug.cgi?id=663779 .

For testing purposes, I've build a vte package with this patch applied, see
  http://thm.fedorapeople.org/vte/

This makes irssi in xfce's Terminal work for me again.

--- Additional comment from thomas.moschny on 2011-12-02 04:09:41 EST ---

*** Bug 759128 has been marked as a duplicate of this bug. ***

--- Additional comment from felipe.contreras on 2011-12-02 20:14:16 EST ---

(In reply to comment #20)
> For testing purposes, I've build a vte package with this patch applied, see
>   http://thm.fedorapeople.org/vte/
> 
> This makes irssi in xfce's Terminal work for me again.

I confirm this fixes the issue for me.

--- Additional comment from farrellj on 2011-12-02 20:50:02 EST ---

I can't live without alt-d for forward-word-delete in bash.

"yum downgrade gtk2 gtk2-immodule-xim" restored my precious alt-d for now. Will be --excluding gtk2\* updates until I see an update with the fix.

--- Additional comment from cwickert on 2011-12-03 10:22:37 EST ---

There seems a bit of confusion, so allow me to summarize:
1. We are facing two different bugs although the symptoms are the same. The bug one from 2010 and F14 is not what we are facing now in F16.
2. The old bug should be fixed.
3. The nex bug was introduced by the gtk2-2.24.8-2.fc16 update, or to be more precise by this commit: http://git.gnome.org/browse/vte/commit/?id=b73782a28894e25ed146271f9d6c6775a6836199
4. The commit makes sense but requires a change in vte, too. There is a bug for this open at https://bugzilla.gnome.org/show_bug.cgi?id=663779
5. There is a patch available at https://bugzilla.gnome.org/attachment.cgi?id=201649 and it is confirmed to fix the issue.
6. As this bug affects all vte based terminals (Xfce's terminal, lilyterm, sakura, termit) we need a fix ASAP.

--- Additional comment from felipe.contreras on 2011-12-03 10:36:45 EST ---

(In reply to comment #24)

> 3. The nex bug was introduced by the gtk2-2.24.8-2.fc16 update, or to be more
> precise by this commit:
> http://git.gnome.org/browse/vte/commit/?id=b73782a28894e25ed146271f9d6c6775a6836199

Is this really a good change? I see Xfce now gets confused about key sequences such as ctrl+alt+del becomes primary+alt+del.

I'd say this change wasn't carefully tested and should be reverted.

--- Additional comment from dmaphy on 2011-12-03 11:19:28 EST ---

*** Bug 759522 has been marked as a duplicate of this bug. ***

--- Additional comment from kevin on 2011-12-06 11:47:36 EST ---

*** Bug 760605 has been marked as a duplicate of this bug. ***

--- Additional comment from davej on 2011-12-08 11:33:01 EST ---

Thomas's rpm's in comment 20 have been working fine for me for the last week with no noticable side-effects.

--- Additional comment from cwickert on 2011-12-10 11:27:09 EST ---

*** Bug 766132 has been marked as a duplicate of this bug. ***

--- Additional comment from jskarvad on 2011-12-12 04:47:11 EST ---

After last update (probably gtk3), I am getting same behaviour in gnome-terminal which worked previously fine. Xterm still works for me.

--- Additional comment from stephane.raimbault on 2011-12-12 06:09:23 EST ---

Yes, me too, may be it's related to:

https://bugzilla.gnome.org/show_bug.cgi?id=663856

--- Additional comment from fedora on 2011-12-12 06:11:03 EST ---

This bug imho is a nice example why bugzilla sometimes is a misleading and confusing tool. We *afaics* talk about one or two bugs in two different places:

- one seems in vte -- the responsible component marked in buzilla since a few days. I assume it can be worked around with the packages from thm (see comment #20)

- one seems to be in the stack that gnome-termial depends on -- that was the assigned component earlier [ and this is why I'm here ;-) ]

Not to mention that this bug was initially for a older release and then reopened, which adds to the confusion. And maybe my comment will lead to even more confusion now, even if I hope it avoids some of it

Comment 1 Jeff Layton 2011-12-12 12:46:49 UTC
Cloned this bug for vte3, as this regression also crept into the recent gtk3 update. Downgrading to gtk3-3.2.1-1.fc16 seems to resolve the problem.

Comment 2 Jonathan Abbey 2011-12-12 14:59:46 UTC
This bit me this morning as well with ROXTerm using gtk3.  Strangely, I couldn't even do ctrl-alt-backspace to kill the X server.. is that going through VTE as well, somehow?

Comment 3 David Klann 2011-12-13 17:17:54 UTC
Per comment #36 in Bug 626792, and Comment #1 above, another confirmation that downgrading to gtk3-3.2.1-1.fc16 (which also pulls in the dependency gtk3-immodule-xim-3.2.1-1.fc16) corrects the improper handling of <Alt> key processing.

Comment 4 Josh Stone 2011-12-13 20:38:52 UTC
See also bug #766918, and as others noted there, vte3-0.30.1-3 from updates-testing fixes the problem for me as well.

Comment 5 Jan ONDREJ 2011-12-13 20:50:16 UTC
gnome-terminal can be fixed by new vte3, but roxterm don't. roxterm does not use vte3, but older version of vte. May be this should be fixed too.

Comment 6 Felipe Contreras 2011-12-13 21:05:37 UTC
(In reply to comment #5)
> gnome-terminal can be fixed by new vte3, but roxterm don't. roxterm does not
> use vte3, but older version of vte. May be this should be fixed too.

Yes, all these clients should be fixed _in rawhide_, in F16 gtk+ should be patches to revert that change ASAP, that's the safest thing to do to be sure everything will be fine. What's wrong with this approach?

Comment 7 Mike Qin 2011-12-16 20:13:41 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > gnome-terminal can be fixed by new vte3, but roxterm don't. roxterm does not
> > use vte3, but older version of vte. May be this should be fixed too.
> 
> Yes, all these clients should be fixed _in rawhide_, in F16 gtk+ should be
> patches to revert that change ASAP, that's the safest thing to do to be sure
> everything will be fine. What's wrong with this approach?

fedora-16 update-testing confirm this problem still exists.

vte3-0.30.1-3.fc16.x86_64
gtk3-3.2.2-3.fc16.x86_64

Keyboard mapping in "System Configuration" (which is under gnome-shell) indicates meta is mapped to alt key.

Comment 8 Thorsten Leemhuis 2011-12-19 20:21:53 UTC
(In reply to comment #7)
>
> fedora-16 update-testing confirm this problem still exists.
> 
> vte3-0.30.1-3.fc16.x86_64
> gtk3-3.2.2-3.fc16.x86_64

did you restart all terminals? Installing all updates from updates-testing fixed the problem on my two main work machines a few days ago

Comment 9 Felipe Contreras 2011-12-19 20:34:30 UTC
(In reply to comment #7)
> fedora-16 update-testing confirm this problem still exists.
> 
> vte3-0.30.1-3.fc16.x86_64
> gtk3-3.2.2-3.fc16.x86_64
> 
> Keyboard mapping in "System Configuration" (which is under gnome-shell)
> indicates meta is mapped to alt key.

That's because the fix is in vte3, and system configuration has nothing to do with that. We would need another bug for system configuration, and pretty much everything else that we find, thus the need for the tracking bug #767769.

Again, that's Fedora 17 material, for Fedora 16 we need to revert the GTK+3 change, which would not affect the vte3 fix. See bug #767767 for that.

I have tested the patch in attachment #547177 [details] and it works fine. I probably can trigger a koji build if anybody is interested.

(In reply to comment #8)
> did you restart all terminals? Installing all updates from updates-testing
> fixed the problem on my two main work machines a few days ago

In the terminals using vte, not the rest of the system that uses GTK+ directly.

Comment 10 Mike Qin 2011-12-19 21:30:31 UTC
(In reply to comment #8)
> (In reply to comment #7)
> >
> > fedora-16 update-testing confirm this problem still exists.
> > 
> > vte3-0.30.1-3.fc16.x86_64
> > gtk3-3.2.2-3.fc16.x86_64
> 
> did you restart all terminals? Installing all updates from updates-testing
> fixed the problem on my two main work machines a few days ago

I rebooted my laptop.  

I'm going to try the patch attachment #547177 [details], hope it could work.

Comment 11 Mike Qin 2011-12-19 21:31:48 UTC
(In reply to comment #9)
> (In reply to comment #7)
> > fedora-16 update-testing confirm this problem still exists.
> > 
> > vte3-0.30.1-3.fc16.x86_64
> > gtk3-3.2.2-3.fc16.x86_64
> > 
> > Keyboard mapping in "System Configuration" (which is under gnome-shell)
> > indicates meta is mapped to alt key.
> 
> That's because the fix is in vte3, and system configuration has nothing to do
> with that. We would need another bug for system configuration, and pretty much

Just to make sure that GDK_META_MASK should be set in vte3.

> everything else that we find, thus the need for the tracking bug #767769.
> 
> Again, that's Fedora 17 material, for Fedora 16 we need to revert the GTK+3
> change, which would not affect the vte3 fix. See bug #767767 for that.
> 
> I have tested the patch in attachment #547177 [details] and it works fine. I probably can
> trigger a koji build if anybody is interested.
> 
> (In reply to comment #8)
> > did you restart all terminals? Installing all updates from updates-testing
> > fixed the problem on my two main work machines a few days ago
> 
> In the terminals using vte, not the rest of the system that uses GTK+ directly.

Comment 12 Mike Qin 2011-12-19 22:27:45 UTC
Sorry for the confusion.  I figure out what's happened on my laptop here.

yum reinstall update the link of /usr/lib64/libvte2_90.so but didn't update the link of /usr/lib64/libvte2_90.so.9, and the latter one was just linked to an old version of vte3 here, which I think should be the one I compiled myself a couple of months ago.

Now it's working here on my laptop.  Sorry again.

Comment 13 Matthias Clasen 2012-01-12 20:20:00 UTC
This should be fixed in current updates