X11 and xauth
about 100 words
1 min
Allow X11 access when using su or sudo
1
2
3
4
5
6
7
8
9
|
Session A: ssh -X login02
Session B: sudo ssh login02
Session A: interactive -w [free node] or SSH to [free node]
Session B: su - bob
Session B: [bob] interactive -w [same free node] or SSH to [same free node]
Session A: xauth list | tail -1
Session B: [bob] xauth add <above magic cookie>
Session A: echo $DISPLAY
Session B: [bob] export DISPLAY=<above DISPLAY>
|
Clear xauth list
1
|
xauth list | awk '{ print $1 }' | xargs -i xauth remove {}
|