PuTTY X11 proxy: Authorisation not recognised: Error: Can’t open display: localhost:10.0
ISSUE:
I am trying to login to root as sudo user and launch the command “xclock” , I am getting the error message as “X11 Error while trying to launch the x-windows from your putty session.”
[stextbox id=”Default” mode=”css” bwidth=”7″ color=”FFFFFF” ccolor=”000000″ bcolor=”1A52EA” bgcolor=”000000″ bgcolorto=”000000″ image=”null”]
[root@quickfixlinux01~]#xclock
PuTTY X11 proxy: Authorisation not recognised
Error: Can’t open display: localhost:10.0 [/stextbox]
RESOLUTION:
[a] You have done an su or a sudo to a switch user, without copying the correct MIT-MAGIC-COOKIE authentication.
[b] You should list these cookies by entering the following, under the account you used to login:
STEP [1] :
Login as the normal user to the below information:
[stextbox id=”Default” mode=”css” bwidth=”7″ color=”FFFFFF” ccolor=”000000″ bcolor=”1A52EA” bgcolor=”000000″ bgcolorto=”000000″ image=”null”]
[siva@quickfixlinux01~]$ env | grep -i display
DISPLAY=localhost:10.0
[siva@quickfixlinux01~]$ xauth list
quickfixlinux01/unix:13 MIT-MAGIC-COOKIE-1 cc283cfe97bb7dd9d52033373ecaee88
quickfixlinux01/unix:12 MIT-MAGIC-COOKIE-1 fde7a475c557b63111fc3ca55191bd91
quickfixlinux01/unix:11 MIT-MAGIC-COOKIE-1 98e8669a8c1274a8bf1199c8401c6ca9
quickfixlinux01/unix:10 MIT-MAGIC-COOKIE-1 2a739990b2459b2db028a8e67c30ff26 [/stextbox]
STEP [2]:
Now, we need to add the MIT-MAGIC-COOKIE’s into the root account to enable the xclock. Therefore, as the user (in this case, root) trying to run the X11 application, add the cookies manually.
[stextbox id=”Default” mode=”css” bwidth=”7″ color=”FFFFFF” ccolor=”000000″ bcolor=”1A52EA” bgcolor=”000000″ bgcolorto=”000000″ image=”null”]
[siva@quickfixlinux01~]$xuath add quickfixlinux01/unix:10 MIT-MAGIC-COOKIE-1 2A739990b2459b2db028a8e67c30ff26 [/stextbox]
STEP [3]:
Now Login as sudo to root and then execute the command “xclock” and you should be able to launch the x windows successfully.
Pre-Diagnostics Steps:
-
Make sure you have enabled the X11forwarding in /etc/ssh/sshd_config file
-
enable the X11 option in putty session.
-
Install and launch the Xming or VcXsrv tool if you are using the windows machine.