How to disable alt-enter=maximize?

Hi,

In 11.4 (both new or upgraded), under gnome, when I type [Alt][Enter] I get
maximize window. If I do the same on gnome-terminal, it does nothing - so
it must be a “feature” of xterm, which 11.2 did not have. Indeed, it is not
listed on the desktop shortcuts.

How do I disable it?

It interferes with Midnight-Commander, alt-enter is used to copy filename
to the command line.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I guess the easiest would be to use gconf-editor and look under /apps/metacity/window_keybindings. There you can disable ‘maximize’. Otherwise you can do it on the command line using gconftool-2 - if we’re talking about Gnome2 (?).

On 2011-05-09 04:06, please try again wrote:
>
> I guess the easiest would be to use gconf-editor and look under
> /apps/metacity/window_keybindings. There you can disable ‘maximize’.
> Otherwise you can do it on the command line using gconftool-2 - if we’re
> talking about Gnome2 (?).

That’s what I said, that it is not there. No application under gnome
maximizes on alt-enter. None, except xterm.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

OK, I see. Yes, you’re right. Only xterm does that (unlike any other terminal program) and it doesn’t do it just under Gnome (I just checked under icewm). It looks like an xterm key binding. I don’t know if it can be disabled through X resources or terminfo, but there would be the place to look. It’s a nice feature though, IMHO.

xterm (255) didn’t do it under 11.3, nor in Mandriva (257). But xterm in openSUSE 11.4 (268) or ArchLinux (269) now does. I would say this shortcut is implemented by default in the latest xterm versions.

If I do “ALT-enter” in an xterm under KDE, it just beeps at me and does nothing.

xterm -xrm "XTerm.fullscreen: never"

or set this resource in your ~/.Xresources.

please try again wrote:

>
> xterm (255) didn’t do it under 11.3, nor in Mandriva (257). But xterm in
> openSUSE 11.4 (268) or ArchLinux (269) now does. I would say this
> shortcut is implemented by default in the latest xterm versions.
>
I found some google result for debian (without a feedback in it if it works)
for the Xresources which should disable it (disclaimer: I did not test it
and do not know if it is debian specific)


XTerm*fullscreen: never
XTerm.omitTranslation: fullscreen

It is definitely a xterm feature not a DE feature, there is a lot of
discussion and bug entries about that xterm [ALT][ENTER] fullscreen feature
not working in the past.


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

martin_helm wrote:

> please try again wrote:
>
>>
>> xterm (255) didn’t do it under 11.3, nor in Mandriva (257). But xterm in
>> openSUSE 11.4 (268) or ArchLinux (269) now does. I would say this
>> shortcut is implemented by default in the latest xterm versions.
>>
> I found some google result for debian (without a feedback in it if it
> works) for the Xresources which should disable it (disclaimer: I did not
> test it and do not know if it is debian specific)
>


> XTerm*fullscreen: never
> XTerm.omitTranslation: fullscreen
> 

> It is definitely a xterm feature not a DE feature, there is a lot of
> discussion and bug entries about that xterm [ALT][ENTER] fullscreen
> feature not working in the past.
>
I found a slightly better post
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg884178.html
where it is said that the above solution works on debian and there is also a
patch attached for xterm, just in case someone is interseted in looking at
it.


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

On 2011-05-09 12:31, martin_helm wrote:
> I found a slightly better post
> http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg884178.html
> where it is said that the above solution works on debian and there is also a
> patch attached for xterm, just in case someone is interseted in looking at
> it.

The patch is empty:


