You are not logged in.
I would like to get x forwarding to work so I can play kolf at school, at the "far away machine" I have X11Forwarding yes in ssshd_config and the same on my local linux machine, no matter what I try I always get
xterm Xt error: Can't open display:
xterm: DISPLAY is not set
no matter what program I use it's always the same thing, X11 is installed and functional on both ends, it's the new standard version 7. both machines are on a clean install too.
any ideals?
Offline
There are two different ways of exporting the display and they depend on how the system was configured.
1)issue the command : export DISPLAY = localhost: 0.0 [as root]
then as a regular user issue: xhost
2) issue the command : xhost +localhost 0.0 [as user]
Offline
You have enabled X11Forwarding on the server, that's step one. Step two is enabling ForwardX11 (or ForwardX11Trusted) for the client. The corresponding command line option is ssh -X (or ssh -Y). ForwardX11 should set the DISPLAY variable automatically.
1)issue the command : export DISPLAY = localhost: 0.0 [as root]
then as a regular user issue: xhost2) issue the command : xhost +localhost 0.0 [as user]
:shock:
Offline
still doesn't work, I still get:
xhost: unable to open display ""
and I am using -X
Offline
OK. If you are (1) using one of the commands I sent to you to export X and (2) on the machine you want to use as the host type ssh -X yourID@intendedserver.xyz then the only other thing I can think of is that there is a firewall on the intended server, preventing the icomming X connetions.
Offline
You also tried ssh -Y? It would be helpful to see the exact commands you're using.
The X11 traffic is tunneled over the ssh connection. so it should not be a firewall problem.
Offline
I have also try'd -Y and both Y and X together, all to no avail, I'm starting to think that this actually is a firewall thing, there is an iptables firewall in place on the end that is to be displaying the X applications... would it be wise to post iptables -L online?
Offline
1) The xhost solution posted above is rubbish. Not only is it unsecure, but it is also wrong in this context and wrong in 2 other ways that I do not want to describe now.
2) If you want to forward X with ssh, there is not much to do, and I think you did it right:
a) Enable X11Forwarding yes in sshd_config on the server side (don't forget to restart sshd)
b) Start your ssh session with ssh -X $hostname. This enabled X forwarding for this one session. If it doesn't, you get an error message that tells you why. If $DISPLAY is not set and ther e is no error, then you either forgot -X (or -Y) or your $DISPLAY gets unset again after the login.
Offline
look, I dunno what else to say, I've done all this and nothing has changed, this worked fine on gentoo but has major problems in arch...
Offline
Do you get any messages when you call ssh -X? Any errors? If not, please try ssh -X -v -v and post the output here.
Offline
I was not able to do X11 forwarding until I put
XAuthLocation /usr/bin/xauth
in /etc/ssh/sshd_config of the computer being ssh'd into.
I hope this helps.
Offline
You're great! I had the exact same problem, and it fixed it
Offline
I just had the same problem, isn't a bug in Arch sshd configuration?
Offline
That fixed it? But that's the default anyway. o.O
1000
Offline
Yes, that fixed it, so it wasn't default, it must be a bug.
Offline
Ah, right you are. Found the default location in /usr/sbin/sshd; it's /usr/X11R6/bin/xauth.
Hey, there's already a bug: http://bugs.archlinux.org/task/8729
Last edited by byte (2007-11-22 15:29:55)
1000
Offline