Probably very hard, if not outright impossible. From what I can tell, Karabiner uses some very nice accessibility features of Mac OS to implement the keybinding settings.
This is ultimately possible because Apple have clearly put a lot of money into paying talented developers to design this with a good API for extensibility. Awesome to see!
The closest you’ll get in our world is GNOME/KDE, but (perhaps surprisingly) those projects seem to support less and less customization.
I think it’s a side effect of them maturing (further), and therefore cleaning up and simplifying the codebases, but that isn’t matched by an equally paced increase in developer hours to also support quite as many niche use cases through clean APIs. So instead we see a lot being standardized and phased out.
Another problem is that, because the ecosystem isn’t either GNOME or KDE, most graphical applications will use the library support of one or the other. That means even if one of them offered perfect emacs keybinding support, you would still not be able to get it for all applications if the other does not. Then there are also a lot of applications that are tied to neither GNOME nor KDE and just do their own thing, and getting all of them to support your keybinding management would be quite a challenge. Mac OS does not have this problem - they can (and do) control what desktops run in their ecosystem, and mandate all applications follow their standard.
Going via X directly isn’t particularly advisable either, I think. You’ll have to be quite creative with the bindings, since X doesn’t have a standard way of telling what a “keybinding” means to an application, so you’ll need to map key sequences to other key sequences. This means that applications’ shortcuts changing will break your config… It’s probably also not very futureproof, wayland is slowly starting to phase out X.
Perhaps in a couple of years you’ll be able to do things like this on at least GNOME or KDE applications. Federico himself has recently started taking a closer look at accessibility in GNOME - given what he’s managed to do with librsvg I would call that exciting: Mena Quintero: Paying technical debt in our accessibility infrastructure [LWN.net]
To get from there to a perfect solution, you’d probably need to get a freedesktop standard, and wait for everybody to adopt it. This can take decades, and may never happen for something this difficult. But you can probably get to 80% of perfect with a lot of work in the next decade or so.
Karabiner itself can’t be directly ported, of course. It uses Mac OS features to do what it does, so it simply cannot be used with either X, GNOME or KDE.