mouse scroll in xfce4-terminal when running vim (man, info) doesn't work

Bug #358796 reported by lukinfore on 2009-04-09
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Won't Fix
xfce4-terminal (Ubuntu)
Lionel Le Folgoc
xubuntu-default-settings (Ubuntu)
Lionel Le Folgoc

Bug Description

Ubuntu jaunty (development branch)

  Installed: 0.2.10-1ubuntu2
  Candidate: 0.2.10-1ubuntu2

I'm not sure this is exactly xfce4-terminal problem, but gnome-terminal handle scroll correctly, and, afair, it works fine on Hardy.

With htop, aptitude both up and down scroll acts as MOUSE1 button, but that appears to be a separate issue.

Lionel Le Folgoc (mrpouit) wrote :


A new xfce4-terminal branch is being developed upstream, and a pre-release (0.2.90) is available. Packages are available for Ubuntu 9.04 (jaunty) in my ppa:
* (for i386)
* (for amd64)

Could you test them to check if your issue is still present?

(btw, I can't reproduce your issue with this new release)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xfce4-terminal -

xfce4-terminal ( karmic; urgency=low

  * Merge from Debian unstable, remaining Ubuntu changes:
    - debian/patches/xubuntu-change-desktop-category.patch: place terminal
      under Accessories, not System.
  * Upload to karmic, bugs fixed:
    - crash when changing font (LP: #353770)
    - mouse scroll doesn't work (LP: #358796)
    - complete corruption (LP: #399558).

xfce4-terminal ( experimental; urgency=low

  * New upstream release candidate.

xfce4-terminal (0.2.90-1ubuntu1~test1) UNRELEASED; urgency=low

  * Test package for the 0.3.x branch.
  * Merge from Debian unstable, remaining Ubuntu changes:
    - debian/patches/xubuntu-change-desktop-category.patch: place terminal
      under Accessories, not System.

xfce4-terminal (0.2.90-1) experimental; urgency=low

  * New upstream alpha release.
    - now use keyboard-friendly preferences window. closes: #401417
  * debian/patches/
    - 00_binary-name-fix-xfce4-terminal.1 refreshed.
    - 02_dont-refresh-prefs-too-much dropped, xfce4-terminal now uses file
    - 03_terminal-nil-value-fix+always_show_tabs-fix dropped, included upstream.
    - 04_fix_activity_on_size_change as well.
  * debian/control:
    - update standards version to 3.8.2.
    - update vte and gtk build-deps.

 -- Lionel Le Folgoc <email address hidden> Fri, 17 Jul 2009 21:34:19 +0200

Changed in xfce4-terminal (Ubuntu):
status: New → Fix Released

Although I installed the above pre-release package, the bug is still present. I double checked, that I had closed all previous instances
of xfce4-terminal and then opened a new one using the menu. Nothing changed, e.g when I run less in an xfce4-terminal and scroll using the mouse wheel, nothing happens.
There are no other settings either that I could activate.

libvte9 has the 93_add_alt_screen_scroll_toggle.patch that not only makes the scroll alternate screen feature configurable
by the application, but also chooses to disable the feature by default. (No idea why, the original patch enabled the feature
by default) So now every application that uses libvte and wants to enable the feature must do it separately. What exactly
did you do to reenable the feature in xfce4-terminal?

Lionel Le Folgoc (mrpouit) wrote :

Indeed, I tested on a system where vte didn't include this patch...

I'm not sure where the bug is though: xfce4-terminal works fine on system with a 'normal' libvte, therefore ubuntu-specific patch 93_add_alt_screen_scroll_toggle.patch shouldn't be applied in the first place...

Changed in xfce4-terminal (Ubuntu):
status: Fix Released → New
lukinfore (lukinfore) wrote :

Sorry for silence. Confirming - nothing changes with 0.2.90-1ubuntu1~test1, still no scroll

The 93_add_alt_screen_scroll_toggle.patch does make sense though (see the discussion in It is a matter of how you are used to work with the mouse, so it should really be a user
preference. What we need for xfce4-terminal is something analogous to the patch to gnome terminal available on the above mentioned gnome bugreport. I might even cook up something in the next week. Would fit well in the Preferences Window
under General/Scrolling) And then some initialization code that calls vte_terminal_set_alternate_screen_scroll depending on the current value of the preference.

IMHO, the real bug was, to accept the 93_add_alt_screen_scroll_toggle.patch in a way, that it disabled the alt screen scroll toggle feature by default. (The original patch of the above bug report does not do that) But in that case someone sooner or later would raise the same complaint as in the above gnome bug against xfce4-terminal, so better do it right and make it configurable anywhere (are there other users of libvte?)

Ok, here is the proposed patch

Lionel Le Folgoc (mrpouit) wrote :

Thanks for the patch!
Apparently it is for xfce4-terminal 0.2.x, which only receives bugfix updates, so it won't get applied. I tried to port it to xfce4-terminal 0.4.x in karmic (most of it applies fine, except the ui that is now using glade -- see patch attached, untested though).

I'm still not very happy with it, since vte_terminal_set_alternate_screen_scroll() is ubuntu-specific, so this patch can't be forwarded upstream, therefore added strings won't be translated (and setting up everything in Rosetta for only two strings seems a bit overkill to me)… :/

Perhaps we could try again to push the vte patch upstream? The latest remark from the developer (Comment 24) wasn't too negative.

Lionel Le Folgoc (mrpouit) wrote :

Another possible solution: drop any change to the ui from the patch (so no string to translate), keep the new behavior disabled, but ship a default terminalrc file in xubuntu-default-settings that enables it. People with an existing configuration won't see any difference, and new users will have the new behavior as expected. The problem is that changing this parameter will require editing manually ~/.config/Terminal/terminalrc, but anyway, I think that people who care about this scrolling issue are able to do that. ;)

(another issue is that the desktop team may decide to drop vte_terminal_set_alternate_screen_scroll() without warning us, but that wouldn't be the first time they act like this, so we should survive :)

Apparently, the patch didn't make it into karmic, and mouse scroll of curses applications (less etc.) still does not work.
Adding the hidden Preference ScrollingAlternateScreen=TRUE does not work either, so the patch got dropped.
Any chance to put it into an xfce4-terminal update?

Changed in xfce4-terminal (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist

This patch restores the scroll alternate screen feature, thus closing the bug. It also adds a hidden
option to the terminalrc file which can be set to FALSE to disable the feature. I also propose to add
the following text to the debian README file:

* Scrolling the alternate screen

In Terminal when you use the scroll wheel when a program is running that uses
the alternate screen and is not mouse aware, the program is sent three up or
down keys instead.

For xfce4-terminal, we have a hidden option in
~/.config/Terminal/terminalrc, callled ScrollingAlternateScreen, which is set
to TRUE by default, enabling the alternate screen scrolling feature. You
can disable the feature by adding a line with
in the terminalrc file.

Changed in xfce4-terminal (Ubuntu):
status: Triaged → In Progress
Changed in xubuntu-default-settings (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Lionel Le Folgoc (mrpouit) wrote :

Thanks for the patch! I'm going to apply it in lucid and upload a new revision of xfce4-terminal. However, this new behavior will be disabled by default in xfce4-terminal (as it's not upstream). A terminalrc file shipped in xubuntu-default-settings will enable it, so most people will use it anyway.

Changed in xubuntu-default-settings (Ubuntu):
status: Triaged → In Progress
Changed in xfce4-terminal (Ubuntu):
assignee: nobody → Lionel Le Folgoc (mrpouit)
Changed in xubuntu-default-settings (Ubuntu):
assignee: nobody → Lionel Le Folgoc (mrpouit)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xubuntu-default-settings - 0.71

xubuntu-default-settings (0.71) lucid; urgency=low

  * etc/xdg/xubuntu/Thunar/volmanrc: use 'totem %d' instead of 'totem dvd:/'
    lp: #459490
  * etc/xdg/xubuntu/Terminal/terminalrc: added, enables vte's scrolling
    alternate screen by default. lp: #358796
  * New translations: da (panel config), pl (panel & thunar).
 -- Lionel Le Folgoc <email address hidden> Sat, 09 Jan 2010 13:22:11 +0100

Changed in xubuntu-default-settings (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xfce4-terminal - 0.4.3-1ubuntu2

xfce4-terminal (0.4.3-1ubuntu2) lucid; urgency=low

  * debian/patches/xubuntu-scroll-alternate-screen-configurable.patch: add
    support for vte's scroll alternate screen feature (thanks Nils Rennebarth
    for the patch!). Feature disabled by default, will be enabled by
    xubuntu-default-settings. lp: #358796
  * debian/README.Debian: explain how to manually disable/enable this feature.
 -- Lionel Le Folgoc <email address hidden> Sat, 09 Jan 2010 13:27:00 +0100

Changed in xfce4-terminal (Ubuntu):
status: In Progress → Fix Released
Lars Volker (lv) wrote :

This bug seems to have reappeared in latest natty. I cannot find any other report related to this on lp though. I Upgraded from lucid via maverick (where i didn't try this) to natty where it's now broken.

The problem also appears in Oneiric. The output of 'man' or 'less' cannot be scrolled using the mouse wheel in xfce4-terminal (0.4.8-1), however in gnome-terminal (3.0.1-0ubuntu3) it works fine.

Also, xfce4-terminal does not seem to recognise the terminalrc option 'ScrollingAlternateScreen'; is it supposed to? I haven't installed xubuntu-default-settings since I'm not using Xubuntu; instead, I did a fresh install of Ubuntu minimal 11.10 and added the Xfce core packages on top. Does that make a difference?

wchan (wchan212) wrote :

Ping on this bug too. Affecting Ubuntu 10.10... can not scroll mouse in VIM for XFCE-Terminal.

jimav (james-avera) wrote :

Still a problem in Ubuntu 11.10 (Xubuntu) -- mouse wheel won't scroll VIM or man in xfce4-terminal

Forest (foresto) wrote :

Same here. Lionel, did you mean to mark this as fixed? I'm using oneric, and the problem persists.

Matthias Czapla (dermatsch) wrote :

ScrollingAlternateScreen=TRUE in ~/.config/Terminal/terminalrc has no effect on Ubuntu 11.10. "strings /usr/bin/xfce4-terminal | grep Scrolling" also doesn't list a string of that name, if that is any indication. Somebody forgot to apply xubuntu-scroll-alternate-screen-configurable.patch?

Rob Kudla (lists-kudla) wrote :

Yes, this has been "unfixed". Not only is the patch missing from the xfce4-terminal-0.4.8 sources available from the xubuntu repos, but the changelog entries referencing this bug and that patch are gone too. I grabbed the patch from an earlier xubuntu diff, and it applied okay (with offsets) and the package built fine. But the change had no effect regardless of where I put the ScrollingAlternateScreen=TRUE config entry.

At that point, "sudo apt-get install gnome-terminal" and right-clicking my terminal launcher to change it to point to GNOME Terminal was a quick and easy workaround for me; if there were any huge dependencies, I already had them installed.

I can confirm that the problem persists in oneiric with xfce4-terminal 0.4.8-1.
However applying my old patch to the current source and installing the result
fixed the problem for me.

To recap:
1) Ubuntu compiles libvte (Source package vte) with some patches,
one of them is the 93_add_alt_screen_scroll_toggle.patch, which makes the
"scroll alternate screen with mouse"-feature runtime configurable. In upstream,
the feature is always on, this patch makes it off by default but the feature can
be turned on by an appropriate method

2) xfce4-terminal in oneiric (0.4.8-1) comes without any patches to upstream.
As upstream does not use a patched vte, they of course did not merge ubuntus
fix for the alternat screen scroll.

3) Applying my patch below adds a hidden
(i.e. can not be set by GUI controls) configuration item
ScrollingAlternateScreen, so entering the line
in ~/.config/Terminal/terminalrc will tell xfce4-terminal to switch the scroll
alternate screen feature on.

4) Apparently xfce4-terminal reconfigures itself when ~/.config/Terminal/terminalrc
is edited while it is running, so I can confirm that entering the line with FALSE will
switch off alternate screen scrolling and reverting back to TRUE switches it on
again. The feature can easily by tested by using less as a pager, then calling
man bash (or any sufficiently long manpage) and activating the scroll wheel in
the window.

IMHO, the vte patch 93_add_alt_screen_scroll_toggle.patch is done wrong: Making
an upstream feature (alternate screen scroll) configurable may be a good idea, some
people may not like it, so it's a matter of personal preferences. But making it
switched off be default, and by that changing all applications (terminal emulators) that
depend on the lib is clearly wrong.

Rolf, I do not know, why the patch did not fix the problem for you. Did you verify, that the sources have really
been patched? (I don't know how to convince the build system to apply the patch during fakeroot debian/rules binary,
so I applied it by hand) Did you really install the newly build package? And (most importantly) did you close all instances
of xfce4-terminal before trying again? If not, calling the new binary will simply tell the running binary to open
another window and exit, so the newly opened window still runs the old code.

Changed in xfce4-terminal:
importance: Unknown → Wishlist
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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