Bug#26394: sudo xlib Invalid MIT-MAGIC-COOKIE-1

van at dedserius.com van at dedserius.com
Wed May 30 06:33:43 UTC 2001


Package: kdevelop
Version: 1.4 (using KDE 2.1.2 )
Severity: normal
Installed from:    compiled sources
Compiler:          gcc version 2.95.3 20010315 (release)
OS:                Linux 2.4.3 i686
OS/Compiler notes: 

On the 2nd invocation of an su, sudo, telnet, ssh to localhost that creates a root shell, kdevelop no longer allows konsoles when testing compiled apps with build | execute.

The message received via stderr is:
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
konqueror: cannot connect to X server :0.0

This is on a slackware-current box.  Any further requests for an X application fail with the same error.

I discovered this while testing the following code:
	gethostname(hname, hnamelen);
	if (hnamelen)
    fprintf(stderr, "gethostname = %s\n", hname);
  else
    fprintf(stderr, "no host name, length was %u...\n", hnamelen);	
	sethostname("",0);

Obviously, I need to have root permissions to test the error part.  

***THIS CODE SHOULD NOT BE USED FOR DEVELOPMENT PURPOSES.  IT HAS NOT BEEN TESTED FULLY AND IS IN A STATE OF HIGH INSTABILITY***

Don't know what kind of a fix could be implemented, but, it has plagued me for the past three hours.

WorkAround:
Log out of KDE.  Kill the X server and restart it.

Open up your 15 windows you typically keep open.  >:(

This is a real deterrent to application development.

BTW:  Thanks for all your work, guys.  KDevelop is awesome once you sink your teeth into it.  In the end, I'm sure your work will drastically increase the speed of KDE and other apps.  This one is a console-based application, which is probably why it hasn't appeared in a previous bug report.

Best Regards,
Van

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)


-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list