trigggl Posted January 17, 2005 Share Posted January 17, 2005 I know this has probably been covered before, but does anyone know or remember what causes this error? root@fangorn:/home/greg# vi /etc/swaret.confXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedXlib: connection to ":0.0" refused by serverXlib: No protocol specified Quote Link to comment Share on other sites More sharing options...
RD1 Posted January 17, 2005 Share Posted January 17, 2005 I believe it is because you are trying to run the program as root. ( through su command?) If so, try doing "xhost +localhost" as user first.Rodger Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 17, 2005 Author Share Posted January 17, 2005 I believe it is because you are trying to run the program as root. ( through su command?) If so, try doing "xhost +localhost" as user first.RodgerIt doesn't prevent me from editing, it's just an annoying message I see when I'm done. Would "ZZ" to exit VI cause the message?As for the xhost command you gave, is that a permanent solution or do I need to type it in every time? It won't mess with my Internet connection will it? Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 17, 2005 Share Posted January 17, 2005 As for the xhost command you gave, is that a permanent solution or do I need to type it in every time? It won't mess with my Internet connection will it?That is a permanent solution Greg . . . the complete drill actually is:If you get the following error message in the console:xlib: connection to 0.0 refused by serverxlib: no protocol specifiedThe solution is: (as normal user)$ xhost +localhost and (as root) # set DISPLAY=localhost:0.0 Bruno Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 18, 2005 Share Posted January 18, 2005 Thanx for the solution. I have been doing $ xhost +localhost for like a month on SimplyMepis 2004.06. Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 18, 2005 Author Share Posted January 18, 2005 Thanx for the solution. I have been doing $ xhost +localhost for like a month on SimplyMepis 2004.06.Yeah, I'm not a big fan of temporary solutions.root@fangorn:/home/greg# set DISPLAY=localhost:0.0root@fangorn:/home/greg# vi /etc/swaret.confXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedroot@fangorn:/home/greg# exitexitgreg@fangorn:~$ xhost +localhostlocalhost being added to access control listgreg@fangorn:~$ suPassword:root@fangorn:/home/greg# vi /etc/swaret.confroot@fangorn:/home/greg# set DISPLAY=localhost:0.0root@fangorn:/home/greg# vi /etc/swaret.confroot@fangorn:/home/greg#Looks like it worked. I guess the user command has to be done before the root command. Quote Link to comment Share on other sites More sharing options...
linuxdude32 Posted January 18, 2005 Share Posted January 18, 2005 Interesting. For non-Slackware distros that have this problem, would you use export DISPLAY=localhost:0.0? Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 18, 2005 Share Posted January 18, 2005 I guess the user command has to be done before the root command.LOL . . . Greg . . . wasn't that the way I posted it ?? . . . . LOL !! Bruno Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 18, 2005 Author Share Posted January 18, 2005 LOL . . . Greg . . . wasn't that the way I posted it ?? . . . . LOL !! BrunoI wasn't sure if it was a procedure or an alternate. Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 18, 2005 Share Posted January 18, 2005 LOL . . . that is how you can recognize the REAL Explorer . . . . . tying all possibilities and don't go for the obvious first option !! . . LOL . . fair play to you Greg !! ( sorry, I just had to tease you a bit ) Bruno Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 22, 2005 Author Share Posted January 22, 2005 That is a permanent solution Greg . . . the complete drill actually is:If you get the following error message in the console:The solution is: (as normal user)$ xhost +localhost and (as root) # set DISPLAY=localhost:0.0 Bruno It didn't work. It still does it after a reboot. Quote Link to comment Share on other sites More sharing options...
linuxdude32 Posted January 23, 2005 Share Posted January 23, 2005 I think you have to use the export command to make the change permanent (outside the existing shell) like this (after the SET command):export DISPLAY Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 23, 2005 Share Posted January 23, 2005 Hi Greg . . could you test that "export DISPLAY" ??I think this is a bug in KDE 3.3 because it only happens in distros that use 3.3B) Bruno Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 23, 2005 Author Share Posted January 23, 2005 Hi Greg . . could you test that "export DISPLAY" ??I think this is a bug in KDE 3.3 because it only happens in distros that use 3.3B) Brunookay, I've run the commands and now I'm going to reboot Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 23, 2005 Author Share Posted January 23, 2005 Didn't work greg@fangorn:~$ suPassword:root@fangorn:/home/greg# vi /etc/swaret.confXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedXlib: connection to ":0.0" refused by serverXlib: No protocol specifiedroot@fangorn:/home/greg# Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 23, 2005 Share Posted January 23, 2005 (edited) It still doesnt work for me and I am running SimplyMepis 2004.06. I use Xfce with some KDE 3.3 apps. I am running Eterm trying to run Synaptic which isnt a KDE program so maybe this isnt a KDE bug. Probably some wrong configuration somewhere. security@1[~]$ suPassword: su: Authentication failureSorry.security@1[~]$ suPassword: root@[security]# synapticXlib: connection to ":0.0" refused by serverXlib: No protocol specified(synaptic:1872): Gtk-WARNING **: cannot open display: root@[security]# Its been happening so long I am kinda used to it. Thanx Edited January 23, 2005 by securitybreach Quote Link to comment Share on other sites More sharing options...
linuxdude32 Posted January 24, 2005 Share Posted January 24, 2005 Strangely I've noticed that xhost +localhost doesn't work for me anymore. But if I run:xhost +It works fine (until the next boot or login, that is). I'm still using SUSE 9.1 which doesn't use KDE 3.3.Warning: Using the above command turns off access control altogether so don't use if you're not behind a firewall or on a system that multiple people access (e.g. server). People can spy in on your Xsession, grab keystrokes, etc. That's probably why X has such restrictions on it in the first place. Quote Link to comment Share on other sites More sharing options...
trigggl Posted February 26, 2005 Author Share Posted February 26, 2005 I believe it is because you are trying to run the program as root. ( through su command?) If so, try doing "xhost +localhost" as user first.Rodger<{POST_SNAPBACK}> I'm getting tired of this again. Surely there is a setup file somewhere I could edit this into to be run at every login. Any ideas of which file that would be? If it's a KDE problem perhaps it's in the kde settings somewhere? Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 26, 2005 Share Posted February 26, 2005 Hi GregUsusally you would put a line in rc.local . . but that would make that the command is run as root . . . so what you do to run it is user is put a one-line-script ( bash-script see Tips ) in ~/.kde/Autostart . . . and make it executable with chmod 775 . . . That way it will be executed as "user" and at the end of the boot-process when KDE is starting :DB) Bruno Quote Link to comment Share on other sites More sharing options...
RD1 Posted February 26, 2005 Share Posted February 26, 2005 (edited) Why noy just start the whole thing from a script? #!/bin/sh# first set displayxhost +localhost#change to rootsu#enter password#start programvi /etc/swaret.confSave the whole thing as vi_swaret.shMake it executable... "chmod a+x vi_swaret.shopen terminal and run ... "sh vi_swaret.shShould work. Shouldn't it?By the way, "xhost -localhost" should set display back to normal afterwards. Rodger Edited February 26, 2005 by RD1 Quote Link to comment Share on other sites More sharing options...
trigggl Posted February 26, 2005 Author Share Posted February 26, 2005 swaret.conf is not the only file I edit.The Autostart thing looks like what I'll do. Quote Link to comment Share on other sites More sharing options...
trigggl Posted February 27, 2005 Author Share Posted February 27, 2005 Well, I made a file called "xhostrc". Here are the contents: #!/bin/bashxhost +localhost#End script At first, I forgot to put the first line in it. That's when I took the time to check the tips and did it right. When I logged in, I would get the command in a text editor.After remembering to edit the bin/bash line in, it still wouldn't work. It took a while for me to remember that I was currently root and that I needed to be a regular user for it to work. It was a comedy of errors, but I finally figured it out. So, to make a long story short, the above file is what's working for me. Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 27, 2005 Share Posted February 27, 2005 LOL . . . well I see that there is at least ONE thing you did not forget and that was to make it executable . . . LOL . . . see that is progress . . . Sundays are funny days to have the gray cells working . . . . :PAnyway I am glad it does the trick :DB) Bruno Quote Link to comment Share on other sites More sharing options...
trigggl Posted May 2, 2005 Author Share Posted May 2, 2005 (edited) For some reason, this isn't working anymore.Bruno, would you have any idea why? Anyone? The file is still there and still executable, but it's not executing when I log in.Could this be because of the KDM login? Edited May 2, 2005 by trigggl Quote Link to comment Share on other sites More sharing options...
Bruno Posted May 3, 2005 Share Posted May 3, 2005 Hi GregMaybe add those lines to rc.local if kde/Autostart is starting it to late . . . Bruno Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.