To avoid Emacs installed through AppCenter crashing on opening, solution was actually explained here.
But AppCenter only offers Emacs25 so I installed Emacs27 through Flathub (built in AppCenter)... except now the solution offered in the post mentioned above doesn't work anymore (different file paths etc.).
Any help? I think this could be as simple as copying XLIB_SKIP_ARGB_VISUALS=1
somewhere else, but I wasn't able to understand where :(
Thanks!