Jump to content

Stop me if you've heard this before


trigggl

Recommended Posts

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
Link to comment
Share on other sites

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
It 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?
Link to comment
Share on other sites

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 specified
The solution is: (as normal user)
$ xhost +localhost

and (as root)

# set DISPLAY=localhost:0.0

:D Bruno

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

I guess the user command has to be done before the root command.
LOL . . . Greg . . . wasn't that the way I posted it ?? :P B) :) . . . . LOL !!B) Bruno
Link to comment
Share on other sites

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 !! B)( sorry, I just had to tease you a bit :P ):) Bruno

Link to comment
Share on other sites

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

B) Bruno

It didn't work. It still does it after a reboot.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
okay, I've run the commands and now I'm going to reboot
Link to comment
Share on other sites

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#
Link to comment
Share on other sites

securitybreach

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 by securitybreach
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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

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?
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.conf
Save 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 by RD1
Link to comment
Share on other sites

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. :w00t: 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.

Link to comment
Share on other sites

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 :w00t: . . . Sundays are funny days to have the gray cells working . . . . :PAnyway I am glad it does the trick :DB) Bruno

Link to comment
Share on other sites

  • 2 months later...

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 by trigggl
Link to comment
Share on other sites

Hi GregMaybe add those lines to rc.local if kde/Autostart is starting it to late . . . :thumbsup: Bruno

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...