diff -pruN 3.30.0-1/debian/changelog 3.30.0-1ubuntu1/debian/changelog
--- 3.30.0-1/debian/changelog	2018-09-08 15:20:13.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/changelog	2018-09-12 14:30:08.000000000 +0000
@@ -1,3 +1,41 @@
+gnome-terminal (3.30.0-1ubuntu1) cosmic; urgency=medium
+
+  * Merge with debian (LP: #1791373), remaining changes:
+    + gnome-terminal.wrap, debian/rules:
+      - Add a wrapper script to restore command line compatibility.
+    + debian/control.in:
+      - gnome-terminal depends on python3, python3-gi and gir1.2-glib-2.0 for
+        the wrapper script.
+      - Don't Build-Depend on PCRE2
+    + Add 0001-Restore-transparency.patch:
+      - Restore transparency support
+    + Add 0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch:
+      - Add CSS names and style classes so we can theme things more easily.
+    + Add 0001-screen-window-Extra-padding-around-transparent-termi.patch:
+      - Fix transparency on Wayland. Patch by Owen Taylor, via Debarshi Ray @
+        Fedora (LP: #1650395)
+    + Add 52_support_apturl.patch:
+      - Support apt: urls.
+    + Add 60_add_lp_handler.patch:
+      - Add a handler for launchpad bug URLs.
+    + Add scrollbar-background-theming.patch:
+      - Draw background under the scrollbar that matches the actual terminal
+        background color. This allows proper theming.
+    + Add debian/patches/revert-pcre2.patch:
+      - Revert changes that require PCRE2 since it's not in main
+        (see MIR #163666)
+  * Keep 006-fix-invalid-appstream-metadata.patch:
+    - Ubuntu's AppStream versions and http://appstream.ubuntu.com/
+      don't support gnome-terminal's syntax yet
+  * Refreshed Patches:
+    + debian/patches/50_add_unity_quicklist.patch:
+      - Dropped as upstream includes this feature now
+  * debian/rules:
+    - Stop installing compatibility version of gnome-terminal.desktop
+      (LP: #1739263)
+
+ -- Marco Trevisan (Treviño) <marco@ubuntu.com>  Wed, 12 Sep 2018 15:30:08 +0100
+
 gnome-terminal (3.30.0-1) unstable; urgency=medium
 
   [ Marco Trevisan (Treviño) ]
@@ -15,6 +53,43 @@ gnome-terminal (3.30.0-1) unstable; urge
 
  -- Jeremy Bicha <jbicha@debian.org>  Sat, 08 Sep 2018 11:20:13 -0400
 
+gnome-terminal (3.28.2-1ubuntu1) cosmic; urgency=medium
+
+  * Merge with Debian. Remaining changes:
+    + debian/rules:
+      - Install compatibility version of gnome-terminal.desktop
+    + gnome-terminal.wrap, debian/rules:
+      - Add a wrapper script to restore command line compatibility.
+    + debian/control.in:
+      - gnome-terminal depends on python3, python3-gi and gir1.2-glib-2.0 for
+        the wrapper script.
+      - Don't Build-Depend on PCRE2
+    + Add 0001-Restore-transparency.patch:
+      - Restore transparency support
+    + Add 0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch:
+      - Add CSS names and style classes so we can theme things more easily.
+    + Add 0001-screen-window-Extra-padding-around-transparent-termi.patch:
+      - Fix transparency on Wayland. Patch by Owen Taylor, via Debarshi Ray @
+        Fedora (LP: #1650395)
+    + Add 50_add_unity_quicklist.patch:
+      - Add Unity quicklist menu item.
+    + Add 52_support_apturl.patch:
+      - Support apt: urls.
+    + Add 60_add_lp_handler.patch:
+      - Add a handler for launchpad bug URLs.
+    + Add scrollbar-background-theming.patch:
+      - Draw background under the scrollbar that matches the actual terminal
+        background color. This allows proper theming.
+    + Add debian/patches/revert-pcre2.patch:
+      - Revert changes that require PCRE2 since it's not in main
+        (see MIR #163666)
+  * Keep 006-fix-invalid-appstream-metadata.patch:
+    - Ubuntu's AppStream versions and http://appstream.ubuntu.com/
+      don't support gnome-terminal's syntax yet
+  * debian/{gbp.conf,control{,.in}}: Update for Ubuntu
+
+ -- Iain Lane <laney@debian.org>  Wed, 30 May 2018 13:47:09 +0100
+
 gnome-terminal (3.28.2-1) unstable; urgency=medium
 
   [ Iain Lane ]
@@ -34,6 +109,49 @@ gnome-terminal (3.28.1-2) unstable; urge
 
  -- Jeremy Bicha <jbicha@debian.org>  Fri, 11 May 2018 19:37:03 -0400
 
+gnome-terminal (3.28.1-1ubuntu2) cosmic; urgency=medium
+
+  * Restore File > New Tab menu item. Thanks Debarshi Ray for the suggestion.
+    (LP: #1747171)
+
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Fri, 11 May 2018 17:15:21 -0400
+
+gnome-terminal (3.28.1-1ubuntu1) bionic; urgency=medium
+
+  * Merge with Debian. Remaining changes:
+    + debian/rules:
+      - Install compatibility version of gnome-terminal.desktop
+    + gnome-terminal.wrap, debian/rules:
+      - Add a wrapper script to restore command line compatibility.
+    + debian/control.in:
+      - gnome-terminal depends on python3, python3-gi and gir1.2-glib-2.0 for
+        the wrapper script.
+      - Don't Build-Depend on PCRE2
+    + Add 0001-Restore-transparency.patch:
+      - Restore transparency support
+    + Add 0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch:
+      - Add CSS names and style classes so we can theme things more easily.
+    + Add 0001-screen-window-Extra-padding-around-transparent-termi.patch:
+      - Fix transparency on Wayland. Patch by Owen Taylor, via Debarshi Ray @
+        Fedora (LP: #1650395)
+    + Add 50_add_unity_quicklist.patch:
+      - Add Unity quicklist menu item.
+    + Add 52_support_apturl.patch:
+      - Support apt: urls.
+    + Add 60_add_lp_handler.patch:
+      - Add a handler for launchpad bug URLs.
+    + Add scrollbar-background-theming.patch:
+      - Draw background under the scrollbar that matches the actual terminal
+        background color. This allows proper theming.
+    + Add debian/patches/revert-pcre2.patch:
+      - Revert changes that require PCRE2 since it's not in main
+        (see MIR #163666)
+  * Keep 006-fix-invalid-appstream-metadata.patch:
+    - Ubuntu's AppStream versions and http://appstream.ubuntu.com/
+      don't support gnome-terminal's syntax yet
+
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Tue, 10 Apr 2018 14:17:12 -0400
+
 gnome-terminal (3.28.1-1) unstable; urgency=medium
 
   * New upstream release
@@ -44,6 +162,39 @@ gnome-terminal (3.28.1-1) unstable; urge
 
  -- Jeremy Bicha <jbicha@debian.org>  Mon, 09 Apr 2018 18:21:41 -0400
 
+gnome-terminal (3.28.0-1ubuntu1) bionic; urgency=medium
+
+  * Merge with Debian. Remaining changes:
+    + debian/rules:
+      - Install compatibility version of gnome-terminal.desktop
+    + gnome-terminal.wrap, debian/rules:
+      - Add a wrapper script to restore command line compatibility.
+    + debian/control.in:
+      - gnome-terminal depends on python3, python3-gi and gir1.2-glib-2.0 for
+        the wrapper script.
+      - Don't Build-Depend on PCRE2
+    + Add 0001-Restore-transparency.patch:
+      - Restore transparency support
+    + Add 0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch:
+      - Add CSS names and style classes so we can theme things more easily.
+    + Add 0001-screen-window-Extra-padding-around-transparent-termi.patch:
+      - Fix transparency on Wayland. Patch by Owen Taylor, via Debarshi Ray @
+        Fedora (LP: #1650395)
+    + Add 50_add_unity_quicklist.patch:
+      - Add Unity quicklist menu item.
+    + Add 52_support_apturl.patch:
+      - Support apt: urls.
+    + Add 60_add_lp_handler.patch:
+      - Add a handler for launchpad bug URLs.
+    + Add scrollbar-background-theming.patch:
+      - Draw background under the scrollbar that matches the actual terminal
+        background color. This allows proper theming.
+    + Add debian/patches/revert-pcre2.patch:
+      - Revert changes that require PCRE2 since it's not in main
+        (see MIR #163666)
+ 
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Wed, 21 Mar 2018 14:05:46 -0400
+
 gnome-terminal (3.28.0-1) unstable; urgency=medium
 
   * New upstream release
@@ -53,6 +204,39 @@ gnome-terminal (3.28.0-1) unstable; urge
 
  -- Jeremy Bicha <jbicha@debian.org>  Mon, 12 Mar 2018 18:16:20 -0400
 
+gnome-terminal (3.27.92-1ubuntu1) bionic; urgency=medium
+
+  * Merge with Debian. Remaining changes:
+    + debian/rules:
+      - Install compatibility version of gnome-terminal.desktop
+    + gnome-terminal.wrap, debian/rules:
+      - Add a wrapper script to restore command line compatibility.
+    + debian/control.in:
+      - gnome-terminal depends on python3, python3-gi and gir1.2-glib-2.0 for
+        the wrapper script.
+      - Don't Build-Depend on PCRE2
+    + Add 0001-Restore-transparency.patch:
+      - Restore transparency support
+    + Add 0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch:
+      - Add CSS names and style classes so we can theme things more easily.
+    + Add 0001-screen-window-Extra-padding-around-transparent-termi.patch:
+      - Fix transparency on Wayland. Patch by Owen Taylor, via Debarshi Ray @
+        Fedora (LP: #1650395)
+    + Add 50_add_unity_quicklist.patch:
+      - Add Unity quicklist menu item.
+    + Add 52_support_apturl.patch:
+      - Support apt: urls.
+    + Add 60_add_lp_handler.patch:
+      - Add a handler for launchpad bug URLs.
+    + Add scrollbar-background-theming.patch:
+      - Draw background under the scrollbar that matches the actual terminal
+        background color. This allows proper theming.
+    + Add debian/patches/revert-pcre2.patch:
+      - Revert changes that require PCRE2 since it's not in main
+        (see MIR #163666)
+ 
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Tue, 06 Mar 2018 12:09:33 -0500
+
 gnome-terminal (3.27.92-1) unstable; urgency=medium
 
   * New upstream release candidate
@@ -65,6 +249,44 @@ gnome-terminal (3.27.92-1) unstable; urg
 
  -- Jeremy Bicha <jbicha@debian.org>  Tue, 06 Mar 2018 11:56:33 -0500
 
+gnome-terminal (3.27.90-1ubuntu1) bionic; urgency=medium
+
+  [ Jeremy Bicha ]
+  * Merge with Debian (LP: #1744711). Remaining changes:
+    + debian/rules:
+      - Install compatibility version of gnome-terminal.desktop
+    + gnome-terminal.wrap, debian/rules:
+      - Add a wrapper script to restore command line compatibility.
+    + debian/control.in:
+      - gnome-terminal depends on python3, python3-gi and gir1.2-glib-2.0 for
+        the wrapper script.
+      - Don't Build-Depend on PCRE2
+    + Add 0001-Restore-transparency.patch:
+      - Restore transparency support
+    + Add 0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch:
+      - Add CSS names and style classes so we can theme things more easily.
+    + Add 0001-screen-window-Extra-padding-around-transparent-termi.patch:
+      - Fix transparency on Wayland. Patch by Owen Taylor, via Debarshi Ray @
+        Fedora (LP: #1650395)
+    + Add 50_add_unity_quicklist.patch:
+      - Add Unity quicklist menu item.
+    + Add 52_support_apturl.patch:
+      - Support apt: urls.
+    + Add 60_add_lp_handler.patch:
+      - Add a handler for launchpad bug URLs.
+    + Add scrollbar-background-theming.patch:
+      - Draw background under the scrollbar that matches the actual terminal
+        background color. This allows proper theming.
+    + Add debian/patches/revert-pcre2.patch:
+      - Revert changes that require PCRE2 since it's not in main
+        (see MIR #163666)
+ 
+  [ Egmont Koblinger ]
+  * Update patches to apply against new version
+  * Always show "Use transparency from system theme" checkbox (LP: #1745825)
+
+ -- Egmont Koblinger <egmont@gmail.com>  Fri, 16 Feb 2018 13:09:20 -0500
+
 gnome-terminal (3.27.90-1) experimental; urgency=medium
 
   * New upstream development release
diff -pruN 3.30.0-1/debian/control 3.30.0-1ubuntu1/debian/control
--- 3.30.0-1/debian/control	2018-09-08 15:20:13.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/control	2018-09-12 14:30:08.000000000 +0000
@@ -5,8 +5,9 @@
 Source: gnome-terminal
 Section: gnome
 Priority: optional
-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
-Uploaders: Iain Lane <laney@debian.org>, Jeremy Bicha <jbicha@debian.org>, Michael Biebl <biebl@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
+Uploaders: Iain Lane <laney@debian.org>, Jeremy Bicha <jbicha@debian.org>
 Build-Depends: debhelper (>= 11),
                dh-exec,
                gnome-common,
@@ -15,7 +16,7 @@ Build-Depends: debhelper (>= 11),
                libdconf-dev (>= 0.14.0),
                libgtk-3-dev (>= 3.20),
                libglib2.0-dev (>= 2.42.0),
-               libpcre2-dev (>= 10.00),
+#               libpcre2-dev (>= 10.00),
                libvte-2.91-dev (>= 0.54.0),
                libsm-dev,
                gnome-pkg-tools (>= 0.10),
@@ -27,8 +28,10 @@ Build-Depends: debhelper (>= 11),
                gnome-shell [linux-any],
                libnautilus-extension-dev (>= 3.21.92-3~)
 Standards-Version: 4.1.4
-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-terminal
-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-terminal.git
+Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-terminal
+Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-terminal
+XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-terminal
+XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-terminal.git
 Homepage: https://wiki.gnome.org/Apps/Terminal
 
 Package: gnome-terminal
@@ -37,6 +40,9 @@ Multi-Arch: foreign
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          default-dbus-session-bus | dbus-session-bus,
+         python3,
+         python3-gi,
+         gir1.2-glib-2.0,
          gsettings-desktop-schemas (>= 0.1.0),
          gnome-terminal-data (>= ${gnome:Version}),
          gnome-terminal-data (<< ${gnome:NextVersion})
diff -pruN 3.30.0-1/debian/control.in 3.30.0-1ubuntu1/debian/control.in
--- 3.30.0-1/debian/control.in	2018-09-08 15:20:13.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/control.in	2018-09-12 14:30:08.000000000 +0000
@@ -1,7 +1,8 @@
 Source: gnome-terminal
 Section: gnome
 Priority: optional
-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
 Uploaders: @GNOME_TEAM@
 Build-Depends: debhelper (>= 11),
                dh-exec,
@@ -11,7 +12,7 @@ Build-Depends: debhelper (>= 11),
                libdconf-dev (>= 0.14.0),
                libgtk-3-dev (>= 3.20),
                libglib2.0-dev (>= 2.42.0),
-               libpcre2-dev (>= 10.00),
+#               libpcre2-dev (>= 10.00),
                libvte-2.91-dev (>= 0.54.0),
                libsm-dev,
                gnome-pkg-tools (>= 0.10),
@@ -23,8 +24,10 @@ Build-Depends: debhelper (>= 11),
                gnome-shell [linux-any],
                libnautilus-extension-dev (>= 3.21.92-3~)
 Standards-Version: 4.1.4
-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-terminal
-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-terminal.git
+Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-terminal
+Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-terminal
+XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-terminal
+XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-terminal.git
 Homepage: https://wiki.gnome.org/Apps/Terminal
 
 Package: gnome-terminal
@@ -33,6 +36,9 @@ Multi-Arch: foreign
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          default-dbus-session-bus | dbus-session-bus,
+         python3,
+         python3-gi,
+         gir1.2-glib-2.0,
          gsettings-desktop-schemas (>= 0.1.0),
          gnome-terminal-data (>= ${gnome:Version}),
          gnome-terminal-data (<< ${gnome:NextVersion})
diff -pruN 3.30.0-1/debian/gbp.conf 3.30.0-1ubuntu1/debian/gbp.conf
--- 3.30.0-1/debian/gbp.conf	2018-09-08 15:20:13.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/gbp.conf	2018-09-12 14:30:08.000000000 +0000
@@ -1,8 +1,9 @@
 [DEFAULT]
 pristine-tar = True
-debian-branch = debian/master
+debian-branch = ubuntu/master
 upstream-branch = upstream/latest
 upstream-vcs-tag = %(version)s
+debian-tag = ubuntu/%(version)s
 
 [buildpackage]
 sign-tags = True
diff -pruN 3.30.0-1/debian/gnome-terminal.wrap 3.30.0-1ubuntu1/debian/gnome-terminal.wrap
--- 3.30.0-1/debian/gnome-terminal.wrap	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/gnome-terminal.wrap	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,109 @@
+#!/usr/bin/python3
+
+import string
+import subprocess
+import sys
+import random
+
+from argparse import ArgumentParser, SUPPRESS
+from gi.repository import GLib, Gio
+
+
+PREFIX = "com.canonical.Terminal."
+
+
+class GnomeTerminal(object):
+    @staticmethod
+    def generate_random_string(length=32,
+                               chars=string.ascii_lowercase +
+                               string.ascii_uppercase):
+        return ''.join(random.choice(chars) for _ in range(length))
+
+    @staticmethod
+    def find_new_name():
+        name = PREFIX + GnomeTerminal.generate_random_string()
+        proxy = Gio.DBusProxy.new_for_bus_sync(
+            Gio.BusType.SESSION,
+            Gio.DBusProxyFlags.DO_NOT_AUTO_START |
+            Gio.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS |
+            Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES,
+            None,
+            name,
+            "/org/gnome/Terminal",
+            "org.freedesktop.Application",
+            None)
+        return name if proxy.get_name_owner() is None else find_new_name()
+
+    def exit_loop(self, a, b, subprocess):
+        sys.exit(subprocess.get_exit_status())
+
+    def server_appeared(self, con, name, owner):
+        # start gnome-terminal now
+         Gio.Subprocess.new(['/usr/bin/gnome-terminal.real',
+                             '--app-id', name] +
+                             self.args,
+                             Gio.SubprocessFlags.NONE)
+
+    def spawn_terminal_server(self, name, cls):
+        args = ['/usr/lib/gnome-terminal/gnome-terminal-server',
+                '--app-id',
+                 name]
+        if cls is not None:
+            args.extend(['--class', cls])
+        ts = Gio.Subprocess.new(args, Gio.SubprocessFlags.NONE)
+        ts.wait_async(None, self.exit_loop, ts)
+
+    def __init__(self, args, mainloop):
+        self.name = None
+        self.mainloop = mainloop
+
+        parser = ArgumentParser(add_help=False,  usage=SUPPRESS)
+        parser.add_argument('--app-id', action='store', dest='appid')
+
+        # swallow these arguments
+        parser.add_argument('-h', '--help', action='store_true', dest='help')
+        parser.add_argument('--disable-factory', action='store_true')
+        parser.add_argument('--class', action='store', dest='cls')
+
+        cmdargs, unknown = parser.parse_known_args()
+
+        self.args = unknown
+        self.args.insert(0, "/usr/bin/gnome-terminal.real")
+
+        if cmdargs.help:
+            self.args.append('--help')
+
+        if cmdargs.cls is not None and cmdargs.appid is None:
+            self.name = PREFIX + cmdargs.cls
+        elif cmdargs.appid is not None:
+            self.name = cmdargs.appid
+
+        # --disable-factory, --class and --app-id weren't supplied, so just
+        # invoke g-t
+        if not cmdargs.disable_factory and self.name is None:
+            sys.exit(subprocess.call(self.args))
+
+        if self.name is None:
+            self.name = self.find_new_name()
+
+        Gio.bus_watch_name(Gio.BusType.SESSION,
+                           self.name,
+                           Gio.BusNameWatcherFlags.NONE,
+                           self.server_appeared,
+                           None)
+
+        self.spawn_terminal_server(self.name, cmdargs.cls)
+
+
+def main():
+    mainloop = GLib.MainLoop()
+    GnomeTerminal(sys.argv[:], mainloop)
+
+    try:
+        mainloop.run()
+    except KeyboardInterrupt:
+        pass
+
+
+if __name__ == "__main__":
+    main()
diff -pruN 3.30.0-1/debian/patches/0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch 3.30.0-1ubuntu1/debian/patches/0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch
--- 3.30.0-1/debian/patches/0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,66 @@
+From: Iain Lane <iain@orangesquash.org.uk>
+Date: Fri, 24 Jun 2016 14:51:22 +0100
+Subject: [PATCH] Add style classes and CSS names to some of our widgets
+
+---
+ src/terminal-notebook.c | 6 ++++++
+ src/terminal-screen.c   | 7 +++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/src/terminal-notebook.c b/src/terminal-notebook.c
+index 006922f..3823329 100644
+--- a/src/terminal-notebook.c
++++ b/src/terminal-notebook.c
+@@ -32,6 +32,8 @@
+ #include "terminal-schemas.h"
+ #include "terminal-libgsystem.h"
+ 
++#define TERMINAL_NOTEBOOK_STYLE_CLASS "terminal-notebook"
++
+ #define TERMINAL_NOTEBOOK_GET_PRIVATE(notebook)(G_TYPE_INSTANCE_GET_PRIVATE ((notebook), TERMINAL_TYPE_NOTEBOOK, TerminalNotebookPrivate))
+ 
+ struct _TerminalNotebookPrivate
+@@ -389,11 +391,15 @@ static void
+ terminal_notebook_init (TerminalNotebook *notebook)
+ {
+   TerminalNotebookPrivate *priv;
++  GtkStyleContext *context;
+ 
+   priv = notebook->priv = TERMINAL_NOTEBOOK_GET_PRIVATE (notebook);
+ 
+   priv->active_screen = NULL;
+   priv->policy = GTK_POLICY_AUTOMATIC;
++
++  context = gtk_widget_get_style_context (GTK_WIDGET (notebook));
++  gtk_style_context_add_class (context, TERMINAL_NOTEBOOK_STYLE_CLASS);
+ }
+ 
+ static void
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index 76a7c06..a7082ab 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -122,6 +122,8 @@ enum
+   TARGET_TAB
+ };
+ 
++#define TERMINAL_SCREEN_STYLE_CLASS "terminal-screen"
++
+ static void terminal_screen_constructed (GObject             *object);
+ static void terminal_screen_dispose     (GObject             *object);
+ static void terminal_screen_finalize    (GObject             *object);
+@@ -404,9 +406,14 @@ terminal_screen_init (TerminalScreen *screen)
+   guint i;
+   uuid_t u;
+   char uuidstr[37];
++  GtkStyleContext *context;
+ 
+   priv = screen->priv = G_TYPE_INSTANCE_GET_PRIVATE (screen, TERMINAL_TYPE_SCREEN, TerminalScreenPrivate);
+ 
++  context = gtk_widget_get_style_context (GTK_WIDGET (screen));
++
++  gtk_style_context_add_class (context, TERMINAL_SCREEN_STYLE_CLASS);
++
+   uuid_generate (u);
+   uuid_unparse (u, uuidstr);
+   priv->uuid = g_strdup (uuidstr);
diff -pruN 3.30.0-1/debian/patches/0001-Restore-transparency.patch 3.30.0-1ubuntu1/debian/patches/0001-Restore-transparency.patch
--- 3.30.0-1/debian/patches/0001-Restore-transparency.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/0001-Restore-transparency.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,387 @@
+From: Debarshi Ray <debarshir@gnome.org>
+Date: Mon, 12 May 2014 14:57:18 +0200
+Subject: [PATCH] Restore transparency
+
+The transparency settings were removed as a side effect of
+2bff4b63ed3ceef6055e35563e9b0b33ad57349d
+
+This restores them and you will need a compositing window manager to
+use it. The background image setting, also known as faux transparency,
+was not restored.
+
+Also contains
+
+326c4f143511a3fae61aed1466568260a2ac1c4e Mon Sep 17 00:00:00 2001
+Lars Uebernickel <lars.uebernickel@canonical.com>
+Wed, 28 May 2014 14:11:02 +0200
+[PATCH] window: Make the drawing robust across all themes
+
+There are lots of themes out there in the wild that do not specify a
+background-color for all widgets and the default is transparent. This
+is usually not a problem because GTK+ sets an opaque region on the
+whole window and things without a background-color get drawn with the
+theme's default background colour. However, to achieve transparency
+we disable the opaque region by making the window app-paintable. This
+can lead to transparent menubars or notebook tabs in some themes. We
+can avoid this by ensuring that the window always renders a background.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730016
+---
+ src/org.gnome.Terminal.gschema.xml |  14 +++++
+ src/preferences.ui                 | 121 +++++++++++++++++++++++++++++++++++++
+ src/profile-editor.c               |  19 ++++++
+ src/terminal-schemas.h             |   4 ++
+ src/terminal-screen.c              |  42 ++++++++++++-
+ src/terminal-window.c              |  28 +++++++++
+ 6 files changed, 227 insertions(+), 1 deletion(-)
+
+diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
+index a4adc66..fef54da 100644
+--- a/src/org.gnome.Terminal.gschema.xml
++++ b/src/org.gnome.Terminal.gschema.xml
+@@ -400,6 +400,20 @@
+       <default>'narrow'</default>
+       <summary>Whether ambiguous-width characters are narrow or wide when using UTF-8 encoding</summary>
+     </key>
++    <key name="use-transparent-background" type="b">
++      <default>false</default>
++      <summary>Whether to use a transparent background</summary>
++    </key>
++    <key name="use-theme-transparency" type="b">
++      <default>true</default>
++      <summary>Whether to use the value of TerminalScreen-background-darkness,
++          if available, from the theme for the transparency value.</summary>
++    </key>
++    <key name="background-transparency-percent" type="i">
++      <default>50</default>
++      <summary>Adjust the amount of transparency</summary>
++      <description>A value between 0 and 100, where 0 is opaque and 100 is fully transparent.</description>
++    </key>
+   </schema>
+ 
+   <!-- Keybinding settings -->
+diff --git a/src/preferences.ui b/src/preferences.ui
+index 6259aac..95aeb84 100644
+--- a/src/preferences.ui
++++ b/src/preferences.ui
+@@ -95,6 +95,11 @@
+       </row>
+     </data>
+   </object>
++  <object class="GtkAdjustment" id="background-transparent-adjustment">
++    <property name="upper">100</property>
++    <property name="step_increment">1</property>
++    <property name="page_increment">10</property>
++  </object>
+   <object class="GtkListStore" id="model1">
+     <columns>
+       <!-- column-name gchararray -->
+@@ -1317,6 +1322,122 @@
+                                             <property name="position">1</property>
+                                           </packing>
+                                         </child>
++                                        <child>
++                                          <object class="GtkBox" id="use-transparent-background-box">
++                                            <property name="visible">True</property>
++                                            <property name="can_focus">False</property>
++                                            <property name="orientation">horizontal</property>
++                                            <property name="spacing">12</property>
++                                            <child>
++                                              <object class="GtkCheckButton" id="use-transparent-background">
++                                                <property name="label" translatable="yes">Use t_ransparent background</property>
++                                                <property name="visible">True</property>
++                                                <property name="can_focus">True</property>
++                                                <property name="receives_default">False</property>
++                                                <property name="use_underline">True</property>
++                                                <property name="xalign">0</property>
++                                                <property name="draw_indicator">True</property>
++                                              </object>
++                                              <packing>
++                                                <property name="expand">False</property>
++                                                <property name="fill">False</property>
++                                                <property name="position">0</property>
++                                              </packing>
++                                            </child>
++                                            <child>
++                                              <object class="GtkBox" id="background-transparent-scale-box">
++                                                <property name="visible">True</property>
++                                                <property name="can_focus">False</property>
++                                                <property name="orientation">horizontal</property>
++                                                <property name="spacing">6</property>
++                                                <child>
++                                                  <object class="GtkLabel" id="background-transparent-min-label">
++                                                    <property name="visible">True</property>
++                                                    <property name="can_focus">False</property>
++                                                    <property name="xalign">0.5</property>
++                                                    <property name="label" translatable="yes">none</property>
++                                                    <style>
++                                                      <class name="dim-label"/>
++                                                    </style>
++                                                  </object>
++                                                  <packing>
++                                                    <property name="expand">False</property>
++                                                    <property name="fill">False</property>
++                                                    <property name="position">0</property>
++                                                  </packing>
++                                                </child>
++                                                <child>
++                                                  <object class="GtkScale" id="background-transparent-scale">
++                                                    <property name="visible">True</property>
++                                                    <property name="can_focus">True</property>
++                                                    <property name="adjustment">background-transparent-adjustment</property>
++                                                    <property name="draw_value">False</property>
++                                                  </object>
++                                                  <packing>
++                                                    <property name="expand">True</property>
++                                                    <property name="fill">True</property>
++                                                    <property name="position">1</property>
++                                                  </packing>
++                                                </child>
++                                                <child>
++                                                  <object class="GtkLabel" id="background-transparent-max-label">
++                                                    <property name="visible">True</property>
++                                                    <property name="can_focus">False</property>
++                                                    <property name="xalign">0.5</property>
++                                                    <property name="label" translatable="yes">full</property>
++                                                    <style>
++                                                      <class name="dim-label"/>
++                                                    </style>
++                                                  </object>
++                                                  <packing>
++                                                    <property name="expand">False</property>
++                                                    <property name="fill">False</property>
++                                                    <property name="position">2</property>
++                                                  </packing>
++                                                </child>
++                                              </object>
++                                              <packing>
++                                                <property name="expand">True</property>
++                                                <property name="fill">True</property>
++                                                <property name="position">1</property>
++                                              </packing>
++                                            </child>
++                                          </object>
++                                          <packing>
++                                            <property name="expand">True</property>
++                                            <property name="fill">True</property>
++                                            <property name="position">2</property>
++                                          </packing>
++                                        </child>
++                                        <child>
++                                          <object class="GtkBox" id="use-theme-transparency-box">
++                                            <property name="visible">True</property>
++                                            <property name="can_focus">False</property>
++                                            <property name="orientation">horizontal</property>
++                                            <property name="spacing">12</property>
++                                            <child>
++                                              <object class="GtkCheckButton" id="use-theme-transparency-checkbutton">
++                                                <property name="label" translatable="yes">Use transparency from system theme</property>
++                                                <property name="visible">True</property>
++                                                <property name="can_focus">True</property>
++                                                <property name="receives_default">False</property>
++                                                <property name="use_underline">True</property>
++                                                <property name="xalign">0</property>
++                                                <property name="draw_indicator">True</property>
++                                              </object>
++                                              <packing>
++                                                <property name="expand">False</property>
++                                                <property name="fill">False</property>
++                                                <property name="position">0</property>
++                                              </packing>
++                                            </child>
++                                          </object>
++                                          <packing>
++                                            <property name="expand">True</property>
++                                            <property name="fill">True</property>
++                                            <property name="position">3</property>
++                                          </packing>
++                                        </child>
+                                       </object>
+                                     </child>
+                                   </object>
+diff --git a/src/profile-editor.c b/src/profile-editor.c
+index eaad918..72759a1 100644
+--- a/src/profile-editor.c
++++ b/src/profile-editor.c
+@@ -1254,6 +1254,25 @@ profile_prefs_load (const char *uuid, GSettings *profile)
+                                w,
+                                "active-id",
+                                G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
++
++  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
++                               gtk_builder_get_object (builder, "use-transparent-background"),
++                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
++  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
++                               gtk_builder_get_object (builder, "background-transparent-scale-box"),
++                               "sensitive", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
++  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT,
++                               gtk_builder_get_object (builder, "background-transparent-adjustment"),
++                               "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
++  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_THEME_TRANSPARENCY,
++                               gtk_builder_get_object (builder, "use-theme-transparency-checkbutton"),
++                               "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
++  profile_prefs_settings_bind (profile, TERMINAL_PROFILE_USE_THEME_TRANSPARENCY,
++                               gtk_builder_get_object (builder, "use-transparent-background-box"),
++                               "sensitive",
++                               G_SETTINGS_BIND_GET |
++                               G_SETTINGS_BIND_INVERT_BOOLEAN |
++                               G_SETTINGS_BIND_NO_SENSITIVITY);
+ }
+ 
+ /* Called once per Preferences window, to destroy stuff that doesn't depend on the profile being edited */
+diff --git a/src/terminal-schemas.h b/src/terminal-schemas.h
+index 46ed321..24cf4ab 100644
+--- a/src/terminal-schemas.h
++++ b/src/terminal-schemas.h
+@@ -73,6 +73,10 @@ G_BEGIN_DECLS
+ #define TERMINAL_PROFILE_VISIBLE_NAME_KEY               "visible-name"
+ #define TERMINAL_PROFILE_WORD_CHAR_EXCEPTIONS_KEY       "word-char-exceptions"
+ 
++#define TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND      "use-transparent-background"
++#define TERMINAL_PROFILE_USE_THEME_TRANSPARENCY          "use-theme-transparency"
++#define TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT "background-transparency-percent"
++
+ #define TERMINAL_SETTING_CONFIRM_CLOSE_KEY              "confirm-close"
+ #define TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR_KEY       "default-show-menubar"
+ #define TERMINAL_SETTING_ENABLE_MENU_BAR_ACCEL_KEY      "menu-accelerator-enabled"
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index 7f99718..76a7c06 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -599,6 +599,11 @@ terminal_screen_class_init (TerminalScreenClass *klass)
+ 
+   g_type_class_add_private (object_class, sizeof (TerminalScreenPrivate));
+ 
++  gtk_widget_class_install_style_property (widget_class,
++     g_param_spec_float ("background-darkness", NULL, NULL, -1, 1, -1,
++                         G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++
++
+   n_url_regexes = G_N_ELEMENTS (url_regex_patterns);
+   precompile_regexes (url_regex_patterns, n_url_regexes, &url_regexes, &url_regex_flavors);
+   n_extra_regexes = G_N_ELEMENTS (extra_regex_patterns);
+@@ -857,7 +862,10 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
+       prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY) ||
+       prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_BACKGROUND_COLOR_KEY) ||
+       prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_FOREGROUND_COLOR_KEY) ||
+-      prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY))
++      prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY) ||
++      prop_name == I_(TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND) ||
++      prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT) ||
++      prop_name == I_(TERMINAL_PROFILE_USE_THEME_TRANSPARENCY))
+     update_color_scheme (screen);
+ 
+   if (!prop_name || prop_name == I_(TERMINAL_PROFILE_AUDIBLE_BELL_KEY))
+@@ -935,6 +943,9 @@ update_color_scheme (TerminalScreen *screen)
+   GdkRGBA *highlight_bgp = NULL, *highlight_fgp = NULL;
+   GtkStyleContext *context;
+   gboolean use_theme_colors;
++  GtkWidget *toplevel;
++  gboolean transparent, theme_transparent;
++  gfloat style_darkness;
+ 
+   context = gtk_widget_get_style_context (widget);
+   gtk_style_context_get_color (context, gtk_style_context_get_state (context), &theme_fg);
+@@ -986,6 +997,31 @@ update_color_scheme (TerminalScreen *screen)
+     }
+ 
+   colors = terminal_g_settings_get_rgba_palette (priv->profile, TERMINAL_PROFILE_PALETTE_KEY, &n_colors);
++  theme_transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_THEME_TRANSPARENCY);
++  transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
++
++  gtk_widget_style_get (GTK_WIDGET (screen),
++                        "background-darkness", &style_darkness,
++                        NULL);
++
++  if (theme_transparent && style_darkness >= 0)
++    {
++      bg.alpha = style_darkness;
++    }
++  else if (transparent)
++    {
++      gint transparency_percent;
++
++      transparency_percent = g_settings_get_int (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT);
++      bg.alpha = (100 - transparency_percent) / 100.0;
++    }
++  else
++      bg.alpha = 1.0;
++
++  /* If this gets out of range, let's not crash */
++  if (bg.alpha < 0.0 || bg.alpha > 1.0)
++      bg.alpha = 1.0;
++
+   vte_terminal_set_colors (VTE_TERMINAL (screen), &fg, &bg,
+                            colors, n_colors);
+   vte_terminal_set_color_bold (VTE_TERMINAL (screen), boldp);
+@@ -993,6 +1029,10 @@ update_color_scheme (TerminalScreen *screen)
+   vte_terminal_set_color_cursor_foreground (VTE_TERMINAL (screen), cursor_fgp);
+   vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
+   vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
++
++  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
++  if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
++    gtk_widget_set_app_paintable (toplevel, transparent);
+ }
+ 
+ static void
+diff --git a/src/terminal-window.c b/src/terminal-window.c
+index 91fa09d..ea4b667 100644
+--- a/src/terminal-window.c
++++ b/src/terminal-window.c
+@@ -1944,6 +1944,26 @@ terminal_window_realize (GtkWidget *widget)
+   terminal_window_update_size (window);
+ }
+ 
++static gboolean
++terminal_window_draw (GtkWidget *widget,
++                      cairo_t   *cr)
++{
++  if (gtk_widget_get_app_paintable (widget))
++    {
++      GtkStyleContext *context;
++      int width;
++      int height;
++
++      context = gtk_widget_get_style_context (widget);
++      width = gtk_widget_get_allocated_width (widget);
++      height = gtk_widget_get_allocated_height (widget);
++      gtk_render_background (context, cr, 0, 0, width, height);
++      gtk_render_frame (context, cr, 0, 0, width, height);
++    }
++
++  return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
++}
++
+ static gboolean
+ terminal_window_state_event (GtkWidget            *widget,
+                              GdkEventWindowState  *event)
+@@ -2088,6 +2108,8 @@ terminal_window_init (TerminalWindow *window)
+   };
+   TerminalWindowPrivate *priv;
+   TerminalApp *app;
++  GdkScreen *screen;
++  GdkVisual *visual;
+   GSettings *gtk_debug_settings;
+   GtkWindowGroup *window_group;
+   //  GtkAccelGroup *accel_group;
+@@ -2102,6 +2124,11 @@ terminal_window_init (TerminalWindow *window)
+ 
+   gtk_widget_init_template (GTK_WIDGET (window));
+ 
++  screen = gtk_widget_get_screen (GTK_WIDGET (window));
++  visual = gdk_screen_get_rgba_visual (screen);
++  if (visual != NULL)
++    gtk_widget_set_visual (GTK_WIDGET (window), visual);
++
+   uuid_generate (u);
+   uuid_unparse (u, uuidstr);
+   priv->uuid = g_strdup (uuidstr);
+@@ -2248,6 +2275,7 @@ terminal_window_class_init (TerminalWindowClass *klass)
+ 
+   widget_class->show = terminal_window_show;
+   widget_class->realize = terminal_window_realize;
++  widget_class->draw = terminal_window_draw;
+   widget_class->window_state_event = terminal_window_state_event;
+   widget_class->screen_changed = terminal_window_screen_changed;
+   widget_class->style_updated = terminal_window_style_updated;
diff -pruN 3.30.0-1/debian/patches/0001-screen-window-Extra-padding-around-transparent-termi.patch 3.30.0-1ubuntu1/debian/patches/0001-screen-window-Extra-padding-around-transparent-termi.patch
--- 3.30.0-1/debian/patches/0001-screen-window-Extra-padding-around-transparent-termi.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/0001-screen-window-Extra-padding-around-transparent-termi.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,122 @@
+From: "Owen W. Taylor" <otaylor@fishsoup.net>
+Date: Fri, 13 Nov 2015 15:16:42 +0100
+Subject: [PATCH] screen,
+ window: Extra padding around transparent terminals in Wayland
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1207943
+---
+ src/terminal-screen.c | 40 +++++++++++++++++++++++++++++++++++++---
+ src/terminal-window.c | 18 ++++++++++++------
+ 2 files changed, 49 insertions(+), 9 deletions(-)
+
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index a7082ab..bc5e36e 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -141,6 +141,8 @@ static void terminal_screen_system_font_changed_cb (GSettings *,
+ static gboolean terminal_screen_popup_menu (GtkWidget *widget);
+ static gboolean terminal_screen_button_press (GtkWidget *widget,
+                                               GdkEventButton *event);
++static void terminal_screen_hierarchy_changed (GtkWidget *widget,
++                                               GtkWidget *previous_toplevel);
+ static gboolean terminal_screen_do_exec (TerminalScreen *screen,
+                                          FDSetupData    *data,
+                                          GError **error);
+@@ -539,6 +541,7 @@ terminal_screen_class_init (TerminalScreenClass *klass)
+   widget_class->drag_data_received = terminal_screen_drag_data_received;
+   widget_class->button_press_event = terminal_screen_button_press;
+   widget_class->popup_menu = terminal_screen_popup_menu;
++  widget_class->hierarchy_changed = terminal_screen_hierarchy_changed;
+ 
+   terminal_class->child_exited = terminal_screen_child_exited;
+ 
+@@ -934,6 +937,32 @@ terminal_screen_profile_changed_cb (GSettings     *profile,
+   g_object_thaw_notify (object);
+ }
+ 
++static void
++update_toplevel_transparency (TerminalScreen *screen)
++{
++  GtkWidget *widget = GTK_WIDGET (screen);
++  TerminalScreenPrivate *priv = screen->priv;
++  GSettings *profile = priv->profile;
++  GtkWidget *toplevel;
++
++  toplevel = gtk_widget_get_toplevel (widget);
++  if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
++    {
++      gboolean transparent;
++
++      transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
++      if (gtk_widget_get_app_paintable (toplevel) != transparent)
++        {
++          gtk_widget_set_app_paintable (toplevel, transparent);
++
++          /* The opaque region of the toplevel isn't updated until the toplevel is allocated;
++           * set_app_paintable() doesn't force an allocation, so do that manually.
++           */
++          gtk_widget_queue_resize (toplevel);
++        }
++    }
++}
++
+ static void
+ update_color_scheme (TerminalScreen *screen)
+ {
+@@ -1037,9 +1066,7 @@ update_color_scheme (TerminalScreen *screen)
+   vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
+   vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
+ 
+-  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
+-  if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
+-    gtk_widget_set_app_paintable (toplevel, transparent);
++  update_toplevel_transparency (screen);
+ }
+ 
+ static void
+@@ -1644,6 +1671,13 @@ terminal_screen_do_popup (TerminalScreen *screen,
+   terminal_screen_popup_info_unref (info);
+ }
+ 
++static void
++terminal_screen_hierarchy_changed (GtkWidget *widget,
++                                   GtkWidget *previous_toplevel)
++{
++  update_toplevel_transparency (TERMINAL_SCREEN (widget));
++}
++
+ static gboolean
+ terminal_screen_button_press (GtkWidget      *widget,
+                               GdkEventButton *event)
+diff --git a/src/terminal-window.c b/src/terminal-window.c
+index ea4b667..ae60543 100644
+--- a/src/terminal-window.c
++++ b/src/terminal-window.c
+@@ -1950,15 +1950,21 @@ terminal_window_draw (GtkWidget *widget,
+ {
+   if (gtk_widget_get_app_paintable (widget))
+     {
++      GtkAllocation child_allocation;
+       GtkStyleContext *context;
+-      int width;
+-      int height;
++      GtkWidget *child;
++
++      /* Get the *child* allocation, so we don't overwrite window borders */
++      child = gtk_bin_get_child (GTK_BIN (widget));
++      gtk_widget_get_allocation (child, &child_allocation);
+ 
+       context = gtk_widget_get_style_context (widget);
+-      width = gtk_widget_get_allocated_width (widget);
+-      height = gtk_widget_get_allocated_height (widget);
+-      gtk_render_background (context, cr, 0, 0, width, height);
+-      gtk_render_frame (context, cr, 0, 0, width, height);
++      gtk_render_background (context, cr,
++                             child_allocation.x, child_allocation.y,
++                             child_allocation.width, child_allocation.height);
++      gtk_render_frame (context, cr,
++                        child_allocation.x, child_allocation.y,
++                        child_allocation.width, child_allocation.height);
+     }
+ 
+   return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
diff -pruN 3.30.0-1/debian/patches/0006-fix-invalid-appstream-metadata.patch 3.30.0-1ubuntu1/debian/patches/0006-fix-invalid-appstream-metadata.patch
--- 3.30.0-1/debian/patches/0006-fix-invalid-appstream-metadata.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/0006-fix-invalid-appstream-metadata.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,43 @@
+From: Jeremy Bicha <jbicha@ubuntu.com>
+Date: Tue, 6 Mar 2018 10:25:59 -0500
+Subject: fix invalid AppStream metadata
+
+The GNOME Software app won't use this metadata if it
+doesn't recognize the metadata_license
+
+https://bugzilla.gnome.org/show_bug.cgi?id=779434
+https://github.com/hughsie/appstream-glib/issues/225
+https://github.com/hughsie/appstream-glib/issues/226
+---
+ org.gnome.Terminal.Nautilus.metainfo.xml.in | 3 ++-
+ org.gnome.Terminal.appdata.xml.in           | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/org.gnome.Terminal.Nautilus.metainfo.xml.in b/org.gnome.Terminal.Nautilus.metainfo.xml.in
+index f9b1706..9458a0c 100644
+--- a/org.gnome.Terminal.Nautilus.metainfo.xml.in
++++ b/org.gnome.Terminal.Nautilus.metainfo.xml.in
+@@ -34,7 +34,8 @@
+   type="addon">
+   <id>org.gnome.Terminal.Nautilus</id>
+   <extends>org.gnome.Nautilus.desktop</extends>
+-  <metadata_license>GPL-3.0+ or GFDL-1.3-only</metadata_license>
++  <metadata_license>GFDL-1.3</metadata_license>
++  <!--Metadata is also licensed as GPL-3.0+-->
+   <project_license>GPL-3.0+</project_license>
+   <_name>Terminal plugin for Files</_name>
+   <_summary>Open a terminal from Files</_summary>
+diff --git a/org.gnome.Terminal.appdata.xml.in b/org.gnome.Terminal.appdata.xml.in
+index 8078051..bc07c63 100644
+--- a/org.gnome.Terminal.appdata.xml.in
++++ b/org.gnome.Terminal.appdata.xml.in
+@@ -33,7 +33,8 @@
+   xmlns:its="http://www.w3.org/2005/11/its"
+   type="desktop-application">
+   <id>org.gnome.Terminal.desktop</id>
+-  <metadata_license>GPL-3.0+ or GFDL-1.3-only</metadata_license>
++  <metadata_license>GFDL-1.3</metadata_license>
++  <!--Metadata is also licensed as GPL-3.0+-->
+   <project_license>GPL-3.0+</project_license>
+   <_name>Terminal</_name>
+   <_summary>Use the command line</_summary>
diff -pruN 3.30.0-1/debian/patches/52_support_apturl.patch 3.30.0-1ubuntu1/debian/patches/52_support_apturl.patch
--- 3.30.0-1/debian/patches/52_support_apturl.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/52_support_apturl.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,21 @@
+From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Date: Sat, 20 Jan 2018 18:48:39 -0500
+Subject: _support_apturl
+
+===================================================================
+---
+ src/terminal-regex.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/terminal-regex.h b/src/terminal-regex.h
+index 3a3e89a..83ad417 100644
+--- a/src/terminal-regex.h
++++ b/src/terminal-regex.h
+@@ -149,6 +149,6 @@
+ #define REGEX_URL_HTTP   DEFS "(?<!(?:" HOSTNAMESEGMENTCHARS_CLASS "|[.]))(?=(?i:www|ftp))" HOSTNAME1 PORT URLPATH
+ #define REGEX_URL_VOIP   DEFS "(?i:h323:|sips?:)" USERPASS URL_HOST PORT VOIP_PATH
+ #define REGEX_EMAIL      DEFS "(?i:mailto:)?" USER "@" EMAIL_HOST
+-#define REGEX_NEWS_MAN   "(?i:news:|man:|info:)[-[:alnum:]\\Q^_{|}~!\"#$%&'()*+,./;:=?`\\E]+"
++#define REGEX_NEWS_MAN   "(?i:news:|man:|info:|apt:)[-[:alnum:]\\Q^_{|}~!\"#$%&'()*+,./;:=?`\\E]+"
+ 
+ #endif /* !TERMINAL_REGEX_H */
diff -pruN 3.30.0-1/debian/patches/60_add_lp_handler.patch 3.30.0-1ubuntu1/debian/patches/60_add_lp_handler.patch
--- 3.30.0-1/debian/patches/60_add_lp_handler.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/60_add_lp_handler.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,129 @@
+From: Marc Deslauriers <marc.deslauriers@canonical.com>
+Date: Sat, 20 Jan 2018 18:54:33 -0500
+Subject: add a handler for launchpad bug URLs.
+
+Forwarded: yes, https://bugzilla.gnome.org/show_bug.cgi?id=709087
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1232589
+---
+ src/terminal-regex.h  |  1 +
+ src/terminal-screen.c |  1 +
+ src/terminal-screen.h |  1 +
+ src/terminal-util.c   | 17 +++++++++++++++++
+ src/terminal-util.h   |  2 ++
+ src/terminal-window.c | 13 ++++++++++++-
+ 6 files changed, 34 insertions(+), 1 deletion(-)
+
+diff --git a/src/terminal-regex.h b/src/terminal-regex.h
+index 83ad417..f0ee427 100644
+--- a/src/terminal-regex.h
++++ b/src/terminal-regex.h
+@@ -150,5 +150,6 @@
+ #define REGEX_URL_VOIP   DEFS "(?i:h323:|sips?:)" USERPASS URL_HOST PORT VOIP_PATH
+ #define REGEX_EMAIL      DEFS "(?i:mailto:)?" USER "@" EMAIL_HOST
+ #define REGEX_NEWS_MAN   "(?i:news:|man:|info:|apt:)[-[:alnum:]\\Q^_{|}~!\"#$%&'()*+,./;:=?`\\E]+"
++#define REGEX_LP         "(?i:lp: #)[[:digit:]]+"
+ 
+ #endif /* !TERMINAL_REGEX_H */
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index bc5e36e..e42c401 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -181,6 +181,7 @@ static const TerminalRegexPattern url_regex_patterns[] = {
+   { REGEX_URL_VOIP,  FLAVOR_VOIP_CALL },
+   { REGEX_EMAIL,     FLAVOR_EMAIL },
+   { REGEX_NEWS_MAN,  FLAVOR_AS_IS },
++  { REGEX_LP,        FLAVOR_LP },
+ };
+ 
+ static const TerminalRegexPattern extra_regex_patterns[] = {
+diff --git a/src/terminal-screen.h b/src/terminal-screen.h
+index ff77fcf..501d2ce 100644
+--- a/src/terminal-screen.h
++++ b/src/terminal-screen.h
+@@ -32,6 +32,7 @@ typedef enum {
+   FLAVOR_VOIP_CALL,
+   FLAVOR_EMAIL,
+   FLAVOR_NUMBER,
++  FLAVOR_LP
+ } TerminalURLFlavor;
+ 
+ /* Forward decls */
+diff --git a/src/terminal-util.c b/src/terminal-util.c
+index 30cc136..ea3e39d 100644
+--- a/src/terminal-util.c
++++ b/src/terminal-util.c
+@@ -310,6 +310,9 @@ terminal_util_open_url (GtkWidget *parent,
+     case FLAVOR_AS_IS:
+       uri = g_strdup (orig_url);
+       break;
++    case FLAVOR_LP:
++      uri = terminal_util_get_lp_url (orig_url);
++      break;
+     default:
+       uri = NULL;
+       g_assert_not_reached ();
+@@ -323,6 +326,20 @@ terminal_util_open_url (GtkWidget *parent,
+     }
+ }
+ 
++char *
++terminal_util_get_lp_url (const char *orig_url)
++{
++  char *uri;
++  const char *bugnum = orig_url;
++
++  while (*bugnum && ! g_ascii_isdigit (*bugnum))
++      bugnum++;
++
++  uri = g_strdup_printf ("https://bugs.launchpad.net/bugs/%s", bugnum);
++
++  return uri;
++}
++
+ /**
+  * terminal_util_transform_uris_to_quoted_fuse_paths:
+  * @uris:
+diff --git a/src/terminal-util.h b/src/terminal-util.h
+index abd34fd..a7de59f 100644
+--- a/src/terminal-util.h
++++ b/src/terminal-util.h
+@@ -44,6 +44,8 @@ void terminal_util_open_url (GtkWidget *parent,
+                              TerminalURLFlavor flavor,
+                              guint32 user_time);
+ 
++char *terminal_util_get_lp_url (const char *orig_url);
++
+ void terminal_util_transform_uris_to_quoted_fuse_paths (char **uris);
+ 
+ char *terminal_util_concat_uris (char **uris,
+diff --git a/src/terminal-window.c b/src/terminal-window.c
+index ae60543..f09227d 100644
+--- a/src/terminal-window.c
++++ b/src/terminal-window.c
+@@ -1009,7 +1009,17 @@ action_copy_match_cb (GSimpleAction *action,
+   if (info->url == NULL)
+     return;
+ 
+-  gtk_clipboard_set_text (priv->clipboard, info->url, -1);
++  if (info->url_flavor == FLAVOR_LP)
++    {
++      char *uri;
++      uri = terminal_util_get_lp_url (info->url);
++      gtk_clipboard_set_text (priv->clipboard, uri, -1);
++      g_free (uri);
++    }
++  else
++    {
++      gtk_clipboard_set_text (priv->clipboard, info->url, -1);
++    }
+ }
+ 
+ static void
+@@ -1720,6 +1730,7 @@ screen_show_popup_menu_cb (TerminalScreen *screen,
+       break;
+     case FLAVOR_AS_IS:
+     case FLAVOR_DEFAULT_TO_HTTP:
++    case FLAVOR_LP:
+     default:
+       open_label = _("_Open Link");
+       copy_label = _("Copy _Link");
diff -pruN 3.30.0-1/debian/patches/revert-pcre2.patch 3.30.0-1ubuntu1/debian/patches/revert-pcre2.patch
--- 3.30.0-1/debian/patches/revert-pcre2.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/revert-pcre2.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,371 @@
+From: Jeremy Bicha <jbicha@ubuntu.com>
+Date: Sun, 19 Feb 2017 22:49:25 -0500
+Subject: Revert commits that require PCRE2
+
+Bug-Ubuntu: https://launchpad.net/bugs/1636666
+
+Squashed revert of these commits:
+https://git.gnome.org/browse/gnome-terminal/commit/?id=1f6c999a
+https://git.gnome.org/browse/gnome-terminal/commit/?id=ef7a345f
+https://git.gnome.org/browse/gnome-terminal/commit/?id=45bcfb8d
+---
+ configure.ac                  | 26 +++++++++++++++++++++++--
+ src/terminal-screen.c         | 35 +++++++++++++++++++++++++++++++++-
+ src/terminal-search-popover.c | 44 +++++++++++++++++++++++++++++++++++++++++--
+ src/terminal-search-popover.h |  4 ++++
+ src/terminal-window.c         | 16 ++++++++++++++++
+ 5 files changed, 120 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0751868..29491da 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -81,6 +81,27 @@ for target in $($PKG_CONFIG --variable targets gdk-$GTK_API_VERSION); do
+   esac
+ done
+ 
++# PCRE2
++
++AC_MSG_CHECKING([whether PCRE2 support is requested])
++AC_ARG_WITH([pcre2],
++  [AS_HELP_STRING([--without-pcre2],[Disable pcre2 support])],
++  [],[with_pcre2=no])
++AC_MSG_RESULT([$with_pcre2])
++
++PCRE2_PKGS=
++if test "$with_pcre2" = "yes"; then
++  PCRE2_PKGS="libpcre2-8 >= $PCRE2_REQUIRED"
++
++  PKG_CHECK_MODULES([PCRE2],[$PCRE2_PKGS],,
++    [AC_MSG_ERROR([PCRE2 requested but libpcre2-8 not found. Use --without-pcre2 to disable PCRE2])])
++
++  AC_DEFINE([WITH_PCRE2],[1],[Define to 1 to enable pcre2 support])
++  EXTRA_DEPS="$EXTRA_DEPS $PCRE2_PKGS"
++fi
++
++AM_CONDITIONAL([WITH_PCRE2],[test "$with_pcre2" = "yes"])
++
+ # pkg-config checks
+ 
+ PKG_CHECK_MODULES([TERM],
+@@ -91,8 +112,8 @@ PKG_CHECK_MODULES([TERM],
+    gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED
+    dconf >= $DCONF_REQUIRED
+    uuid
+-   libpcre2-8 >= $PCRE2_REQUIRED
+-   $PLATFORM_DEPS])
++   $PLATFORM_DEPS
++   $PCRE2_PKGS])
+ 
+ # ****
+ # DBus
+@@ -319,6 +340,7 @@ gnome-terminal-$VERSION:
+       prefix:                 ${prefix}
+       source code location:   ${srcdir}
+       compiler:               ${CC}
++      PCRE2:                  ${with_pcre2}
+       gterminal:              ${enable_gterminal}
+       DBus interface dir:     ${dbusinterfacedir}
+       DBus service dir:       ${dbusservicedir}
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index 2cbc4c2..4a99678 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -18,7 +18,10 @@
+ 
+ #include "config.h"
+ 
++#ifdef WITH_PCRE2
+ #include "terminal-pcre2.h"
++#endif
++
+ #include "terminal-regex.h"
+ #include "terminal-screen.h"
+ 
+@@ -192,8 +195,13 @@ static const TerminalRegexPattern extra_regex_patterns[] = {
+   { "(0[Xx][[:xdigit:]]+|[[:digit:]]+)", FLAVOR_NUMBER },
+ };
+ 
++#ifdef WITH_PCRE2
+ static VteRegex **url_regexes;
+ static VteRegex **extra_regexes;
++#else
++static GRegex **url_regexes;
++static GRegex **extra_regexes;
++#endif
+ static TerminalURLFlavor *url_regex_flavors;
+ static TerminalURLFlavor *extra_regex_flavors;
+ static guint n_url_regexes;
+@@ -283,18 +291,27 @@ free_tag_data (TagData *tagdata)
+ static void
+ precompile_regexes (const TerminalRegexPattern *regex_patterns,
+                     guint n_regexes,
++#ifdef WITH_PCRE2
+                     VteRegex ***regexes,
++#else
++                    GRegex ***regexes,
++#endif
+                     TerminalURLFlavor **regex_flavors)
+ {
+   guint i;
+ 
++#ifdef WITH_PCRE2
+   *regexes = g_new0 (VteRegex*, n_regexes);
++#else
++  *regexes = g_new0 (GRegex*, n_regexes);
++#endif
+   *regex_flavors = g_new0 (TerminalURLFlavor, n_regexes);
+ 
+   for (i = 0; i < n_regexes; ++i)
+     {
+       GError *error = NULL;
+ 
++#ifdef WITH_PCRE2
+       (*regexes)[i] = vte_regex_new_for_match (regex_patterns[i].pattern, -1,
+                                                PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_MULTILINE,
+                                                &error);
+@@ -305,6 +322,13 @@ precompile_regexes (const TerminalRegexPattern *regex_patterns,
+         g_printerr ("Failed to JIT regex '%s': %s\n", regex_patterns[i].pattern, error->message);
+         g_clear_error (&error);
+       }
++#else
++      (*regexes)[i] = g_regex_new (regex_patterns[i].pattern,
++                                   G_REGEX_OPTIMIZE |
++                                   G_REGEX_MULTILINE,
++                                   0, &error);
++      g_assert_no_error (error);
++#endif
+ 
+       (*regex_flavors)[i] = regex_patterns[i].flavor;
+     }
+@@ -437,7 +461,11 @@ terminal_screen_init (TerminalScreen *screen)
+ 
+       tag_data = g_slice_new (TagData);
+       tag_data->flavor = url_regex_flavors[i];
++#ifdef WITH_PCRE2
+       tag_data->tag = vte_terminal_match_add_regex (terminal, url_regexes[i], 0);
++#else
++      tag_data->tag = vte_terminal_match_add_gregex (terminal, url_regexes[i], 0);
++#endif
+       vte_terminal_match_set_cursor_type (terminal, tag_data->tag, URL_MATCH_CURSOR);
+ 
+       priv->match_tags = g_slist_prepend (priv->match_tags, tag_data);
+@@ -2191,7 +2219,12 @@ terminal_screen_check_extra (TerminalScreen *screen,
+   memset(matches, 0, sizeof(char*) * n_extra_regexes);
+ 
+   if (
+-      vte_terminal_event_check_regex_simple (VTE_TERMINAL (screen),
++#ifdef WITH_PCRE2
++      vte_terminal_event_check_regex_simple(
++#else
++      vte_terminal_event_check_gregex_simple(
++#endif
++                                             VTE_TERMINAL (screen),
+                                              event,
+                                              extra_regexes,
+                                              n_extra_regexes,
+diff --git a/src/terminal-search-popover.c b/src/terminal-search-popover.c
+index 8d814cf..05e36b4 100644
+--- a/src/terminal-search-popover.c
++++ b/src/terminal-search-popover.c
+@@ -23,7 +23,10 @@
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+ 
++#ifdef WITH_PCRE2
+ #include "terminal-pcre2.h"
++#endif
++
+ #include "terminal-search-popover.h"
+ #include "terminal-intl.h"
+ #include "terminal-window.h"
+@@ -63,8 +66,13 @@ struct _TerminalSearchPopoverPrivate
+ 
+   /* Cached regex */
+   gboolean regex_caseless;
++  gboolean regex_multiline;
+   char *regex_pattern;
++#ifdef WITH_PCRE2
+   VteRegex *regex;
++#else
++  GRegex *regex;
++#endif
+ };
+ 
+ enum {
+@@ -259,7 +267,7 @@ update_regex (TerminalSearchPopover *popover)
+ {
+   TerminalSearchPopoverPrivate *priv = PRIV (popover);
+   const char *search_text;
+-  gboolean caseless;
++  gboolean caseless, multiline = FALSE;
+   gs_free char *pattern;
+   gs_free_error GError *error = NULL;
+ 
+@@ -269,6 +277,7 @@ update_regex (TerminalSearchPopover *popover)
+ 
+   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->regex_checkbutton))) {
+     pattern = g_strdup (search_text);
++    multiline = TRUE;
+   } else {
+     pattern = g_regex_escape_string (search_text, -1);
+   }
+@@ -281,29 +290,47 @@ update_regex (TerminalSearchPopover *popover)
+   }
+ 
+   if (priv->regex_caseless == caseless &&
++      priv->regex_multiline == multiline &&
+       g_strcmp0 (priv->regex_pattern, pattern) == 0)
+     return;
+ 
+   if (priv->regex) {
++#ifdef WITH_PCRE2
+     vte_regex_unref (priv->regex);
++#else
++    g_regex_unref (priv->regex);
++#endif
+   }
+ 
+   g_clear_pointer (&priv->regex_pattern, g_free);
+ 
+   /* FIXME: if comping the regex fails, show the error message somewhere */
+   if (search_text[0] != '\0') {
++#ifdef WITH_PCRE2
+     guint32 compile_flags;
+ 
+-    compile_flags = PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_MULTILINE;
++    compile_flags = PCRE2_UTF | PCRE2_NO_UTF_CHECK;
+     if (caseless)
+       compile_flags |= PCRE2_CASELESS;
++    if (multiline)
++      compile_flags |= PCRE2_MULTILINE;
+ 
+     priv->regex = vte_regex_new_for_search (pattern, -1, compile_flags, &error);
+     if (priv->regex != NULL &&
+         (!vte_regex_jit (priv->regex, PCRE2_JIT_COMPLETE, NULL) ||
+          !vte_regex_jit (priv->regex, PCRE2_JIT_PARTIAL_SOFT, NULL))) {
+     }
++#else
++    GRegexCompileFlags compile_flags;
++
++    compile_flags = G_REGEX_OPTIMIZE;
++    if (caseless)
++      compile_flags |= G_REGEX_CASELESS;
++    if (multiline)
++      compile_flags |= G_REGEX_MULTILINE;
+ 
++    priv->regex = g_regex_new (pattern, compile_flags, 0, &error);
++#endif
+     if (priv->regex != NULL)
+       gs_transfer_out_value (&priv->regex_pattern, &pattern);
+   } else {
+@@ -353,6 +380,7 @@ terminal_search_popover_init (TerminalSearchPopover *popover)
+ 
+   priv->regex_pattern = 0;
+   priv->regex_caseless = TRUE;
++  priv->regex_multiline = FALSE;
+ 
+   gtk_widget_init_template (widget);
+ 
+@@ -420,7 +448,11 @@ terminal_search_popover_finalize (GObject *object)
+   TerminalSearchPopoverPrivate *priv = PRIV (popover);
+ 
+   if (priv->regex) {
++#ifdef WITH_PCRE2
+     vte_regex_unref (priv->regex);
++#else
++    g_regex_unref (priv->regex);
++#endif
+   }
+ 
+   g_free (priv->regex_pattern);
+@@ -489,7 +521,11 @@ terminal_search_popover_class_init (TerminalSearchPopoverClass *klass)
+ 
+   pspecs[PROP_REGEX] =
+     g_param_spec_boxed ("regex", NULL, NULL,
++#ifdef WITH_PCRE2
+                         VTE_TYPE_REGEX,
++#else
++                        G_TYPE_REGEX,
++#endif
+                         G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
+ 
+   pspecs[PROP_WRAP_AROUND] =
+@@ -537,7 +573,11 @@ terminal_search_popover_new (GtkWidget *relative_to_widget)
+  *
+  * Returns: (transfer none): the search regex, or %NULL
+  */
++#ifdef WITH_PCRE2
+ VteRegex *
++#else
++GRegex *
++#endif
+ terminal_search_popover_get_regex (TerminalSearchPopover *popover)
+ {
+   g_return_val_if_fail (TERMINAL_IS_SEARCH_POPOVER (popover), NULL);
+diff --git a/src/terminal-search-popover.h b/src/terminal-search-popover.h
+index 10771d9..813f0f3 100644
+--- a/src/terminal-search-popover.h
++++ b/src/terminal-search-popover.h
+@@ -39,7 +39,11 @@ GType terminal_search_popover_get_type (void);
+ 
+ TerminalSearchPopover *terminal_search_popover_new (GtkWidget *relative_to_widget);
+ 
++#ifdef WITH_PCRE2
+ VteRegex *
++#else
++GRegex *
++#endif
+           terminal_search_popover_get_regex (TerminalSearchPopover *popover);
+ 
+ gboolean terminal_search_popover_get_wrap_around (TerminalSearchPopover *popover);
+diff --git a/src/terminal-window.c b/src/terminal-window.c
+index f09227d..d89b3ae 100644
+--- a/src/terminal-window.c
++++ b/src/terminal-window.c
+@@ -1098,13 +1098,21 @@ search_popover_notify_regex_cb (TerminalSearchPopover *popover,
+                                 TerminalWindow *window)
+ {
+   TerminalWindowPrivate *priv = window->priv;
++#ifdef WITH_PCRE2
+   VteRegex *regex;
++#else
++  GRegex *regex;
++#endif
+ 
+   if (G_UNLIKELY (priv->active_screen == NULL))
+     return;
+ 
+   regex = terminal_search_popover_get_regex (popover);
++#ifdef WITH_PCRE2
+   vte_terminal_search_set_regex (VTE_TERMINAL (priv->active_screen), regex, 0);
++#else
++  vte_terminal_search_set_gregex (VTE_TERMINAL (priv->active_screen), regex, 0);
++#endif
+ 
+   terminal_window_update_search_sensitivity (priv->active_screen, window);
+ }
+@@ -1200,7 +1208,11 @@ action_find_clear_cb (GSimpleAction *action,
+   if (priv->active_screen == NULL)
+     return;
+ 
++#ifdef WITH_PCRE2
+   vte_terminal_search_set_regex (VTE_TERMINAL (priv->active_screen), NULL, 0);
++#else
++  vte_terminal_search_set_gregex (VTE_TERMINAL (priv->active_screen), NULL, 0);
++#endif
+   vte_terminal_unselect_all (VTE_TERMINAL (priv->active_screen));
+ }
+ 
+@@ -1541,7 +1553,11 @@ terminal_window_update_search_sensitivity (TerminalScreen *screen,
+   if (screen != priv->active_screen)
+     return;
+ 
++#ifdef WITH_PCRE2
+   gboolean can_search = vte_terminal_search_get_regex (VTE_TERMINAL (screen)) != NULL;
++#else
++  gboolean can_search = vte_terminal_search_get_gregex (VTE_TERMINAL (screen)) != NULL;
++#endif
+ 
+   g_simple_action_set_enabled (lookup_action (window, "find-forward"), can_search);
+   g_simple_action_set_enabled (lookup_action (window, "find-backward"), can_search);
diff -pruN 3.30.0-1/debian/patches/scrollbar-background-theming.patch 3.30.0-1ubuntu1/debian/patches/scrollbar-background-theming.patch
--- 3.30.0-1/debian/patches/scrollbar-background-theming.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/scrollbar-background-theming.patch	2018-09-12 14:30:08.000000000 +0000
@@ -0,0 +1,191 @@
+From: Marco Trevisan <marco.trevisan@canonical.com>
+Date: Sat, 20 Jan 2018 18:48:39 -0500
+Subject: draw proper background under the scrollbar
+
+Forwarded: yes, https://bugzilla.gnome.org/show_bug.cgi?id=754796
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1493964
+---
+ src/terminal-screen-container.c | 28 +++++++++++++++++++--
+ src/terminal-screen.c           | 56 ++++++++++++++++++++++++++++++++++++++++-
+ src/terminal-screen.h           |  2 ++
+ 3 files changed, 83 insertions(+), 3 deletions(-)
+
+diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
+index 73d9b06..5a9b8de 100644
+--- a/src/terminal-screen-container.c
++++ b/src/terminal-screen-container.c
+@@ -109,9 +109,25 @@ terminal_screen_container_init (TerminalScreenContainer *container)
+   priv->vscrollbar_policy = GTK_POLICY_AUTOMATIC;
+ }
+ 
++static gboolean
++scrollbar_bg_draw_cb (GtkWidget *widget, cairo_t *cr, TerminalScreenContainer *container)
++{
++  TerminalScreenContainerPrivate *priv = container->priv;
++  GdkRGBA * bg = terminal_screen_get_bg_color (priv->screen);
++
++  cairo_save (cr);
++  cairo_set_source_rgba (cr, bg->red, bg->green, bg->blue, bg->alpha);
++  cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
++  cairo_paint (cr);
++  cairo_restore (cr);
++
++  return FALSE;
++}
++
+ static void
+ terminal_screen_container_constructed (GObject *object)
+ {
++  GtkWidget *scrollbar;
+   TerminalScreenContainer *container = TERMINAL_SCREEN_CONTAINER (object);
+   TerminalScreenContainerPrivate *priv = container->priv;
+ 
+@@ -139,9 +155,12 @@ terminal_screen_container_constructed (GObject *object)
+ }
+ #else
+   priv->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
++  priv->vscrollbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ 
+-  priv->vscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL,
+-                                        gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->screen)));
++  scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL,
++                                 gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->screen)));
++
++  gtk_box_pack_start (GTK_BOX (priv->vscrollbar), scrollbar, TRUE, TRUE, 0);
+ 
+   gtk_box_pack_start (GTK_BOX (priv->hbox), GTK_WIDGET (priv->screen), TRUE, TRUE, 0);
+   gtk_box_pack_start (GTK_BOX (priv->hbox), priv->vscrollbar, FALSE, FALSE, 0);
+@@ -151,6 +170,11 @@ terminal_screen_container_constructed (GObject *object)
+ #endif
+ 
+   _terminal_screen_update_scrollbar (priv->screen);
++
++  g_signal_connect (G_OBJECT (priv->vscrollbar), "draw",
++                    G_CALLBACK (scrollbar_bg_draw_cb), container);
++  g_signal_connect_swapped (priv->screen, "notify::bg-color",
++                            G_CALLBACK (gtk_widget_queue_draw), priv->vscrollbar);
+ }
+ 
+ static void
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index e42c401..2cbc4c2 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -94,6 +94,8 @@ struct _TerminalScreenPrivate
+   int child_pid;
+   GSList *match_tags;
+   guint launch_child_source_id;
++  GdkRGBA bg_color;
++  GdkRGBA fg_color;
+ };
+ 
+ enum
+@@ -109,7 +111,9 @@ enum {
+   PROP_0,
+   PROP_PROFILE,
+   PROP_TITLE,
+-  PROP_INITIAL_ENVIRONMENT
++  PROP_INITIAL_ENVIRONMENT,
++  PROP_BG_COLOR,
++  PROP_FG_COLOR
+ };
+ 
+ enum
+@@ -493,6 +497,12 @@ terminal_screen_get_property (GObject *object,
+       case PROP_TITLE:
+         g_value_set_string (value, terminal_screen_get_title (screen));
+         break;
++      case PROP_BG_COLOR:
++        g_value_set_boxed (value, terminal_screen_get_bg_color (screen));
++        break;
++      case PROP_FG_COLOR:
++        g_value_set_boxed (value, terminal_screen_get_bg_color (screen));
++        break;
+       default:
+         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+         break;
+@@ -516,6 +526,8 @@ terminal_screen_set_property (GObject *object,
+         terminal_screen_set_initial_environment (screen, g_value_get_boxed (value));
+         break;
+       case PROP_TITLE:
++      case PROP_FG_COLOR:
++      case PROP_BG_COLOR:
+         /* not writable */
+       default:
+         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -608,6 +620,20 @@ terminal_screen_class_init (TerminalScreenClass *klass)
+                          G_TYPE_STRV,
+                          G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+ 
++  g_object_class_install_property
++    (object_class,
++     PROP_BG_COLOR,
++     g_param_spec_boxed ("bg-color", NULL, NULL,
++                         GDK_TYPE_RGBA,
++                         G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++
++  g_object_class_install_property
++    (object_class,
++     PROP_FG_COLOR,
++     g_param_spec_boxed ("fg-color", NULL, NULL,
++                         GDK_TYPE_RGBA,
++                         G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
++
+   g_type_class_add_private (object_class, sizeof (TerminalScreenPrivate));
+ 
+   gtk_widget_class_install_style_property (widget_class,
+@@ -815,6 +841,22 @@ terminal_screen_get_title (TerminalScreen *screen)
+   return vte_terminal_get_window_title (VTE_TERMINAL (screen));
+ }
+ 
++GdkRGBA*
++terminal_screen_get_bg_color (TerminalScreen *screen)
++{
++  g_return_val_if_fail (TERMINAL_IS_SCREEN (screen), NULL);
++
++  return &screen->priv->bg_color;
++}
++
++GdkRGBA*
++terminal_screen_get_fg_color (TerminalScreen *screen)
++{
++  g_return_val_if_fail (TERMINAL_IS_SCREEN (screen), NULL);
++
++  return &screen->priv->fg_color;
++}
++
+ static void
+ terminal_screen_profile_changed_cb (GSettings     *profile,
+                                     const char    *prop_name,
+@@ -1067,6 +1109,18 @@ update_color_scheme (TerminalScreen *screen)
+   vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
+   vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
+ 
++  if (gdk_rgba_hash (&priv->bg_color) != gdk_rgba_hash (&bg))
++    {
++      priv->bg_color = bg;
++      g_object_notify (G_OBJECT (screen), "bg-color");
++    }
++
++  if (gdk_rgba_hash (&priv->fg_color) != gdk_rgba_hash (&fg))
++    {
++      priv->fg_color = fg;
++      g_object_notify (G_OBJECT (screen), "fg-color");
++    }
++
+   update_toplevel_transparency (screen);
+ }
+ 
+diff --git a/src/terminal-screen.h b/src/terminal-screen.h
+index 501d2ce..0ee07b1 100644
+--- a/src/terminal-screen.h
++++ b/src/terminal-screen.h
+@@ -105,6 +105,8 @@ void         terminal_screen_set_initial_environment (TerminalScreen  *screen,
+ char **      terminal_screen_get_initial_environment (TerminalScreen  *screen);
+ 
+ const char* terminal_screen_get_title          (TerminalScreen *screen);
++GdkRGBA*    terminal_screen_get_bg_color       (TerminalScreen *screen);
++GdkRGBA*    terminal_screen_get_fg_color       (TerminalScreen *screen);
+ 
+ char *terminal_screen_get_current_dir (TerminalScreen *screen);
+ 
diff -pruN 3.30.0-1/debian/patches/series 3.30.0-1ubuntu1/debian/patches/series
--- 3.30.0-1/debian/patches/series	2018-09-08 15:20:13.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/patches/series	2018-09-12 14:30:08.000000000 +0000
@@ -2,4 +2,12 @@ nautilus-x11.patch
 01_onlyshowin.patch
 Don-t-allow-the-theme-to-set-black-on-black.patch
 Provide-fallback-for-reading-current-directory-if-OS.patch
+0001-Restore-transparency.patch
+0001-Add-style-classes-and-CSS-names-to-some-of-our-widge.patch
+0001-screen-window-Extra-padding-around-transparent-termi.patch
+0006-fix-invalid-appstream-metadata.patch
+52_support_apturl.patch
+60_add_lp_handler.patch
+scrollbar-background-theming.patch
+revert-pcre2.patch
 app-Make-new-terminal-menu-a-hidden-pref.patch
diff -pruN 3.30.0-1/debian/rules 3.30.0-1ubuntu1/debian/rules
--- 3.30.0-1/debian/rules	2018-09-08 15:20:13.000000000 +0000
+++ 3.30.0-1ubuntu1/debian/rules	2018-09-12 14:30:08.000000000 +0000
@@ -30,6 +30,10 @@ override_dh_install:
 	find debian/tmp -name '*.a' -print -delete
 	find debian/tmp -name '*.la' -print -delete
 	dh_install
+	mv $(CURDIR)/debian/gnome-terminal/usr/bin/gnome-terminal \
+		$(CURDIR)/debian/gnome-terminal/usr/bin/gnome-terminal.real
+	install -m0755 $(CURDIR)/debian/gnome-terminal.wrap \
+		$(CURDIR)/debian/gnome-terminal/usr/bin/gnome-terminal
 
 override_dh_missing:
 	dh_missing --fail-missing
