Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 have output of commands be in codeblock as well.
source | link

Works for me, debian wheezy -> ubuntu trusty.

Note: in this case the server is not running a display-manager, it's a 'headless' virtual machine with no graphics card or monitor attached.

bob@laptop:~$ grep -iB 1 tcp /etc/gdm3/daemon.conf

[security]

DisallowTCP = false

[security]
DisallowTCP = false
bob@laptop:~$ ssh -C -R 6000:127.0.0.1:6000 alice@server

X11 forwarding request failed on channel 0

X11 forwarding request failed on channel 0
alice@server:~$ export DISPLAY=:0.0
 
alice@server:~$ xterm

X display on laptop shows output of xterm running on server.

Debug using:

bob@laptop:~/tmp$ nc -v 127.0.0.1 6001

localhost [127.0.0.1] 6001 (x11-1) : Connection refused

localhost [127.0.0.1] 6001 (x11-1) : Connection refused
bob@laptop:~/tmp$ nc -v 127.0.0.1 6000

localhost [127.0.0.1] 6000 (x11) open

localhost [127.0.0.1] 6000 (x11) open
alice@server:~$ nc -v 127.0.0.1 6000

Connection to 127.0.0.1 6000 port [tcp/x11] succeeded!

Connection to 127.0.0.1 6000 port [tcp/x11] succeeded!*
alice@server:~$ strace xterm

stracestrace will spill loads of gory details about what it's doing, you should be able to guess where it gets stuck - waiting for a connection or whatever.

In one line ..

ssh -C -R 6000:127.0.0.1:6000 alice@server "DISPLAY=:0.0 xterm"

Works for me, debian wheezy -> ubuntu trusty.

Note: in this case the server is not running a display-manager, it's a 'headless' virtual machine with no graphics card or monitor attached.

bob@laptop:~$ grep -iB 1 tcp /etc/gdm3/daemon.conf

[security]

DisallowTCP = false

bob@laptop:~$ ssh -C -R 6000:127.0.0.1:6000 alice@server

X11 forwarding request failed on channel 0

alice@server:~$ export DISPLAY=:0.0
 
alice@server:~$ xterm

X display on laptop shows output of xterm running on server.

Debug using:

bob@laptop:~/tmp$ nc -v 127.0.0.1 6001

localhost [127.0.0.1] 6001 (x11-1) : Connection refused

bob@laptop:~/tmp$ nc -v 127.0.0.1 6000

localhost [127.0.0.1] 6000 (x11) open

alice@server:~$ nc -v 127.0.0.1 6000

Connection to 127.0.0.1 6000 port [tcp/x11] succeeded!

alice@server:~$ strace xterm

strace will spill loads of gory details about what it's doing, you should be able to guess where it gets stuck - waiting for a connection or whatever.

In one line ..

ssh -C -R 6000:127.0.0.1:6000 alice@server "DISPLAY=:0.0 xterm"

Works for me, debian wheezy -> ubuntu trusty.

Note: in this case the server is not running a display-manager, it's a 'headless' virtual machine with no graphics card or monitor attached.

bob@laptop:~$ grep -iB 1 tcp /etc/gdm3/daemon.conf
[security]
DisallowTCP = false
bob@laptop:~$ ssh -C -R 6000:127.0.0.1:6000 alice@server
X11 forwarding request failed on channel 0
alice@server:~$ export DISPLAY=:0.0
alice@server:~$ xterm

X display on laptop shows output of xterm running on server.

Debug using:

bob@laptop:~/tmp$ nc -v 127.0.0.1 6001
localhost [127.0.0.1] 6001 (x11-1) : Connection refused
bob@laptop:~/tmp$ nc -v 127.0.0.1 6000
localhost [127.0.0.1] 6000 (x11) open
alice@server:~$ nc -v 127.0.0.1 6000
Connection to 127.0.0.1 6000 port [tcp/x11] succeeded!*
alice@server:~$ strace xterm

strace will spill loads of gory details about what it's doing, you should be able to guess where it gets stuck - waiting for a connection or whatever.

In one line ..

ssh -C -R 6000:127.0.0.1:6000 alice@server "DISPLAY=:0.0 xterm"
1
source | link

Works for me, debian wheezy -> ubuntu trusty.

Note: in this case the server is not running a display-manager, it's a 'headless' virtual machine with no graphics card or monitor attached.

bob@laptop:~$ grep -iB 1 tcp /etc/gdm3/daemon.conf

[security]

DisallowTCP = false

bob@laptop:~$ ssh -C -R 6000:127.0.0.1:6000 alice@server

X11 forwarding request failed on channel 0

alice@server:~$ export DISPLAY=:0.0

alice@server:~$ xterm

X display on laptop shows output of xterm running on server.

Debug using:

bob@laptop:~/tmp$ nc -v 127.0.0.1 6001

localhost [127.0.0.1] 6001 (x11-1) : Connection refused

bob@laptop:~/tmp$ nc -v 127.0.0.1 6000

localhost [127.0.0.1] 6000 (x11) open

alice@server:~$ nc -v 127.0.0.1 6000

Connection to 127.0.0.1 6000 port [tcp/x11] succeeded!

alice@server:~$ strace xterm

strace will spill loads of gory details about what it's doing, you should be able to guess where it gets stuck - waiting for a connection or whatever.

In one line ..

ssh -C -R 6000:127.0.0.1:6000 alice@server "DISPLAY=:0.0 xterm"