I have trouble starting X-programs with sudo and ssh. I get this if I try:
Code: Select all
$ sudo medit
X11 connection rejected because of wrong authentication.
Code: Select all
xauth add $(xauth -f ~username/.Xauthority list|tail -1)
I can start programs as normal user OK, so my ssh is working.
I have the latest Debian without X installed.
I log in to my Debian with:
Code: Select all
ssh -X server@IP
Can I set my command (]xauth add $(xauth -f ~username/.Xauthority list|tail -1)) permanent so I don't have to run it every time i log in?
This problem is new to me. It has always worked out of the box.