Linux Junkie

Just Another Addict

X11forwarding via SSH – Ubuntu & Lightdm

| Comments

Some of the errors I ran into

  • DISPLAY is not set
  • Failed to allocate internet-domain X11 display socket
  • X11 forwarding request failed on channel 0

1) Make sure you have the X11forwarding enabled.

Server: /etc/ssh/sshd_config

/etc/ssh/sshd_config
1
2
3
X11Forwarding yes
X11DisplayOffset 10
AllowTcpForwarding yes`

Client: /etc/ssh/ssh_config

/etc/ssh/sshd_config
1
2
ForwardX11 yes
ForwardX11Trusted yes

2) Enable lightdm to listen on TCP sockets

Modify and add line below to: /etc/lightdm/lightdm.conf

/etc/ssh/sshd_config
1
xserver-allow-tcp=true

3) If you have disabled IPv6, one more update to sshd_config is needed
Modify and add line below to: /etc/ssh/sshd_config

/etc/ssh/sshd_config
1
AddressFamily inet

4) Restart lightdm and sshd – or – Reboot

Comments