[sclug] ssh -X not setting $DISPLAY
John Stumbles
john at stumbles.org.uk
Fri Jan 5 14:02:18 UTC 2007
I'm trying to do X11 forwarding from one linux box to another but it
only works one way.
From a console running under kde on a Debian Sarge (i86) system:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
john at shuttle:~$ echo $DISPLAY
:0
john at shuttle:~$ ssh -X targa
Linux targa 2.6.15-27-amd64-generic #1 SMP PREEMPT Fri Dec 8 17:50:54
UTC 2006 x86_64 GNU/Linux
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Last login: Fri Jan 5 13:46:20 2007
john at targa:~$ echo $DISPLAY
localhost:10.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From a console running under kde on a Kubuntu Dapper (AMD64) system:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
john at targa:~$ echo $DISPLAY
:0
john at targa:~$ ssh -X shuttle
Linux shuttle 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686 GNU/Linux
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Fri Jan 5 13:38:16 2007 from targa
john at shuttle:~$ echo $DISPLAY
john at shuttle:~$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
duh?
Both boxes are running OpenSSH.
man ssh says:
X11 and TCP forwarding
If the ForwardX11 variable is set to ``yes'' (or see the
description of the -X and -x options described later) and the user is
using X11 (the DISPLAY environment variable is set), the connection to
the X11 display is automatically forwarded to the remote side in such a
way that any X11 programs started from the shell (or command) will go
through the encrypted channel, and the connection to the real X
server will be made from the local machine. The user should not
manually set DISPLAY. Forwarding of X11 connections can be configured
on the command line or in configuration files.
$DISPLAY is set (to :0) when I invoke ssh -X so it should do forwarding
... shouldn't it?
--
John Stumbles
More information about the Sclug
mailing list