You are not logged in.

#1 2007-05-30 19:15:51

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Other user can't connect to display?

Yesterday my brother needed visiting a site while I was using the computer.
He needed one of his bookmarks, I opened a terminal and he used 'su brother', wrote his password and started firefox from the terminal.
We got this message:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(firefox-bin:5195): Gtk-WARNING **: cannot open display:

What does it mean? Is it avoidable?

Offline

#2 2007-05-30 21:22:24

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: Other user can't connect to display?

what desktop enviroment you using?
on your menu do you have "run" with options
like run as different user
kde offers this dont know bout gnome or others

Offline

#3 2007-05-30 21:24:17

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Other user can't connect to display?

It's by design, so that random people on the network can't put windows on your screen or steal your output. xhost configures the exceptions. If you do "xhost localhost" in one of your terminals he should be able to run things. If you do this all the time put it in your .xinitrc.

Offline

#4 2007-05-31 03:52:29

bsdson.tw
Member
From: Taiwan
Registered: 2005-05-06
Posts: 161

Re: Other user can't connect to display?

try

xhost +localhost

so that all the request from localhost would be approved.

Offline

#5 2007-05-31 03:55:08

dh_swing
Member
Registered: 2007-05-16
Posts: 5

Re: Other user can't connect to display?

Thank you ataraxia!  Good to finally know the 'proper' way to tackle this.  I had been using the following hack in my bashrc to accomplish this with su:

if [ `id -u` = "0" ]; then
   if [ "$USER" != "root" ]; then
         echo "Exporitng XAUTHORITY";
         export XAUTHORITY=/home/$USER/.Xauthority;
   fi
fi

xhost is mucho better.  Amazing how the old ways of doing things in X are slowly being forgot (by me)...

Offline

Board footer

Powered by FluxBB