After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673323 - Wayland support
Wayland support
Status: RESOLVED INVALID
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-01 22:12 UTC by Darxus
Modified: 2012-05-05 18:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch from krh that might be helpful (5.30 KB, patch)
2012-04-02 16:28 UTC, Darxus
none Details | Review
Screenshot (153.05 KB, image/png)
2012-04-12 02:03 UTC, Darxus
  Details

Description Darxus 2012-04-01 22:12:17 UTC
In order to work with wayland, gtk applications can't use gdk_x11_* calls (when doing output via wayland) or raw Xlib calls:  http://wayland.freedesktop.org/gtk.html

It looks like gnome-terminal is using a few.
Comment 1 Christian Persch 2012-04-01 22:16:56 UTC
First, that isn't correct. It's just necessary to guard the calls with #ifdef and runtime checks.

Version 3.4.0.1 should already do these checks as part of working on broadway; have you checked that it actually does not work?
Comment 2 Darxus 2012-04-01 22:42:55 UTC
I did say "(when doing output via wayland)".

No, I haven't actually tried it.  Just looked at the source in master and the first call didn't seem to be wrapped in an ifdef.  Ah, there it is, I just didn't look far enough:  #ifdef GDK_WINDOWING_X11.  Thanks.
Comment 3 Christian Persch 2012-04-01 22:58:44 UTC
Master is the wrong branch anyway, look at gnome-3-4.
Comment 4 Darxus 2012-04-02 15:01:59 UTC
In what version should this work?  I just tried it.

$ gnome-terminal
...
gnome-terminal: symbol lookup error: gnome-terminal: undefined symbol: gdk_x11_display_manager_get_type
$ gnome-terminal --version
GNOME Terminal 3.4.0.1

Since gnome-terminal tag 3.4.0.1 is on a commit from only 7 days ago, I'm guessing there haven't been relevant changes since.

Executed the same way, gnome-calculator sort of works, there's substantial graphical glitches.

I ran this with freshly built gtk master, built with:
   ./autogen.sh --prefix=$WLD --enable-wayland-backend
Which results in the x11 backend not being built.
Comment 5 Darxus 2012-04-02 15:16:17 UTC
When I rebuild gtk with both the wayland and x11 backends, I don't get that error, I get this:

(gnome-terminal:28482): GLib-GObject-WARNING **: gsignal.c:2455: signal `window-manager-changed' is invalid for instance `0x232aa30'
gnome-terminal: symbol lookup error: gnome-terminal: undefined symbol: vte_terminal_set_alternate_screen_scroll
Comment 6 Christian Persch 2012-04-02 15:38:03 UTC
That thing from comment 4 is a bug; there's probably some #ifdef GDK_WINDOWING_X11 missing somewhere.

In comment 5, you probably built your own libvte but use g-t's ubuntu source package which has a patch that needs a vte patch that adds this symbol to vte. Just using a git checkout from the gnome-3-4 branch should work.

BTW: It's really only useful to file 'doesn't work with wayland' bugs if you're going to provide patches yourself :-)
Comment 7 Darxus 2012-04-02 16:28:27 UTC
Created attachment 211149 [details] [review]
patch from krh that might be helpful

< Darxus> krh: Should I attach it to that gnome-terminal bug?
< krh> Darxus: sure, but do put a note in that say it's just a hack
< krh> and I haven't actually run it for a while
< krh> Darxus: it's useful in identifying what needs to get fixed, it's not a fix itself
Comment 8 Darxus 2012-04-02 17:21:40 UTC
> In comment 5, you probably built your own libvte but use g-t's ubuntu source
> package which has a patch that needs a vte patch that adds this symbol to vte.
> Just using a git checkout from the gnome-3-4 branch should work.

Yes, I did build my own vte, and used gnome-terminal as built by ubuntu (I didn't rebuild it from a source package).  Thanks.

> BTW: It's really only useful to file 'doesn't work with wayland' bugs if you're
> going to provide patches yourself :-)

Fair enough.  But I'd still like to document problems as I come across them, for when people who are interested feel like looking into them.  I might be able to fix a missing / misplaced ifdef.
Comment 9 Darxus 2012-04-05 16:55:29 UTC
Why does branch gnome-3-4 have stuff for handling this that master doesn't?  (Specifically GDK_IS_X11_* stuff.)
Comment 10 Darxus 2012-04-12 02:03:57 UTC
Created attachment 211891 [details]
Screenshot

Verified v3.4.0.1, Ubuntu Precise package 3.4.0.1-0ubuntu1, does work with Wayland 0.85, only when GTK is built with both the x11 and wayland backends.  If GTK is built with only the wayland backend, it fails with a symbol lookup error as mentioned in comment 4.
Comment 11 Christian Persch 2012-05-03 19:34:11 UTC
Please check if it works with g-t git master.
Comment 12 Darxus 2012-05-05 18:30:47 UTC
<psychon> so does that mean the problem is that Darxus is running stuff which was compiled with x11 against a gtk without x11?
<ebassi_> psychon: yes
<Darxus> ebassi_: And there's no way around that?  This isn't a bug in gnome-terminal?  We just have no way of running an application built against gtk with both backends but linked at run time against gtk with only one backend?
<psychon> nope, ELF doesnt let you do that (at least not easily, you could do lots of dlsym() magic, but you really dont want to do that)
<ebassi_> Darxus: there shouldn't a gdk compiled against only one backend - unless you're compiling on win32 or quartz, or on a platform that you fully control from top to bottom
<ebassi_> Darxus: and no, there is simply no way to detect that at run-time, unless you dlopen the library and check every single symbol you wish to use
<ebassi_> Darxus: which is also know as the OpenGL model ;-)
<Darxus> Okay, thanks.  That's exactly what I've been trying to figure out for a while, I should close that gnome-terminal bug.

- #wayland.  Looks like there's gnome gnome-terminal bug to fix.
Comment 13 Darxus 2012-05-05 18:32:04 UTC
A commit that may have largely addressed this problem: http://git.gnome.org/browse/gnome-terminal/commit/?id=c5e0da0d6dc3f6cc0c5ba76649a9c2db0028ceba