Scrolling ncurses app in xfce4-terminal with mouse wheel not working

Bug #947892 reported by Nils Rennebarth on 2012-03-06
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xfce4-terminal (Ubuntu)
Undecided
RaduStoica

Bug Description

Affects: oneiric ocelot, precise pangolin

vte which xfce4-terminal is based on has a feature to send an application which is using the alternate screen a few cursor up and down keystrokes when the mouse wheel is activated. Most prominent application is the pager ("more" or "less") and in particular when used by "man" for manpage viewing.

Now not all ncurses applications are happy with that feature, e.g. when running "screen" and a shell inside screen, activating the mouse wheel would scroll the shell history instead. That resulted in a patch to vte (still present in vte3_0.31.0, patches/93_add_alt_screen_scroll_toggle.patch) that made the feature toggle-able. The patch was never accepted upstream.
It also changes the default behaviour by (probably accidentally) setting the feature to off. The result of the patch
simply is an new function that can be called to toggle the feature.

Now every package in ubuntu that uses vte needs a patch to eventually call that new function, otherwise its behaviour will differ from upstream.

gnome terminal does so, the patch is still in precise (patch 20_add_alt_screen_toggle_ui.patch)
xfce4-terminal should as well.

The provided patch will add a "hidden" Property, that can only be set manually be editing ~/.config//Terminal/terminalrc and adding the line
  MiscScrollAlternateScreen=TRUE

The old version of my patch made xfce4-terminal segfault when closing the Preferences screen. This version fixes that. The new version also uses a different name because the new version of xfce4-terminal insists on using the "Misc" Prefix for hidden preferences (i.e. not changeable via the GUI) The patch is tested with no ill effects on my desktop and I do use terminals a lot.

Please include this patch into precise, so the LTS release does not suffer from this bug.

Related branches

The attachment "Make scroll alternate screen toggleable for xfce4-terminal" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Launchpad Janitor (janitor) wrote :

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

Changed in xfce4-terminal (Ubuntu):
status: New → Confirmed
Matthias Czapla (dermatsch) wrote :

Nils, can you give a short HOWTO quickly compile and install a custom xfce4-terminal package with your patch applied? That would be most welcome.

On 03/15/2012 10:07 PM, Matthias Czapla wrote:
> Nils, can you give a short HOWTO quickly compile and install a custom
> xfce4-terminal package with your patch applied? That would be most
> welcome.
>
Just the bog standard build procedure:

Make sure, all build dependencies are installed, i.e.

apt-get install debhelper libdbus-glib-1-dev libexo-1-dev \
      libvte-dev libxml-perl libstartup-notification0-dev \
      chrpath intltool libgtk2.0-dev hardening-includes

then unpack the source

apt-get source xfce4-terminal
cd xfce-terminal-0.4.8
mkdir -p debian/patches
cp path-to-patch/10-scroll-alternate-screen-configurable.patch debian/patches
patch -sp1 < debian/patches/10-scroll-alternate-screen-configurable.patch
fakeroot debian/rules binary

That's it.

Matthias Czapla (dermatsch) wrote :

Thanks Nils, it worked! I additionally installed the package devscripts and instead of the last fakeroot command I did as recommended in [1]:

dch --local `id -un`
debuild -us -uc

This appends your username to the version and prevents apt tools from updating the patched package with the official one of the same version. I think a truly newer version will still be installed, which is good.

 [1] http://raphaelhertzog.com/2010/12/15/howto-to-rebuild-debian-packages/

Changed in xfce4-terminal (Ubuntu):
status: Confirmed → Triaged
RaduStoica (radumstoica) on 2012-09-16
Changed in xfce4-terminal (Ubuntu):
status: Triaged → In Progress
assignee: nobody → RaduStoica (radumstoica)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xfce4-terminal - 0.4.8-1ubuntu3

---------------
xfce4-terminal (0.4.8-1ubuntu3) quantal; urgency=low

  * debian/patches:
      - scroll-alternate-src-togglable.patch: enable scrolling in ncurses
        apps with mouse wheel. lp: #947892
 -- Radu Stoica <email address hidden> Sun, 16 Sep 2012 14:38:25 +0300

Changed in xfce4-terminal (Ubuntu):
status: In Progress → Fix Released
Paul-Antoine Arras (listes-a) wrote :

Will this patch be released for Precise LTS ?

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

Other bug subscribers