This question already has an answer here:
thisuser, I go to shell and run
$ su anotheruser. It asks for password and then switches the user. Then I run
$ gedit anyfile. But now instead of opening gedit, it gives error:
No protocol specified (gedit:388): Gtk-WARNING **: cannot open display: :20.0
How do I get this running?
ls -l "$XAUTHORITY" when run as
-rw------- 1 thisuser thisuser 260 Mar 31 22:35 /home/thisuser/.Xauthority