Core: properly handle X11.