When you guys su or **su -l ** in a X terminal as another user and/or root, do your user get a ~/.xauthXXXXXX with the magic cookie of the display owner, which allows him/her to start a GUI application? … or is that just me? :
If not, under which environment (KDE, Gnome, etc) and how do you start X then?
Nevermind I found the explanation I was looking for. It is in the module pam_xauth.so, being enabled by default (?) in /etc/pam/su and /etc/pam/su-l … but not in /etc/pam.d/sudo (interesting enough!).
6.41. pam_xauth - forward xauth keys between users