Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 01-17-2005, 08:27 AM   #1
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Rep: Reputation: 30
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

Whenever i try to run a program that uses x from console i get this:
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kedit: cannot connect to X server :0
The example above is me running kedit as root from a console. I'm in kde 3.3 . It happens with all programs, i have to run them with "Run command". This is annoying, and now since i have recently installed neverwinter nights linux client and you have to run that from shell script as ./nwn, i cant get it to work. Anyone know how to solve this? Thanks.

EDIT: I have just read that this might not happen with gdm and xdm, gonna try those, if possible i would still like an answer to this. I use kdm. Thanks.

Last edited by bobbens; 01-17-2005 at 08:36 AM.
Old 01-17-2005, 08:51 AM   #2
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
You can use sux instead of su to give root permission to connect to users X.
Or do as root "export DISPLAY=:0.0" before running the program.
Or do as root: ln -s /home/user_running_x/.Xauthority ~/.Xauthority
Or as user: xhost local:

Of these I would choose sux or adding to roots ~/.profile this: export DISPLAY=:0.0
Old 01-17-2005, 09:11 AM   #3
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Original Poster
Rep: Reputation: 30
Ok i'll try that, though i did get it to work by dling gdm and using that instead of kdm as a system x login manager. I wonder why kdm doesn't do that, it's annoying... I'll try one of your solutions later, thanks.

EDIT: Also posted this as a bug at the kde bug tracker . Hope they fix it soon!

EDIT: EDIT: Well told me to delete ~/.Xauthority and it worked, voila. Though this still doesn't explain how gdm worked with that file there... suspicious.

Last edited by bobbens; 01-17-2005 at 11:19 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gunzip: Invalid magic sceadu Linux - Software 1 01-12-2005 06:26 AM
Mit-magic-cookie ??? overlord73 Fedora 1 12-17-2004 04:38 AM
Urban Terror Invalid CD-key php Linux - Games 3 09-21-2004 04:53 AM
invalid tar magic error bpw Linux - General 4 03-04-2004 08:41 PM
Magic sysrq key + Framebuffer console jspenguin Linux - Software 0 04-14-2003 08:10 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration