Is
this question a duplicate of anything? I know we have stuff for that (that explains why one oughtn't do that, but also how one would attempt it if one really insisted, which one shouldn't)? If we close that as a duplicate, the target should probably have at least ne answer that addresses Wayland (though I don't think it really needs to address the case of actually attempting to log in as root to a Wayland desktop).