What is a good alternative to the sux command?

Solution 1:

I've been very sad too to see that there were no easy alternative to sux at first, but ended with this:

  1. In /etc/pam.d/su, to forward xauth keys between users when calling su, add:

    session  optional  pam_xauth.so
    
  2. In ~olivier/.bashrc:

    export $(dbus-launch)
    

    (Not sure it is actually needed.)

  3. And then a simple su olivier from my logged-in user.