Discussion:
xhost: unable to open display ":0.0"
jbk
2005-09-10 13:29:46 UTC
Permalink
# su -
-bash: \e[3~:delete-char: command not found
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xhost: unable to open display ":0.0"

This symptom occured after upgrading Fc3 to Fc4. It only
happens when I login as root locally. If I SSH from another
machine and then 'su -' I have no trouble.

"xhost +localhost" is defined in root's .bash_profile.

A fresh install on my laptop did not exhibit this problem.

I am googling the mailing lists but have yet to find
reference to this particular circumstance.

Jim
n***@javalinux.net
2005-09-10 13:42:14 UTC
Permalink
When the DISPLAY is set to :0.0, as opposed to localhost:0.0, the client
will use Unix-domain sockets instead of TCP connection. My guess is this
path isn't covered by "xhost +localhost".

Nathan
Post by jbk
# su -
-bash: \e[3~:delete-char: command not found
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
This symptom occured after upgrading Fc3 to Fc4. It only
happens when I login as root locally. If I SSH from another
machine and then 'su -' I have no trouble.
"xhost +localhost" is defined in root's .bash_profile.
A fresh install on my laptop did not exhibit this problem.
I am googling the mailing lists but have yet to find
reference to this particular circumstance.
Jim
_______________________________________________
Discuss mailing list
http://olduvai.blu.org/mailman/listinfo/discuss
David Kramer
2005-09-10 15:38:18 UTC
Permalink
Post by jbk
# su -
-bash: \e[3~:delete-char: command not found
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
This symptom occured after upgrading Fc3 to Fc4. It only happens when I
login as root locally. If I SSH from another machine and then 'su -' I
have no trouble.
"xhost +localhost" is defined in root's .bash_profile.
A fresh install on my laptop did not exhibit this problem.
I am googling the mailing lists but have yet to find reference to this
particular circumstance.
I assume you started X as a regular user. That regular user has to adjust
the security of the X session, not root. Put the "xhost +localhost" in
_that_ user's .bash_profile.
jbk
2005-09-10 15:58:06 UTC
Permalink
Post by David Kramer
Post by jbk
# su -
-bash: \e[3~:delete-char: command not found
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
This symptom occured after upgrading Fc3 to Fc4. It only happens when
I login as root locally. If I SSH from another machine and then 'su -'
I have no trouble.
"xhost +localhost" is defined in root's .bash_profile.
A fresh install on my laptop did not exhibit this problem.
I am googling the mailing lists but have yet to find reference to this
particular circumstance.
I assume you started X as a regular user. That regular user has to
adjust the security of the X session, not root. Put the "xhost
+localhost" in _that_ user's .bash_profile.
It is. In fact if I just "su" instead of "su -" I have no
problem.
jbk
2005-09-10 23:23:53 UTC
Permalink
Post by David Kramer
Post by jbk
# su -
-bash: \e[3~:delete-char: command not found
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
This symptom occured after upgrading Fc3 to Fc4. It only happens when
I login as root locally. If I SSH from another machine and then 'su
-' I have no trouble.
"xhost +localhost" is defined in root's .bash_profile.
A fresh install on my laptop did not exhibit this problem.
I am googling the mailing lists but have yet to find reference to
this particular circumstance.
I assume you started X as a regular user. That regular user has to
adjust the security of the X session, not root. Put the "xhost
+localhost" in _that_ user's .bash_profile.
It is. In fact if I just "su" instead of "su -" I have no problem.
I just discovered a subtilety in the behavior. If I "su -"
directly from user I do not have the problem. It is when I
first "su" and then "su -" that xhost is unable to open the
display.
So does this narrow the possibilities? I have two Fc4
systems I can compare. Or should I leave it as a quirk that
isn't worth figuring out?
David Kramer
2005-09-11 02:49:54 UTC
Permalink
Post by David Kramer
I assume you started X as a regular user. That regular user has to
adjust the security of the X session, not root. Put the "xhost
+localhost" in _that_ user's .bash_profile.
It is. In fact if I just "su" instead of "su -" I have no problem.
I just discovered a subtilety in the behavior. If I "su -" directly from
user I do not have the problem. It is when I first "su" and then "su -"
that xhost is unable to open the display.
So does this narrow the possibilities? I have two Fc4 systems I can
compare. Or should I leave it as a quirk that isn't worth figuring out?
Ummm, did you try what I already suggested?

It's not a quirk. Whoever starts X is the only one who has rights to talk
to X, or enable others to talk to X. What's the mystery?

The "-" in "su -" means "Make the shell a login shell", which is straight
out of the man page. When you "su", you are elevating your rights to that
of root. When you "su -", you *become* root. There is no subtlety. You
are no longer you.
jbk
2005-09-11 11:11:08 UTC
Permalink
It is. xhost +localhost has always been a feature of the
user profile.
Post by David Kramer
I just discovered a subtilety in the behavior. If I "su -" directly
from user I do not have the problem. It is when I first "su" and then
"su -" that xhost is unable to open the display.
So does this narrow the possibilities? I have two Fc4 systems I can
compare. Or should I leave it as a quirk that isn't worth figuring out?
Ummm, did you try what I already suggested?
See above.
Post by David Kramer
It's not a quirk. Whoever starts X is the only one who has rights to
talk to X, or enable others to talk to X. What's the mystery?
The mystery is that up until this upgrade to Fc4 I was able
to elevate myself to root privilege status with "su" and
then from that elevated status issue "su -" and become root,
all maintaining connection to the Xserver. Now, I can no
longer follow that pattern. If I want to maintain connection
to the Xserver I must "su -" directly from the unprivileged
user status.

On the other machine that I did an "install" of Fc4, and
then copied back the profiles and config files to the user
accounts, I can follow the old pattern of privilege
elevation as I am acustommed to.
Post by David Kramer
The "-" in "su -" means "Make the shell a login shell", which is
straight out of the man page. When you "su", you are elevating your
rights to that of root. When you "su -", you *become* root. There is
no subtlety. You are no longer you.
_______________________________________________
Discuss mailing list
http://olduvai.blu.org/mailman/listinfo/discuss
jbk
2005-09-15 02:09:20 UTC
Permalink
The mystery is that up until this upgrade to Fc4 I was able to elevate
myself to root privilege status with "su" and then from that elevated
status issue "su -" and become root, all maintaining connection to the
Xserver. Now, I can no longer follow that pattern. If I want to maintain
connection to the Xserver I must "su -" directly from the unprivileged
user status.
On the other machine that I did an "install" of Fc4, and then copied
back the profiles and config files to the user accounts, I can follow
the old pattern of privilege elevation as I am acustommed to.
After finishing yum update the symptom has gone away.

till next
Jim

Jerry Feldman
2005-09-10 16:03:12 UTC
Permalink
On Sat, 10 Sep 2005 11:38:18 -0400
Post by David Kramer
Post by jbk
# su -
-bash: \e[3~:delete-char: command not found
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
This symptom occured after upgrading Fc3 to Fc4. It only happens when I
login as root locally. If I SSH from another machine and then 'su -' I
have no trouble.
"xhost +localhost" is defined in root's .bash_profile.
A fresh install on my laptop did not exhibit this problem.
I am googling the mailing lists but have yet to find reference to this
particular circumstance.
I assume you started X as a regular user. That regular user has to adjust
the security of the X session, not root. Put the "xhost +localhost" in
_that_ user's .bash_profile.
Actually, the .xinitrc might be a better place for it.
Additionally. "xhost +" is more generic (and a bit less secure).
--
Jerry Feldman <***@blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
Loading...