This was new. X forwarding broke after I su'ed to another user. What previously worked says
Connection lost to X server `localhost:10.0'
after a su. It's the magic cookie that isn't there for the new user. So, how to add the cookie for the new user?
echo $DISPLAY
localhost:10.0
We're on 10.
xauth list
Hostname/unix:10 MIT-MAGIC-COOKIE-1 f4bb4714280c22018cacd461277dd760
Copy the entire line for the display and su to your user.
xauth add Hostname/unix:10 MIT-MAGIC-COOKIE-1 f4bb4714280c22018cacd461277dd760
And xclock works!
Re: (Score:1)
Easier:
Insert the requisite mention of
sshif you’re doing this across the network, etc.Re: (Score:1)