Cannot start on ArchLinux x86_64

Bug #1668481 reported by Bernardo Meurer
54
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Undecided
Unassigned

Bug Description

Upon updating to 1.91 I can no longer start Terminator on Arch Linux. This is the output I receive when attempting to run `terminator` from another terminal emulator
```
[meurer@daedalos ~]$ terminator

(terminator:22665): Gtk-WARNING **: Allocating size to GtkVScrollbar 0x559c90724650 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
Traceback (most recent call last):
  File "/usr/bin/terminator", line 126, in <module>
    TERMINATOR.layout_done()
  File "/usr/lib/python2.7/site-packages/terminatorlib/terminator.py", line 403, in layout_done
    t = GdkX11.x11_get_server_time(window.get_window())
TypeError: argument window: Expected GdkX11.X11Window, but got __gi__.GdkWaylandWindow
[meurer@daedalos ~]$ terminator --version
terminator 1.91
```

Related branches

Revision history for this message
Bernardo Meurer (bemeurer) wrote :
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

OK, So it's fairly obvious why that is failing. Is Arch using Wayland by default, or have you set your system to use Wayland?

One workaround might be to run Terminator under XWayland. I don't use and can't really tell you the specifics of how to do that.

Alternatively we can do a check of the return type of window.get_window() and not run this code. However this code does *do something*. It is used to get newly opened windows to the front, otherwise they can show up behind other applications. I'm not sure if Wayland will have the same issue this code fixes if we don't run it.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

You could try the following trivial two minute fix. It simply catches the Type error as well as the Attribute error.

I'd be interested to know if unhiding and launching of subsequent windows (using a command line or keyboard shortcut) have issues when another program has the focus.

Revision history for this message
Stefan Brenner (steve-brenner) wrote :

For me this quick fix worked. Terminator starting again. However, "accidentally" it also solved another problem I was facing already for a while: middleclick copy paste didn't work and now works again. ;-)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

It's great that the fix worked, however it makes no sense (at all!) that this would impact middle-click copy and paste. Are you talking about the patch in comment #3, or are you talking about running Terminator under xwayland as suggested in comment #2? I would expect running under xwayland could potentially fix the middle-click thing too.

Revision history for this message
Antonin Décimo (antonin-decimo) wrote :

Hi, the 'wayland_fix.diff' in #3 worked for me too. Terminator is running
on pure Wayland.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Committed revision 1752.

Changed in terminator:
status: New → Fix Committed
Revision history for this message
Giancarlo Razzolini (grazzolini) wrote :

@Stephen

Gnome is using wayland by default for some time now, I expect this issue to affect more people, not just arch.

There was a bug report on archlinux bug tracker too:
https://bugs.archlinux.org/task/53106

As you must have noticed by now, I'm pushing terminator packages as soon as someone notifies me or when you put out a release. 1.91 fixed some bugs that were present on 1.90. But, since this bug is a deal breaker, I'll probably do a release with this patch included. Also, arch linux users, myself included, are usually on top of these things, so expect bug reports as quick as soon as a release is put out.

I think I may have found another minor bug related with fonts, but let me confirm it first.

p.s.: What's up with the naming of the tar file, it always was terminator-<ver> and now it was Terminator-<ver>. I had to accommodate for the first letter being upper case.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

@Giancarlo

Is Wayland default? I thought only Fedora had started shipping with Wayland by default, although I confess to not paying too much attention outside the "'buntu bubble". Well hopefully in all those Wayland users there's someone with the chops to contribute fixes. :-)

I don't directly pay to much attention to what packagers in the distros are doing, although I have noticed tweet notifications and an up-tick in bugs that mention they're running Arch.

Yeah, this cycle I fixed the sdist by adding a MANIFEST.in, so instead of just bundling the whole folder we're actually only bundling the required source files (no debian or .spec) and we use the standard:
python setup.py sdist
to produce the tarball. It looks like this feature was never used in the past by Chris (the original creator I took over from) and I wasn't even aware of it till Bryce (who helped out with the first release under my tenure) put it in the RELEASE instructions. I've fixed it up, and now it works properly.

In the setup.py the "name" parameter is APP_NAME.capitalize(), and has been since 2010. Before that it was the string "Terminator". I can either change the setup.py name var to be lowercase in future releases, or leave it as is and this capitalised naming is to be used from now on. Not sure of the best course... Opinions?

Revision history for this message
Giancarlo Razzolini (grazzolini) wrote :

@Stephen

Yep, GNOME switched upstream to wayland by default. Since Arch tries to respect upstream as much as possible, it's wayland there too. I made the decision to stop using the GTK2 branch for the arch package, not just because it wasn't supported anymore (at least not directly by you) and also to improve the GTK3 branch.

I have been using terminator for years now, and I know how it's hard to do major rewrites like this one. I think you've been having only minor issues so far, except this one that's kind of a deal breaker.

Anyway, if you want to check how I'm packaging terminator, you can see the PKGBUILD here: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/terminator

As for naming, I don't have any issues with it being either upper or lower case. I mentioned because I checked the package history on arch and it never had the name of the tar with the first letter upper case: https://git.archlinux.org/svntogit/community.git/log/trunk/PKGBUILD?h=packages/terminator

Keep up the great work!

Cheers,
Giancarlo Razzolini

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

OK, I changed the setup.py to create a tarball with lowercase, and uploaded it.

It also includes the fix for wayland, so you can remove that patch. Let me know you've got that working, and I'll delete the capitalized file.

Changed in terminator:
status: Fix Committed → Fix Released
Revision history for this message
Bernardo Meurer (bemeurer) wrote :

Updated to terminator 1.91-2 and it works again without issues.

Thanks for the quick fix.

Revision history for this message
Tim Kissane (tim-timbury) wrote :

I had the same problem under Fedora Workstation 25, which uses Gnome3/Wayland by default. Thanks for the insanely fast fix! I love Open Source!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.