With the help of main gnome-terminal developer Christian (thanks!) we've
noticed the following:

When "Ubuntu" graphical session is chosen, the background (nautilus-
desktop) uses X11 (XWayland). This can be confirmed by xeyes following
the mouse movements made there. (With "GNOME" graphical session this is
not the case, the background there is native Wayland.)

Using dbus-monitor, this is seen when opening a "good" terminal with the
global shortcut Ctrl+Alt+T:

method call time=1509569901.444518 sender=:1.72 -> destination=:1.73 serial=12 
path=/org/gnome/Terminal/Factory0; interface=org.gnome.Terminal.Factory0; 
member=CreateInstance
   array [
      dict entry(
         string "display"
         variant             array of bytes "wayland-0" + \0
      )
      dict entry(
         string "encoding"
         variant             string "UTF-8"
      )
   ]

and its counterpart with the "bad" terminal (desktop's right click menu)
is:

method call time=1509569929.217075 sender=:1.64 -> destination=:1.80 serial=148 
path=/org/gnome/Terminal/Factory0; interface=org.gnome.Terminal.Factory0; 
member=CreateInstance
   array [
      dict entry(
         string "display"
         variant             array of bytes ":1.0" + \0
      )
      dict entry(
         string "desktop-startup-id"
         variant             array of bytes "_TIME180922528" + \0
      )
      dict entry(
         string "active"
         variant             boolean true
      )
   ]

Later on, however, pretty much the same set of environment variables,
including "DISPLAY=:1" and "WAYLAND_DISPLAY=wayland-0" are passed in
both cases. (The concrete values might vary of course, typically it's
"DISPLAY=:0" but I'm opening a second graphical session for testing.)
(The only difference in the environment variables is the
presence/absence of DESKTOP_AUTOSTART_ID. I guess that's irrelevant.)

So there's the following to the story:

- gnome-terminal was meant to support multiple displays handled by the
same server process, but it suffered from problems anyway. Christian has
just removed this feature, which is a proper workaround/fix for this
bug. The fix is at https://git.gnome.org/browse/gnome-
terminal/commit/?id=36cce22 and https://git.gnome.org/browse/gnome-
terminal/commit/?id=8d75f15. Ubuntu should go ahead and backport it.

- nautilus-desktop should be converted to a proper Wayland app with no
leftover X11 stuff. That would also be a proper fix on its own, without
the gnome-terminal fix. (Isn't this done in mainstream GNOME yet? Does
Ubuntu bring back the X11 dependency with a patch? Dunno.)

- Why did this cause copy-paste not working and the theme not being the
correct one? Perhaps there's no gnome-settings-daemon running for the
X11/XWayland display, and perhaps its clipboard is not (or not properly)
connected to Wayland's. We're unsure about these.

At this point I'm passing the ball to Ubuntu developers to come up with
some fix based on these findings.

** Also affects: nautilus (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1722121

Title:
  Gnome-Terminal ignores theme, preferences is unavailable, and copy not
  working when launching from right-click desktop

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1722121/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to