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

Bug #947892 reported by Nils Rennebarth
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xfce4-terminal (Ubuntu)
Fix Released
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.

Tags: patch

Related branches

Revision history for this message
Nils Rennebarth (nils-rennebarth) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xfce4-terminal (Ubuntu):
status: New → Confirmed
Revision history for this message
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.

Revision history for this message
Nils Rennebarth (nils-rennebarth) wrote : Re: [Bug 947892] Re: Scrolling ncurses app in xfce4-terminal with mouse wheel not working

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.

Revision history for this message
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)
Changed in xfce4-terminal (Ubuntu):
status: Triaged → In Progress
assignee: nobody → RaduStoica (radumstoica)
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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