bash: x11 as root
X11 as root in this simply guide.
Sometimes you just need to run an X11 application as root.
Linux disables and mangles this by default and there is a bit of setup to make it work.
a. Make a .Xuthority file as root. To have the file made you need to ssh login as root, as in -
nano /etc/ssh/sshd_config
Set as:
Now login as root so it makes your .Xauthority file..
b. Now as the local user get your magic cookie:
Something like this will be printed.
Now sudo as root and retype that same command again:
Now you should be able to access X11 Applications via root:
xclock