GNOME Bugzilla – Bug 673323
Wayland support
Last modified: 2012-05-05 18:32:04 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.
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?
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.
Master is the wrong branch anyway, look at gnome-3-4.
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.
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
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 :-)
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
> 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.
Why does branch gnome-3-4 have stuff for handling this that master doesn't? (Specifically GDK_IS_X11_* stuff.)
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.
Please check if it works with g-t git master.
<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.
A commit that may have largely addressed this problem: http://git.gnome.org/browse/gnome-terminal/commit/?id=c5e0da0d6dc3f6cc0c5ba76649a9c2db0028ceba