Software >> OS >> Unix >> Linux >> How to resolve "Xlib: connection to ":0.0" refused by server Xlib: No protocol specified" issue

ensure

1.  that the login user was the one that started the X windows environment e.g. you performed desktop login with that user

2. if above is not true e.g. you logged in as user1 and then performed su to user2, try "xhost +" first before launching your Xwindows program