| | 5 | |
| | 6 | * [http://www.diederickdevries.net/blog/2010/06/05/x-forwarding-and-sudo/ My Cup of Tea / X Forwarding and sudo] |
| | 7 | > The reason for this is that: |
| | 8 | > X authentication is based on cookies — secret little pieces of random data that only you and the X server know… So, you need to let the other user in on what your cookie is (http://www.debian-administration.org/articles/494). |
| | 9 | > |
| | 10 | > {{{ |
| | 11 | > me@localbox:~$ ssh -X remotebox |
| | 12 | > me@remotebox:~$ chmod 644 .Xauthority |
| | 13 | > me@remotebox:~$ su - otheruser |
| | 14 | > Password: |
| | 15 | > otheruser@remotebox:~$ export DISPLAY=localhost:10.0 |
| | 16 | > otheruser@remotebox:~$ export XAUTHORITY=/home/me/.Xauthority |
| | 17 | > }}} |