Author Topic: All GTK2 lazarus-made apps take 25s to start in ubuntu 20.04 64bit in openbox  (Read 2043 times)


  • New Member
  • *
  • Posts: 17
GTK4 is close to being released and most Linux distros that have relied on GTK2 (like XFCE) are currently updating to GTK3.

What is the situation about Lazarus in regard to GTK4?


  • Hero Member
  • *****
  • Posts: 4042
  • My goal: build my own game engine using Lazarus


  • Jr. Member
  • **
  • Posts: 50
Gentlemen, I found it. I compared `env` between unity and openbox and found it. It is as simple as putting this:

    export GTK_MODULES=gail:atk-bridge:appmenu-gtk-module

In ~/.profile. Now everything is fast.

Maybe you should indicated in the title <SOLVED>, so other people will know there is a solution.


  • New Member
  • *
  • Posts: 37
    • My site
Installing appmenu-gtk-module package should not be necessary.

It is just a workaround. It works because it contains this systemd service:

As you can see it updates GTK_MODULES environment variable after dbus-daemon execution (that's why you need to reboot) and only for xfce, mate and gnome (that's why it don't work with openbox).


  • Hero Member
  • *****
  • Posts: 1293
    • tomboy-ng, a rewrite of the classic Tomboy
Some conflicting statements here.

> Gentlemen, I found it. I compared `env` between unity ..

Unity ?? Seriously ? anyway ....

We do know that on most desktops, appmenu-gtk-module 'fixes' the problem.  In an earlier Ubuntu, they left it off the list of dependencies for GTK2.  Manually installing it fixed the problem but introduced other issues.  Since then, Canonical ship gtk2 AND appmenu... as standard, out of the box and it all works. 

Can we please clarify, does installing appmenu-gtk-module fix the OpenBox situation ?

If  an OpenBox distro has a problem and its fixed by manually installing appmenu-gtk-module, then the problem is, again, that the packagers have not included appmenu-gtk-modual as part of GTK2 and they should have.

We cannot say to our OpenBox end users that they need to do some system reconfig before they can use our app, thats too hard. We can just get away with saying "manually install appmenu-gtk-module". Note we cannot just add appmenu-gtk-module to our app's list of dependencies because older distributions do not have (or need) appmenu-gtk-module and demanding it will break the install.

This is one of those problems that just keeps on giving ....


Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -


TinyPortal © 2005-2018