URL highlighting broken with VTE 0.60

Bug #1867746 reported by Egmont Koblinger
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Critical
Bryce Harrington
terminator (Debian)
Fix Released
Unknown
terminator (Ubuntu)
Fix Released
High
Brian Murray

Bug Description

Terminator uses old, long-deprecated API to set up the URL regular expressions. This old API stopped working with VTE 0.60. Terminator should switch to the new API.

See also https://gitlab.gnome.org/GNOME/vte/issues/218.

Tags: focal

Related branches

Bryce Harrington (bryce)
Changed in terminator:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Bryce Harrington (bryce) wrote :

I'm totally unfamiliar with any of the vte code in terminator, and not familiar with vte at all.

However, simple grepping on the deprecated API suggests that these calls:

./terminal.py: self.matches['full_uri'] = self.vte.match_add_gregex(reg, 0)
./terminal.py: self.matches['voip'] = self.vte.match_add_gregex(reg, 0)
./terminal.py: self.matches['addr_only'] = self.vte.match_add_gregex(reg, 0)
./terminal.py: self.matches['email'] = self.vte.match_add_gregex(reg, 0)
./terminal.py: self.matches['nntp'] = self.vte.match_add_gregex(reg, 0)
./terminal.py: self.matches[name] = self.vte.match_add_gregex(reg, 0)
./terminal.py: self.matches[name] = self.vte.match_add_gregex(reg, 0)
./searchbar.py: self.vte.search_set_gregex(self.searchre, 0)

Probably need to be replaced with the equivalent calls of the form:

self.vte.regex_new_for_match(reg, ...)

Need to lookup the python3 vte bindings and see exactly what the corresponding python call signature should be. I.e. what is needed for the '...' part, if any?

Revision history for this message
Brian Murray (brian-murray) wrote :

Egmont - How did you get terminator to print the following?

Terminal::update_url_matches: Failed adding URL matches

Changed in terminator (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: New → In Progress
importance: Undecided → High
Revision history for this message
Bryce Harrington (bryce) wrote :

I've code-reviewed and tested Brian's fix, and it LGTM and WFM. Tested both with a catted text file, and URLs displayed via Mutt (i.e. ncurses).

The patch also applies cleanly to the upstream terminator tree. The test suite is py2 only so I could not run it, however the codebase builds cleanly. I installed to /usr/local/bin and verified the patched upstream terminator works properly for url highlighting.

I did notice 9 instances of the following warning:

$ /usr/local/bin/terminator --no-dbus
(terminator:3493042): VTE-WARNING **: 12:33:26.006: (../src/vtegtk.cc:2173):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_has_multiline_compile_flag(regex)$ /usr/local/bin/terminator --no-dbus)

At least some of these occur around when the URL plugins are loaded, others occur earlier I guess.

Anyway, based on the debdiff review, +1 to landing this in Ubuntu 20.04.

I can also land this to upstream's master bzr tree, if you'd like?

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

> How did you get terminator to print the following?

With Eoan + VTE 0.60, I just execute "terminator" from another terminal emulator.

Bryce Harrington (bryce)
Changed in terminator:
assignee: nobody → Bryce Harrington (bryce)
Revision history for this message
Brian Murray (brian-murray) wrote : Re: [Bug 1867746] Re: URL highlighting broken with VTE 0.60

On Sat, Apr 04, 2020 at 07:42:06PM -0000, Egmont Koblinger wrote:
> > How did you get terminator to print the following?
>
> With Eoan + VTE 0.60, I just execute "terminator" from another terminal
> emulator.

That's what I'd guessed but I didn't realize you had to close all your
running instances of terminator.

--
Brian Murray

Revision history for this message
Brian Murray (brian-murray) wrote :

On Sat, Apr 04, 2020 at 07:42:04PM -0000, Bryce Harrington wrote:
> I've code-reviewed and tested Brian's fix, and it LGTM and WFM. Tested
> both with a catted text file, and URLs displayed via Mutt (i.e.
> ncurses).
>
> The patch also applies cleanly to the upstream terminator tree. The
> test suite is py2 only so I could not run it, however the codebase
> builds cleanly. I installed to /usr/local/bin and verified the patched
> upstream terminator works properly for url highlighting.
>
> I did notice 9 instances of the following warning:
>
> $ /usr/local/bin/terminator --no-dbus
> (terminator:3493042): VTE-WARNING **: 12:33:26.006: (../src/vtegtk.cc:2173):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_has_multiline_compile_flag(regex)$ /usr/local/bin/terminator --no-dbus)
>
> At least some of these occur around when the URL plugins are loaded,
> others occur earlier I guess.

I've found the fix for this too and incorporated it into my PPA. When I
say I literally mean found - somebody has forked terminator.

https://github.com/JAugusto42/terminator/commit/525a591d97b0c46d22edead1f33b03c9ce01144b#diff-bdc83e01c58f95d15c371b67be1b0a53

> Anyway, based on the debdiff review, +1 to landing this in Ubuntu 20.04.

I'll do that this weekend or Monday.

> I can also land this to upstream's master bzr tree, if you'd like?

Sure, I'm fine with that.

--
Brian Murray

Revision history for this message
Markus Frosch (lazyfrosch) wrote :

Hey guys,
we are are starting a new home for Terminator at https://github.com/gnome-terminator/terminator

Read all details here: https://github.com/gnome-terminator/terminator/issues/1

From my perspective https://launchpad.net/terminator is sadly dead, it would be great if people involved with Canonical would join the efforts.

There is also a patch for Debian available:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955383

Our work regarding Python 3 and collecting other patches is currently this issue:
https://github.com/gnome-terminator/terminator/issues/2

Regards
Markus Frosch

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm seeing a weird issue now where only the first instance of terminator or a terminator window (after doing a split) will linkify "LP: #1867746". If I run a screen session and attach to it from the first window the linkifying of LP: works, but in the second window w/ the same screen session it does not.

Revision history for this message
MattRose (mattrose) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

I didn't grab all the changes in pull/6, only enough to fix this specific issue given where we are in the Ubuntu release cycle.

tags: added: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package terminator - 1.91-4ubuntu1

---------------
terminator (1.91-4ubuntu1) focal; urgency=medium

  * Fix url highlighting which was broken with vte 0.60. (LP: #1867746)

 -- Brian Murray <email address hidden> Mon, 13 Apr 2020 09:00:37 -0700

Changed in terminator (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Markus Frosch (lazyfrosch) wrote :

This is fixed in 1.92, which is now hosted on GitHub:
https://github.com/gnome-terminator/terminator/releases

Changed in terminator:
status: Triaged → Fix Released
Changed in terminator (Debian):
status: Unknown → Fix Released
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.