If you've ever run
ssh -Y $someoneElse@localhost, you probably noticed that the program you're operating runs quite sluggishly (at least compared to how it's "asposta" run or does when run normally).
You may have independently discovered this "cheesy" workaround (just a cleaner alternative to copying
ssh -t $someoneElse@localhost "xauth add $(xauth list); DISPLAY=$DISPLAY $0"
But here's a far cleaner option:
xhost +si:localuser:$someoneElse ssh -o SendEnv=DISPLAY $someoneElse@localhost
Note you may have to reconfigure your server to allow this:
grep '^AcceptEnv.*DISPLAY' /etc/sshd\ || ( sudo sed -e 's/^\(AcceptEnv\) /\1 DISPLAY ' -i /etc/ssh/sshd_config\ && sudo service sshd restart
While you're at it, here's how you allow those programs to play audio (if your system has a PulseAudio setup like most these days):
pax11publish -S /run/user/$UID/pulse/native -e setfacl -m u:$someoneElse:x /run/user/$UID /run/user/$UID/pulse setfacl -m u:$someoneElse:rw /run/user/$UID/pulse/native setfacl -m m::rwx /run/user/$UID/pulse