minas-tirith:~/tmp/xterm_patch # tree
..
`-- usr
`-- build
`-- xterm
`-- xterm-269+
|-- MANIFEST.diff
|-- charproc.c.diff
|-- main.c.diff
|-- package
|   |-- debian
|   |   `-- changelog.diff
|   `-- xterm.spec.diff
|-- version.h.diff
`-- xterm.log.html.diff

6 directories, 7 files

All the files have 0 bytes, and there is no resources diff.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-05-09 12:36, please try again wrote:
>
> Code:
> --------------------
> xterm -xrm “XTerm.fullscreen: never”
> --------------------

That does not work.

> or set this resource in your ~/.Xresources.

I don’t have that file. I created it, I added:

XTerm*fullscreen: never
XTerm.omitTranslation: fullscreen

to the end, does not work. I also added it at the end of /etc/X11/Xresources

Doesn’t work either. Unless it needs to logout… No, no good either. :frowning:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Neither does adding the following in /usr/share/X11/app-defaults/XTerm (although it should):

*fullscreen: never

xterm (268) seems to ignore this resource. IMHO It’s either a bug or a compilation option.

Typing this would have been enough:

xrdb -merge ~/.Xresources

Disabling fullscreen on the command line or in ~/.Xresources works with xterm(269) on ArchLinux. That’s where I tried before posting. I could not imagine it wouldn’t work under openSUSE. :frowning:

Try to recompile xterm! It’s not a big deal.

Carlos E. R. wrote:
> The patch is empty:

This is what it contains when I download and unpack it from
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg884178/xterm-269a.patch.gz
and kompare shows me that there are really changes and not none.

If it makes sense to try to patch xterm 269, it can be found here for openSUSE for 11.4
http://download.opensuse.org/repositories/X11:/terminals/openSUSE_11.4
the standard version is 268 on my 11.4 machine.


# ftp://invisible-island.net/xterm/patches/temp//usr/build/xterm/xterm-269a.patch.gz
# patch by Thomas E. Dickey <dickey@invisible-island.net>
# created  Sun Mar 20 19:10:14 UTC 2011
# ------------------------------------------------------------------------------
# MANIFEST                 |    2 +-
# charproc.c               |    6 ++++--
# main.c                   |    4 ++--
# package/debian/changelog |    6 ++++++
# package/xterm.spec       |    4 ++--
# version.h                |    4 ++--
# xterm.log.html           |   12 +++++++++++-
# 7 files changed, 28 insertions(+), 10 deletions(-)
# ------------------------------------------------------------------------------
Index: MANIFEST
--- /usr/build/xterm/xterm-269+/MANIFEST	2011-02-14 00:19:47.000000000 +0000
+++ /usr/build/xterm/xterm-269a/MANIFEST	2011-03-19 14:31:41.000000000 +0000
@@ -1,4 +1,4 @@
-MANIFEST for xterm-269, version xterm-269
+MANIFEST for xterm-270, version xterm-270
--------------------------------------------------------------------------------
MANIFEST                        this file
256colres.h                     resource-definitions for 256-color mode
Index: charproc.c
--- /usr/build/xterm/xterm-269+/charproc.c	2011-02-20 00:50:46.000000000 +0000
+++ /usr/build/xterm/xterm-269a/charproc.c	2011-03-19 14:31:41.000000000 +0000
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.1112 2011/02/20 00:50:46 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1113 2011/03/19 14:31:41 tom Exp $ */

/*
* Copyright 1999-2010,2011 by Thomas E. Dickey
@@ -8860,8 +8860,10 @@
*/
if (resource.fullscreen == esNever) {
for (item = 0; item < XtNumber(table); ++item) {
-	    if (!strcmp(table[item].name, "fullscreen"))
+	    if (!strcmp(table[item].name, "fullscreen")) {
table[item].wanted = False;
+		TRACE(("omit(%s):
%s
", table[item].name, table[item].value));
+	    }
}
}
#endif
Index: main.c
--- /usr/build/xterm/xterm-269+/main.c	2011-02-18 01:24:50.000000000 +0000
+++ /usr/build/xterm/xterm-269a/main.c	2011-03-19 14:31:41.000000000 +0000
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.625 2011/02/18 01:24:50 tom Exp $ */
+/* $XTermId: main.c,v 1.626 2011/03/19 14:31:41 tom Exp $ */

/*
*				 W A R N I N G
@@ -2001,12 +2001,12 @@
application_resources,
XtNumber(application_resources), NULL, 0);
TRACE_XRES();
-	VTInitTranslations();
#if OPT_MAXIMIZE
resource.fullscreen = extendedBoolean(resource.fullscreen_s,
tblFullscreen,
XtNumber(tblFullscreen));
#endif
+	VTInitTranslations();
#if OPT_PTY_HANDSHAKE
resource.wait_for_map0 = resource.wait_for_map;
#endif
Index: package/debian/changelog
--- /usr/build/xterm/xterm-269+/package/debian/changelog	2011-02-14 00:20:56.000000000 +0000
+++ /usr/build/xterm/xterm-269a/package/debian/changelog	2011-03-20 18:54:10.000000000 +0000
@@ -1,3 +1,9 @@
+xterm-dev (270) unstable; urgency=low
+
+  * more fixes for fullscreen toggle.
+
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 20 Mar 2011 14:53:54 -0400
+
xterm-dev (269) unstable; urgency=low

* amend translations for fullscreen toggle.
Index: package/xterm.spec
--- /usr/build/xterm/xterm-269+/package/xterm.spec	2011-02-14 00:19:58.000000000 +0000
+++ /usr/build/xterm/xterm-269a/package/xterm.spec	2011-03-20 18:53:25.000000000 +0000
@@ -1,8 +1,8 @@
-# $XTermId: xterm.spec,v 1.8 2011/02/14 00:19:58 tom Exp $
+# $XTermId: xterm.spec,v 1.9 2011/03/20 18:53:25 tom Exp $
Summary: A text-based Web browser
Name: xterm
Version: dev
-Release: 269
+Release: 270
License: X11
Group: Applications/Internet
Source: xterm-%{release}.tgz
Index: version.h
--- /usr/build/xterm/xterm-269+/version.h	2011-02-14 00:21:29.000000000 +0000
+++ /usr/build/xterm/xterm-269a/version.h	2011-03-19 14:31:41.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * $XTermId: version.h,v 1.327 2011/02/14 00:21:29 tom Exp $
+ * $XTermId: version.h,v 1.328 2011/03/19 14:31:41 tom Exp $
* ----------------------------------------------------------------------------
* this file is part of xterm
*
@@ -39,7 +39,7 @@
* version of X to which this version of xterm has been built.  The number in
* parentheses is my patch number (Thomas E. Dickey).
*/
-#define XTERM_PATCH   269
+#define XTERM_PATCH   270

#ifndef __vendorversion__
#define __vendorversion__ "XTerm"
Index: xterm.log.html
--- /usr/build/xterm/xterm-269+/xterm.log.html	2011-02-20 01:30:19.000000000 +0000
+++ /usr/build/xterm/xterm-269a/xterm.log.html	2011-03-19 14:31:41.000000000 +0000
@@ -31,7 +31,7 @@
* sale, use or other dealings in this Software without prior written        *
* authorization.                                                            *
*****************************************************************************
-  $XTermId: xterm.log.html,v 1.1020 2011/02/20 01:30:19 tom Exp $
+  $XTermId: xterm.log.html,v 1.1021 2011/03/19 14:31:41 tom Exp $
-->
<HTML>
<HEAD>
@@ -56,6 +56,7 @@
is the latest version of this file.

<UL>
+<LI><A HREF="#xterm_dev">Development</A>
<LI><A HREF="#xterm_269">Patch #269 - 2011/02/19</A>
<LI><A HREF="#xterm_268">Patch #268 - 2011/02/10</A>
<LI><A HREF="#xterm_267">Patch #267 - 2010/11/20</A>
@@ -328,6 +329,15 @@
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>

+<H1><A NAME="xterm_dev">Development</A></H1>
+<ul>
+	<li>correct order of initialization for <code>translations</code> vs
+	    <code>fullscreen</code>
+	    resources to enable a special case which omits
+	    the Alt-Enter translation
+	    when <code>fullscreen</code> is disabled (Debian #612978).
+</ul>
+
<H1><A NAME="xterm_269">Patch #269 - 2011/02/19</A></H1>
<ul>
<li>build-fixes for <code>imake</code> (report by Heiko Berges).



PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce 9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia ION | 3GB Ram

On 2011-05-09 15:09, martin_helm wrote:
> Carlos E. R. wrote:
>> The patch is empty:
>
> This is what it contains when I download and unpack it from
> http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg884178/xterm-269a.patch.gz
> and kompare shows me that there are really changes and not none.

I assure you that the targz I downloaded has only 1907 bytes, and when
expanded, it contains several files, those you list below, but all are zero
bytes in length.

However, reading from the patch you post below, it needs changes to the
code, not just to the resources file, so indeed I need a newer package.
I’ll give the repo version you say a try.

…]

It works! Thanyou.

I removed the Xresources changes, and it keeps working.

At least locally, not via ssh -Y from another computer. I wonder why not.
I’m guessing I’ll open a Bugzilla about all this.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-05-09 15:36, please try again wrote:

> Try to recompile xterm! It’s not a big deal.

I got the updated version from the repo martin_helm said, and now it works

  • with the change in the resource removed :slight_smile:

This was very important to me, I use mc a lot, and alt-enter a lot there,
too. It would impair my work.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)