Bug 15016 - xterm Xt error: Can't open display: :0.0
Summary: xterm Xt error: Can't open display: :0.0
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: * Other (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 16:57 UTC by jd
Modified: 2008-07-18 18:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description jd 2008-03-14 16:57:00 UTC
On FC7, x86_64, kernel 2.6.23.15-80.fc7
xorg-x11-server-Xorg-1.3.0.0-16.fc7,
xorg-x11-apps-7.1-4.fc7

with all the latest updates on system.
On  host, as root I do

xhost +localhost
xhost +192.168.0.2  (my hosts IP address).

I create a new user.

I ssh into localhost as new user.

In new user's shell, I type xterm.
I get

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

xterm Xt error: Can't open display: :0.0

In manpage of xhost, there is this:

[+]name The given name (the plus sign is optional) is added to the list
allowed to connect to the X server. The name can be a host name or a user name.

So, as root again, I tried to add the new user name with

xhost +newuser

I got the error message:

# xhost +newuser
xhost:  bad hostname "newuser"

So, I dont understand how I can ssh from my localhost
to my localhost as a user other than the user I am logged
in as from the main gui console, AND be able to open graphical apps.
Comment 1 Alan Coopersmith 2008-03-16 09:59:07 UTC
You may need to specify -X or otherwise enable X11Forwarding in your SSH.

For better instructions see:
http://www.xs4all.nl/~zweije/xauth.html
Comment 2 jd 2008-03-16 11:31:22 UTC
(In reply to comment #1)
> You may need to specify -X or otherwise enable X11Forwarding in your SSH.
> 
> For better instructions see:
> http://www.xs4all.nl/~zweije/xauth.html
> 

Thank you Alan for your comment and explanation re: using
-X on ssh and modifying the sshd config file to allow X forwarding..etc.

What about the manpage which is saying that one can add the username
as in  xhost +username
which is clearly not correct by current implementation.

Cheers,

JD
Comment 3 Alan Coopersmith 2008-07-18 18:15:46 UTC
The "NAMES" section later in the man page explains better what
names are allowed - raw usernames are not allowed, only SecureRPC
usernames or usernames using the si:localuser: protocol - I'll see
if I can find a better way to word this to make it clearer.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.