Felix Niederwanger, comment 0: > because it assumes the wrong uid It does not assume the wrong UID. It assumes a wrong XDG_RUNTIME_DIR inherited from the original account. And actually, even if you change it to the current account, you can have a problem that the directory does not exist. It is set by systemd, gnomesu-pam-backend or dbus‐update‐activation‐environment as part of the desktop session start. su nor sudo will not do it for you.