You are not logged in.

#1 2006-12-05 19:33:18

Acid7711
Member
From: Chicago, IL
Registered: 2006-08-18
Posts: 300
Website

How to solve Xlib connection to ":0.0" refused by

I don't know if this has been gone over much of if it's a security risk the way I solved it. Point is, I finally fixed this stupid error and it works for me.  Hopefully it's done right and I can help some others with this problem.

Point in case, running some things under root yields an ' Xlib connection to ":0.0" refused by server' error.  I tried everything, but it got old having to enable root login and log in under gui (since that was what I was attempting to run) simply to launch a program.

Solution was easier than I thought it would be.  Run with your favorite text editor.

vi /etc/profile

Add the following line to it being sure to add in your name where it says replacewithyounamehere

export XAUTHORITY=/home/replacewithyournamehere/.Xauthority

After that, reboot and enjoy no more errors. Hopefully this is an alright solution and that it provides someone who needs it with help. smile It was giving me a headache. I found a lot of conflicting into that never seemed to do the trick until I did this.

Offline

#2 2006-12-06 02:02:25

timtux
Member
From: Gävle, Sweden
Registered: 2005-10-04
Posts: 178
Website

Re: How to solve Xlib connection to ":0.0" refused by

xhost +localhost is prolly what you are looking for. smile


http://timtux.net/ - my personal blog about almost everything

Offline

#3 2006-12-06 15:48:44

Acid7711
Member
From: Chicago, IL
Registered: 2006-08-18
Posts: 300
Website

Re: How to solve Xlib connection to ":0.0" refused by

Maybe I'm wrong, but I thought that was what people were talking about typing and entering before you wanted to run the program? Or can that be put in place of what I have in the /etc/profile

Took a long time to figure it out for me because I didn't wanna have to sit and type something in every time I was trying to run whatever command/program under su.

smile Thanks either way

Offline

#4 2006-12-06 16:02:27

timtux
Member
From: Gävle, Sweden
Registered: 2005-10-04
Posts: 178
Website

Re: How to solve Xlib connection to ":0.0" refused by

Put it in ~/.xinitrc:
xhost +localhost &
exec tehwindowmanager


http://timtux.net/ - my personal blog about almost everything

Offline

#5 2006-12-07 22:15:24

Acid7711
Member
From: Chicago, IL
Registered: 2006-08-18
Posts: 300
Website

Re: How to solve Xlib connection to ":0.0" refused by

Ahh, thanks smile  I'll keep it in mind for the future. My settings work now and I've learned not to screw with things that work.

heh.

Offline

#6 2006-12-07 22:20:39

timtux
Member
From: Gävle, Sweden
Registered: 2005-10-04
Posts: 178
Website

Re: How to solve Xlib connection to ":0.0" refused by

Np m8 smile


http://timtux.net/ - my personal blog about almost everything

Offline

Board footer

Powered by FluxBB