I'm trying to use X Windows across an ssh connection.
It's an ssh connection I've used for a long time for normal terminal command line connections so I can ctually make the connection successfully with no problem.
To try and use X I've changed the command line from 'ssh -x <remote>' to 'ssh -X <remote>'.
The ssh man pages say that ssh will set the DISPLAY environment variable but it doesn't seem to do so, 'echo $DISPLAY' produces nothing.
What am I doing wrong?
On Thu, Apr 14, 2005 at 09:29:00PM +0100, Chris Green wrote:
The ssh man pages say that ssh will set the DISPLAY environment variable but it doesn't seem to do so, 'echo $DISPLAY' produces nothing.
What am I doing wrong?
Does the remote end have the option "X11Forwarding yes" in the /etc/ssh/sshd_config file?
Adam
Chris Green wrote:
The ssh man pages say that ssh will set the DISPLAY environment variable but it doesn't seem to do so, [...]
I think that you may need to change a sshd_config setting on the machine you are connecting to.
On Thursday 14 April 2005 22:50, MJ Ray wrote:
Chris Green wrote:
The ssh man pages say that ssh will set the DISPLAY environment variable but it doesn't seem to do so, [...]
I think that you may need to change a sshd_config setting on the machine you are connecting to.
If you want to try setting it up manually, you need to do the following:
xhost +<host or ip of remote machine> ssh <host or ip of remote machine>
at the command prompt on the remote machine type: export DISPLAY=<ip or host of local machine>:0
now try running an X app, such as firefox. It should appear on your local machine.
Stuart.
On Fri, Apr 15, 2005 at 08:57:08AM +0100, Stuart Bailey wrote:
On Thursday 14 April 2005 22:50, MJ Ray wrote:
Chris Green wrote:
The ssh man pages say that ssh will set the DISPLAY environment variable but it doesn't seem to do so, [...]
I think that you may need to change a sshd_config setting on the machine you are connecting to.
If you want to try setting it up manually, you need to do the following:
xhost +<host or ip of remote machine> ssh <host or ip of remote machine>
at the command prompt on the remote machine type: export DISPLAY=<ip or host of local machine>:0
I don't think the above is right, the ssh man page explicitly says that one should *not* set the DISPLAY variable as ssh does it for you. I'm not sure if the xhost is necesary either but if it is that should be clear from error messages.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stuart Bailey stuart@linusoft.co.uk wrote:
If you want to try setting it up manually, you need to do the following:
xhost +<host or ip of remote machine> ssh <host or ip of remote machine>
at the command prompt on the remote machine type: export DISPLAY=<ip or host of local machine>:0
now try running an X app, such as firefox. It should appear on your local machine.
Ewww, naughty. For the following reasons, this is a bad idea:
1) X traffic, in this set up, is not going over the SSH link, it's being thrown over the network in the usual X11 protocol, which isn't encryted
2) Not all X Servers default to running network X11, infact, some distros positively disable it.
3) The traffic is uncompressed, and so slow.
The correct way, as already noted on the thread, is to enable X11 forwarding on the ssh server.
Thanks, - -- Brett Parker web: http://www.sommitrealweird.co.uk/ email: iDunno@sommitrealweird.co.uk
On Fri, Apr 15, 2005 at 09:25:19AM +0100, Brett Parker wrote:
Stuart Bailey stuart@linusoft.co.uk wrote:
If you want to try setting it up manually, you need to do the following:
xhost +<host or ip of remote machine> ssh <host or ip of remote machine>
at the command prompt on the remote machine type: export DISPLAY=<ip or host of local machine>:0
now try running an X app, such as firefox. It should appear on your local machine.
Ewww, naughty. For the following reasons, this is a bad idea:
- X traffic, in this set up, is not going over the SSH link, it's being
thrown over the network in the usual X11 protocol, which isn't encryted
- Not all X Servers default to running network X11, infact, some
distros positively disable it.
- The traffic is uncompressed, and so slow.
Not to mention that it won't work for me (I hadn't noticed that all that was being suggested was a 'normal' X setup, just happening to use ssh to get to the remote machine to run the app). These ssh links I'm using are specifically permitted ports through our firewall to and from specific machines to allow me to access work machines from home. Most ports are blocked.
Chris Green chris@areti.co.uk writes:
To try and use X I've changed the command line from 'ssh -x <remote>' to 'ssh -X <remote>'.
The ssh man pages say that ssh will set the DISPLAY environment variable but it doesn't seem to do so, 'echo $DISPLAY' produces nothing.
What am I doing wrong?
People have suggested some possibilities. Using "ssh -v" is often useful when debugging SSH problems, so try that and see what (if anything) it says about X forwarding (in amongst everything else).